/
| 241 | |
| 242 | /*****************************************************/ |
| 243 | void initialize_strides(const size_t* strides_in) |
| 244 | { |
| 245 | preinitialize_strides_to_1_1_1(); |
| 246 | |
| 247 | // we need to calculate the strides if tightly packed |
| 248 | if( strides_in == nullptr ) { |
| 249 | _strides[dimx] = 1; |
| 250 | for( size_t i = 1; i < _number_of_dimensions; ++i ) |
| 251 | { |
| 252 | _strides[i] = _strides[i-1]*_lengths[i-1]; |
| 253 | } |
| 254 | |
| 255 | _tightly_packed_strides = true; |
| 256 | } |
| 257 | // we do not need to calculate anything if the user specifies strides |
| 258 | // we just copy the input strides into place |
| 259 | else |
| 260 | { |
| 261 | for( size_t i = 0; i < _number_of_dimensions; ++i ) |
| 262 | { |
| 263 | _strides[i] = strides_in[i]; |
| 264 | } |
| 265 | |
| 266 | _tightly_packed_strides = false; |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | /*****************************************************/ |
| 271 | void initialize_distance(const size_t distance_in) |
nothing calls this directly
no outgoing calls
no test coverage detected