Skip to content

Commit cda0d46

Browse files
committed
Add documentation for strides_ok().
1 parent 8121c2e commit cda0d46

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pygpu/gpuarray.pyx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ cdef ga_order to_ga_order(ord) except <ga_order>-2:
213213
raise ValueError, "Valid orders are: 'A' (any), 'C' (C), 'F' (Fortran)"
214214

215215
cdef int strides_ok(GpuArray a, strides):
216+
# Check that the passed in strides will not go outside of the
217+
# memory of the array. It is assumed that the strides are of the
218+
# proper length.
216219
cdef ssize_t max_axis_offset
217220
cdef size_t lower = a.ga.offset
218221
cdef size_t upper = a.ga.offset

0 commit comments

Comments
 (0)