MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / set

Method set

arm_compute/core/Dimensions.h:79–88  ·  view source on GitHub ↗

Accessor to set the value of one of the dimensions. * * @param[in] dimension Dimension for which the value is set. * @param[in] value Value to be set for the dimension. * @param[in] increase_dim_unit (Optional) Set to true if new unit dimensions increase the number of dimensions (e.g. for Coordinates), false otherwise (e.g. for TensorShapes) */

Source from the content-addressed store, hash-verified

77 * @param[in] increase_dim_unit (Optional) Set to true if new unit dimensions increase the number of dimensions (e.g. for Coordinates), false otherwise (e.g. for TensorShapes)
78 */
79 void set(size_t dimension, T value, bool increase_dim_unit = true)
80 {
81 ARM_COMPUTE_ERROR_ON(dimension >= num_max_dimensions);
82 _id[dimension] = value;
83 // Don't increase the number of dimensions if the new dimension is 1
84 if (increase_dim_unit || value != 1)
85 {
86 _num_dimensions = std::max(_num_dimensions, dimension + 1);
87 }
88 }
89 /** Alias to access the size of the first dimension */
90 T x() const
91 {

Callers 15

adjust_odd_shapeFunction · 0.45
broadcast_shapeMethod · 0.45
ValidRegionClass · 0.45
permuteFunction · 0.45
permute_stridesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected