File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
qdp/qdp-core/src/gpu/encodings Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,15 @@ impl QuantumEncoder for AngleEncoder {
402402
403403impl 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 ,
You can’t perform that action at this time.
0 commit comments