File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -393,7 +393,8 @@ class Descriptor {
393
393
bool stridesAreContiguous{true };
394
394
for (int j{0 }; j < leadingDimensions; ++j) {
395
395
const Dimension &dim{GetDimension (j)};
396
- stridesAreContiguous &= (bytes == dim.ByteStride ()) | (dim.Extent () == 1 );
396
+ stridesAreContiguous &=
397
+ (bytes == dim.ByteStride ()) || (dim.Extent () == 1 );
397
398
bytes *= dim.Extent ();
398
399
}
399
400
// One and zero element arrays are contiguous even if the descriptor
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ RT_API_ATTRS int CFI_is_contiguous(const CFI_cdesc_t *descriptor) {
130
130
CFI_index_t bytes = descriptor->elem_len ;
131
131
for (int j{0 }; j < descriptor->rank ; ++j) {
132
132
stridesAreContiguous &=
133
- (bytes == descriptor->dim [j].sm ) | (descriptor->dim [j].extent == 1 );
133
+ (bytes == descriptor->dim [j].sm ) || (descriptor->dim [j].extent == 1 );
134
134
bytes *= descriptor->dim [j].extent ;
135
135
}
136
136
if (stridesAreContiguous || bytes == 0 ) {
You can’t perform that action at this time.
0 commit comments