We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63238b7 commit 2222725Copy full SHA for 2222725
1 file changed
base/count-falsy/include/stdlib/ndarray/base/count-falsy/macros/10d_blocked.h
@@ -27,6 +27,7 @@
27
#include "stdlib/ndarray/ctor.h"
28
#include <stdint.h>
29
#include <string.h>
30
+#include <assert.h>
31
32
/**
33
* Macro containing the preamble for blocked nested loops which operate on elements of a ten-dimensional ndarray.
@@ -109,6 +110,8 @@
109
110
int64_t j7; \
111
int64_t j8; \
112
int64_t j9; \
113
+ /* Ensure the ndarray has the expected number of dimensions: */ \
114
+ assert( stdlib_ndarray_ndims( x1 ) == 10 ); \
115
/* Copy strides to prevent mutation to the original ndarray: */ \
116
memcpy( sx1, stdlib_ndarray_strides( x1 ), sizeof sx1 ); \
117
/* Create a loop interchange index array for loop order permutation: */ \
0 commit comments