Skip to content

Commit b479dc8

Browse files
viiccwenryankert01
authored andcommitted
fix: pre-commit error
1 parent 723c656 commit b479dc8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

qdp/qdp-core/src/gpu/encodings/angle.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,15 @@ impl QuantumEncoder for AngleEncoder {
402402

403403
impl AngleEncoder {
404404
#[cfg(target_os = "linux")]
405+
/// Encodes `input_len` angle values from a device-resident `f32` buffer into a GPU state
406+
/// vector, using the provided CUDA stream for all launched work.
407+
///
408+
/// # Safety
409+
/// The caller must ensure that `input_d` points to at least `input_len` contiguous `f32`
410+
/// values in GPU-accessible memory and remains valid for the duration of this call.
411+
/// The caller must also ensure that `stream` is either null or a valid CUDA stream handle
412+
/// associated with `device`, and that no concurrent use of these raw pointers violates Rust's
413+
/// aliasing or lifetime rules.
405414
pub unsafe fn encode_from_gpu_ptr_f32_with_stream(
406415
device: &Arc<CudaDevice>,
407416
input_d: *const f32,

0 commit comments

Comments
 (0)