87 "Maximum number of dimensions expected %u but dimension %u is not empty", max_dim, i);
99 "Only 2D Tensors are supported by this kernel (%zu passed)", tensor->
info()->
num_dimensions());
108 function, file, line,
109 "Only 2D Tensors are supported by this kernel (%zu passed)", tensor->
num_dimensions());
149 function, file, line,
150 "This kernel hasn't been configured.");
158 for(
unsigned int i = 0; i < TensorShape::num_max_dimensions; ++i)
160 const bool invalid_idx = coords[i] >= static_cast<int>(parent_shape[i]);
161 const bool out_of_bounds_size = coords[i] + static_cast<int>(
shape[i]) > static_cast<int>(parent_shape[i]);
171 for(
unsigned int d = 0; d < TensorShape::num_max_dimensions; ++d)
175 function, file, line);
Common information for all the kernels.
bool is_window_configured() const
Function to check if the embedded window of this kernel has been configured.
virtual size_t num_dimensions() const =0
The number of dimensions of the tensor (rank)
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
arm_compute::Status error_on_channel_not_in_known_format(const char *function, const char *file, const int line, Format fmt, Channel cn)
Return an error if the channel is not in format.
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, msg)
If the condition is true, an error is thrown.
TensorShape shape
Shape of the valid region.
arm_compute::Status error_on_unconfigured_kernel(const char *function, const char *file, const int line, const IKernel *kernel)
Return an error if the kernel is not configured.
arm_compute::Status error_on_window_dimensions_gte(const char *function, const char *file, const int line, const Window &win, unsigned int max_dim)
Return an error if the passed window has too many dimensions.
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC(cond, func, file, line)
If the condition is true, an error is returned.
Store the tensor's metadata.
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
arm_compute::Status error_on_tensor_not_2d(const char *function, const char *file, const int line, const ITensor *tensor)
Return an error if the tensor is not 2D.
void validate() const
Will validate all the window's dimensions' values when asserts are enabled.
const ValidRegion valid_region
Interface for CPU tensor.
A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
3 channels, 1 U8 per channel
arm_compute::Status error_on_mismatching_windows(const char *function, const char *file, const int line, const Window &full, const Window &win)
Return an error if the passed window is invalid.
Channel
Available channels.
Format
Image colour formats.
arm_compute::Status error_on_channel_not_in(const char *function, const char *file, const int line, T cn, T &&channel, Ts &&... channels)
Return an error if the channel is not in channels.
#define ARM_COMPUTE_ERROR_LOC(func, file, line, msg)
Print the given message then throw an std::runtime_error.
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
void end(TokenStream &in, bool &valid)
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG_VAR(cond, func, file, line, msg,...)
If the condition is true, an error is thrown.
arm_compute::Status error_on_invalid_subtensor(const char *function, const char *file, const int line, const TensorShape &parent_shape, const Coordinates &coords, const TensorShape &shape)
Return an error if if the coordinates and shape of the subtensor are within the parent tensor.
A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
4 channels, 1 U8 per channel
2 channel, 1 U8 per channel
Container for valid region of a window.
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
arm_compute::Status error_on_coordinates_dimensions_gte(const char *function, const char *file, const int line, const Coordinates &pos, unsigned int max_dim)
Return an error if the passed coordinates have too many dimensions.
Describe a multidimensional execution window.
arm_compute::Status error_on_invalid_subwindow(const char *function, const char *file, const int line, const Window &full, const Window &sub)
Return an error if the passed subwindow is invalid.
arm_compute::Status error_on_invalid_subtensor_valid_region(const char *function, const char *file, const int line, const ValidRegion &parent_valid_region, const ValidRegion &valid_region)
Return an error if the valid region of a subtensor is not inside the valid region of the parent tenso...
Coordinates anchor
Anchor for the start of the valid region.
arm_compute::Status error_on_window_not_collapsable_at_dimension(const char *function, const char *file, const int line, const Window &full, const Window &window, const int dim)
Return an error if the window can't be collapsed at the given dimension.