diff options
| author | Tyge Lovset <[email protected]> | 2023-01-28 14:49:30 +0100 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-01-28 14:49:30 +0100 |
| commit | 8b7561225a22bf15958a2d19da29c9822811fce6 (patch) | |
| tree | 610feb8c92392c65217a65e65a6ebcc56b171308 /include/stc/cspan.h | |
| parent | 5d5c70ff725b4414b6319040f8179689fb645562 (diff) | |
| download | STC-modified-8b7561225a22bf15958a2d19da29c9822811fce6.tar.gz STC-modified-8b7561225a22bf15958a2d19da29c9822811fce6.zip | |
Fix two minor blips.
Diffstat (limited to 'include/stc/cspan.h')
| -rw-r--r-- | include/stc/cspan.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cspan.h b/include/stc/cspan.h index 68a06541..41ad8c8b 100644 --- a/include/stc/cspan.h +++ b/include/stc/cspan.h @@ -153,7 +153,7 @@ typedef struct { uint32_t d[4]; } cspan_idx4; // cspan_slice: // e.g.: cspan_slice(&ms3, c_SLICE(1,3), c_SLICE(0), c_SLICE(1,4)); -#define c_SLICE(...) ((const uint32_t[2]){__VA_ARGS__})z +#define c_SLICE(...) ((const uint32_t[2]){__VA_ARGS__}) #define cspan_slice(self, ...) \ ((void)((self)->data += c_PASTE(_cspan_slice, c_NUMARGS(__VA_ARGS__))((self)->dim, (self)->stride, __VA_ARGS__))) @@ -186,7 +186,7 @@ STC_INLINE size_t _cspan_size(const uint32_t dim[], unsigned rank) { #define _cspan_next_3 _cspan_next_2 #define _cspan_next_4 _cspan_next_2 -static size_t _cspan_next_2(int rank, uint32_t pos[], const uint32_t dim[], const uint32_t stride[]) { +static inline size_t _cspan_next_2(int rank, uint32_t pos[], const uint32_t dim[], const uint32_t stride[]) { size_t off = 1, rs = 1; ++pos[rank - 1]; while (--rank && pos[rank] == dim[rank]) { |
