-
Is there an example of how to use c_STRIDED layout for span? |
Beta Was this translation helpful? Give feedback.
Answered by
tylov
May 6, 2025
Replies: 1 comment 2 replies
-
Yes, in the span_demo.c example it is used it make a "downsampled view" of an image in each direction, using the Span2 img = cspan_md(md3.data, 6, 10);
Span2 half = {img.data, cspan_shape(img.shape[0]/2, img.shape[1]/2),
cspan_strides(img.stride.d[0]*2, img.stride.d[1]*2)}; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
ib00
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, in the span_demo.c example it is used it make a "downsampled view" of an image in each direction, using the
cspan_shape()
andcspan_strides()
macros.