Skip to content

Commit 3a89bc4

Browse files
committed
Add to docstring for read
1 parent 90c2dfb commit 3a89bc4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

cuda_bindings/cuda/bindings/cufile.pyx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2658,6 +2658,18 @@ cpdef driver_close():
26582658

26592659
cpdef read(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, off_t buf_ptr_offset):
26602660
"""read data from a registered file handle to a specified device or host memory.
2661+
2662+
Args:
2663+
fh (intptr_t): ``CUfileHandle_t`` opaque file handle.
2664+
buf_ptr_base (intptr_t): base address of buffer in device or host memory.
2665+
size (size_t): size bytes to read.
2666+
file_offset (off_t): file-offset from begining of the file.
2667+
buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to read into.
2668+
2669+
Returns:
2670+
ssize_t: number of bytes read on success.
2671+
2672+
.. seealso:: `cuFileRead`
26612673
"""
26622674
with nogil:
26632675
status = cuFileRead(<Handle>fh, <void*>buf_ptr_base, size, file_offset, buf_ptr_offset)
@@ -2675,6 +2687,9 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset,
26752687
file_offset (off_t): file-offset from begining of the file.
26762688
buf_ptr_offset (off_t): offset relative to the buf_ptr_base pointer to write from.
26772689
2690+
Returns:
2691+
ssize_t: number of bytes written on success.
2692+
26782693
.. seealso:: `cuFileWrite`
26792694
"""
26802695
with nogil:

0 commit comments

Comments
 (0)