Check if a coordinate is within a valid region */
| 408 | |
| 409 | /** Check if a coordinate is within a valid region */ |
| 410 | inline bool is_in_valid_region(const ValidRegion &valid_region, Coordinates coord) |
| 411 | { |
| 412 | for (size_t d = 0; d < Coordinates::num_max_dimensions; ++d) |
| 413 | { |
| 414 | if (coord[d] < valid_region.start(d) || coord[d] >= valid_region.end(d)) |
| 415 | { |
| 416 | return false; |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | return true; |
| 421 | } |
| 422 | |
| 423 | /** Create and initialize a tensor of the given type. |
| 424 | * |
no test coverage detected