Compute Library
18.05
|
#include <stdarg.h>
#include <string>
Go to the source code of this file.
Data Structures | |
class | Status |
Status class. More... | |
Namespaces | |
arm_compute | |
This file contains all available output stages for GEMMLowp on OpenCL. | |
Macros | |
#define | ARM_COMPUTE_UNUSED(...) arm_compute::ignore_unused(__VA_ARGS__) |
To avoid unused variables warnings. More... | |
#define | ARM_COMPUTE_CREATE_ERROR(error_code, ...) ::arm_compute::create_error(error_code, __func__, __FILE__, __LINE__, __VA_ARGS__) |
Creates an error with a given message. More... | |
#define | ARM_COMPUTE_CREATE_ERROR_LOC(error_code, func, file, line, ...) ::arm_compute::create_error(error_code, func, file, line, __VA_ARGS__) |
Creates an error on location with a given message. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_MSG(...) |
An error is returned with the given description. More... | |
#define | ARM_COMPUTE_RETURN_ON_ERROR(status) |
Checks if a status contains an error and returns it. More... | |
#define | ARM_COMPUTE_THROW_ON_ERROR(error) error.throw_if_error(); |
Checks if an error value is valid if not throws an exception with the error. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, ...) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, ...) |
If the condition is true, an error is thrown. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON(cond) ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, #cond) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_RETURN_ERROR_ON_LOC(cond, func, file, line) ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) |
If the condition is true, an error is returned. More... | |
#define | ARM_COMPUTE_ERROR(...) ::arm_compute::error(__func__, __FILE__, __LINE__, __VA_ARGS__) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_ERROR_LOC(func, file, line, ...) ::arm_compute::error(func, file, line, __VA_ARGS__) |
Print the given message then throw an std::runtime_error. More... | |
#define | ARM_COMPUTE_ERROR_THROW_ON(status) |
#define | ARM_COMPUTE_ERROR_ON_MSG(cond, ...) |
#define | ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, ...) |
#define | ARM_COMPUTE_CONST_ON_ERROR(cond, val, msg) val |
#define | ARM_COMPUTE_ERROR_ON(cond) ARM_COMPUTE_ERROR_ON_MSG(cond, #cond) |
If the condition is true then an error message is printed and an exception thrown. More... | |
#define | ARM_COMPUTE_ERROR_ON_LOC(cond, func, file, line) ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) |
If the condition is true then an error message is printed and an exception thrown. More... | |
Enumerations | |
enum | ErrorCode { OK, RUNTIME_ERROR } |
Available error codes. More... | |
Functions | |
template<typename... T> | |
void | ignore_unused (T &&...) |
Ignores unused arguments. More... | |
Status | create_error_va_list (ErrorCode error_code, const char *function, const char *file, const int line, const char *msg, va_list args) |
Creates an error containing the error message from variable argument list. More... | |
Status | create_error (ErrorCode error_code, const char *function, const char *file, const int line, const char *msg,...) |
Creates an error containing the error message. More... | |
void | error (const char *function, const char *file, const int line, const char *msg,...) |
Print an error message then throw an std::runtime_error. More... | |
#define ARM_COMPUTE_CREATE_ERROR | ( | error_code, | |
... | |||
) | ::arm_compute::create_error(error_code, __func__, __FILE__, __LINE__, __VA_ARGS__) |
#define ARM_COMPUTE_CREATE_ERROR_LOC | ( | error_code, | |
func, | |||
file, | |||
line, | |||
... | |||
) | ::arm_compute::create_error(error_code, func, file, line, __VA_ARGS__) |
Creates an error on location with a given message.
[in] | error_code | Error code. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | ... | Message to display before aborting. |
#define ARM_COMPUTE_ERROR | ( | ... | ) | ::arm_compute::error(__func__, __FILE__, __LINE__, __VA_ARGS__) |
Print the given message then throw an std::runtime_error.
[in] | ... | Message to display before aborting. |
Definition at line 260 of file Error.h.
Referenced by NumPyAccessor::access_tensor(), TopNPredictionsAccessor::access_tensor(), RandomAccessor::access_tensor(), arm_compute::test::validation::reference::activation_layer(), arm_compute::test::validation::reference::channel_combine(), arm_compute::channel_idx_from_format(), arm_compute::data_size_from_type(), arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::data_type_from_format(), arm_compute::test::validation::reference::derivative(), arm_compute::element_size_from_data_type(), PPMLoader::fill_image(), PPMLoader::fill_planar_tensor(), arm_compute::utils::fill_random_tensor(), NPYLoader::fill_tensor(), AssetsLibrary::fill_tensor_uniform(), arm_compute::test::validation::reference::fixed_point_operation(), arm_compute::test::validation::get_activation_layer_test_bounds(), arm_compute::get_data_layout_dimension_index(), arm_compute::detail::get_input_num_elems_processed(), arm_compute::get_promoted_data_type(), arm_compute::test::validation::get_tile(), arm_compute::utils::get_typestring(), arm_compute::test::get_typestring(), PMU::get_value(), arm_compute::test::validation::reference::im2col(), arm_compute::test::validation::reference::l2_normalize(), arm_compute::utils::load_trained_data(), MaliCounter::MaliCounter(), MemoryGroupBase< TensorType >::mappings(), arm_compute::test::validation::reference::non_linear_filter(), arm_compute::num_planes_from_format(), PMU::open(), PPMLoader::open(), NPYLoader::open(), OpenCLMemoryUsage::OpenCLMemoryUsage(), OpenCLTimer::OpenCLTimer(), arm_compute::graph::operator<<(), arm_compute::operator<<(), LutAccessor< T >::operator[](), CLLutAccessor< T >::operator[](), arm_compute::pixel_size_from_format(), arm_compute::test::validation::reference::pixel_wise_multiplication(), arm_compute::plane_idx_from_channel(), PMUCounter::PMUCounter(), arm_compute::test::validation::reference::reduction_operation(), arm_compute::test::validation::reference::remap(), PMU::reset(), arm_compute::utils::save_to_npy(), arm_compute::utils::save_to_ppm(), arm_compute::test::validation::reference::scale(), arm_compute::test::validation::reference::scharr(), arm_compute::test::validation::reference::sobel(), arm_compute::test::store_value_with_data_type(), arm_compute::test::validation::reference::threshold(), TopNPredictionsAccessor::TopNPredictionsAccessor(), WallClockTimer::WallClockTimer(), arm_compute::test::validation::reference::warp_affine(), arm_compute::test::validation::reference::warp_perspective(), and MaliCounter::~MaliCounter().
#define ARM_COMPUTE_ERROR_LOC | ( | func, | |
file, | |||
line, | |||
... | |||
) | ::arm_compute::error(func, file, line, __VA_ARGS__) |
#define ARM_COMPUTE_ERROR_ON | ( | cond | ) | ARM_COMPUTE_ERROR_ON_MSG(cond, #cond) |
If the condition is true then an error message is printed and an exception thrown.
[in] | cond | Condition to evaluate. |
Definition at line 328 of file Error.h.
Referenced by NumPyAccessor::access_tensor(), TopNPredictionsAccessor::access_tensor(), AccessWindowHorizontal::AccessWindowHorizontal(), AccessWindowRectangle::AccessWindowRectangle(), AccessWindowVertical::AccessWindowVertical(), MemoryGroupBase< TensorType >::acquire(), ICLKernel::add_array_argument(), Window::adjust(), arm_compute::adjust_down(), arm_compute::adjust_up(), arm_compute::graph::detail::all_inputs_are_visited(), MobileNetV1Network< TensorType, Accessor, ActivationLayerFunction, BatchNormalizationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionFunction, ReshapeFunction, PoolingLayerFunction, SoftmaxLayerFunction >::allocate(), ArrayAccessor< T >::at(), CLArrayAccessor< T >::at(), IArray< NELKInternalKeypoint >::at(), SubTensorInfo::auto_padding(), arm_compute::graph::bfs(), arm_compute::test::validation::calculate_depth_concatenate_shape(), arm_compute::calculate_depth_concatenate_shape(), arm_compute::test::validation::calculate_width_concatenate_shape(), arm_compute::misc::shape_calculator::calculate_width_concatenate_shape(), arm_compute::ceil_to_multiple(), CLArray< T >::cl_buffer(), MobileNetV1Network< TensorType, Accessor, ActivationLayerFunction, BatchNormalizationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionFunction, ReshapeFunction, PoolingLayerFunction, SoftmaxLayerFunction >::clear(), Dimensions< size_t >::collapse(), Window::collapse(), Dimensions< size_t >::collapse_from(), arm_compute::colorconvert_iyuv_to_nv12(), arm_compute::colorconvert_iyuv_to_rgb(), arm_compute::colorconvert_iyuv_to_yuv4(), arm_compute::colorconvert_nv12_to_iyuv(), arm_compute::colorconvert_nv12_to_rgb(), arm_compute::colorconvert_nv12_to_yuv4(), arm_compute::colorconvert_rgb_to_iyuv(), arm_compute::colorconvert_rgb_to_nv12(), arm_compute::colorconvert_rgb_to_rgbx(), arm_compute::colorconvert_rgb_to_yuv4(), arm_compute::colorconvert_rgbx_to_rgb(), arm_compute::colorconvert_yuyv_to_iyuv(), arm_compute::colorconvert_yuyv_to_nv12(), arm_compute::colorconvert_yuyv_to_rgb(), arm_compute::test::validation::compare_dimensions(), arm_compute::misc::shape_calculator::compute_im2col_flatten_shape(), arm_compute::misc::shape_calculator::compute_interleaved_shape(), arm_compute::test::validation::reference::compute_min_max(), arm_compute::misc::shape_calculator::compute_transpose1xW_with_element_size_shape(), CLScheduler::context(), arm_compute::test::validation::reference::convolution(), BatchNormalizationLayer::create_layer(), BranchLayer::create_layer(), SubTensorInfo::data_layout(), arm_compute::test::validation::DATA_TEST_CASE(), SubTensorInfo::data_type(), arm_compute::test::validation::reference::deconvolution_layer(), arm_compute::delta_bilinear_c1(), arm_compute::delta_linear_c1_x(), arm_compute::delta_linear_c1_y(), arm_compute::test::validation::reference::depthconcatenate_layer(), SubTensorInfo::dimension(), SubTensorInfo::element_size(), arm_compute::execute_window_loop(), LeNet5Network< TensorType, Accessor, ActivationLayerFunction, ConvolutionLayerFunction, FullyConnectedLayerFunction, PoolingLayerFunction, SoftmaxLayerFunction >::fill(), AlexNetNetwork< ITensorType, TensorType, SubTensorType, Accessor, ActivationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, FullyConnectedLayerFunction, NormalizationLayerFunction, PoolingLayerFunction, SoftmaxLayerFunction >::fill(), PPMLoader::fill_image(), PPMLoader::fill_planar_tensor(), MobileNetV1Network< TensorType, Accessor, ActivationLayerFunction, BatchNormalizationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionFunction, ReshapeFunction, PoolingLayerFunction, SoftmaxLayerFunction >::fill_random(), NPYLoader::fill_tensor(), AssetsLibrary::fill_tensor_uniform(), arm_compute::test::fill_tensors(), MemoryGroupBase< TensorType >::finalize_memory(), arm_compute::test::validation::reference::fixed_point_pixel_wise_multiplication(), SubTensorInfo::fixed_point_position(), arm_compute::floor_to_multiple(), SubTensorInfo::format(), arm_compute::test::validation::reference::fully_connected_layer(), arm_compute::test::generate_random_keypoints(), arm_compute::test::generate_random_rois(), arm_compute::test::validation::get_tile(), SubTensorInfo::has_padding(), arm_compute::test::validation::reference::hog_detector(), arm_compute::test::validation::reference::hog_multi_detection(), arm_compute::test::validation::reference::im2col_nchw(), arm_compute::test::validation::reference::im2col_nhwc(), Iterator::increment(), MobileNetV1Network< TensorType, Accessor, ActivationLayerFunction, BatchNormalizationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionFunction, ReshapeFunction, PoolingLayerFunction, SoftmaxLayerFunction >::init(), PPMLoader::init_image(), NPYLoader::init_tensor(), SubTensorInfo::is_resizable(), Iterator::Iterator(), Framework::log_failed_expectation(), MemoryGroupBase< TensorType >::manage(), arm_compute::test::validation::matrix_multiply(), MemoryGroupBase< TensorType >::MemoryGroupBase(), arm_compute::test::validation::reference::non_linear_filter(), SubTensorInfo::num_channels(), SubTensorInfo::offset_first_element_in_bytes(), PPMLoader::open(), NPYLoader::open(), Dimensions< size_t >::operator[](), PadStrideInfo::pad(), SubTensorInfo::padding(), arm_compute::pixel_area_c1u8_clamp(), arm_compute::pixel_bilinear_c1(), arm_compute::pixel_bilinear_c1_clamp(), arm_compute::utils::cast::polymorphic_downcast(), arm_compute::test::validation::reference::pooling_layer(), IArray< NELKInternalKeypoint >::push_back(), SubTensorInfo::quantization_info(), CLScheduler::queue(), MemoryGroupBase< TensorType >::release(), arm_compute::test::validation::reference::remap(), TensorShape::remove_dimension(), Iterator::reset(), SubTensorInfo::reset_padding(), arm_compute::test::validation::reference::reshape_layer(), IArray< NELKInternalKeypoint >::resize(), AssemblyKernelGlue< int8_t, int32_t >::run(), arm_compute::utils::save_to_npy(), arm_compute::utils::save_to_ppm(), arm_compute::test::validation::reference::scale(), Window::scale(), Dimensions< size_t >::set(), Window::set(), SubTensorInfo::set_data_layout(), SubTensorInfo::set_data_type(), Window::set_dimension_step(), SubTensorInfo::set_fixed_point_position(), SubTensorInfo::set_format(), SubTensorInfo::set_is_resizable(), SubTensorInfo::set_num_channels(), SubTensorInfo::set_quantization_info(), SubTensorInfo::set_valid_region(), arm_compute::test::shape_to_valid_region(), arm_compute::test::shape_to_valid_region_gaussian_pyramid_half(), Window::shift(), Window::split_window(), SubTensorInfo::strides_in_bytes(), SubTensorInfo::tensor_shape(), OpenCLMemoryUsage::test_start(), OpenCLTimer::test_start(), SchedulerTimer::test_start(), SubTensorInfo::total_size(), TensorShape::total_size_lower(), TensorShape::total_size_upper(), arm_compute::test::validation::transpose_matrix(), Window::validate(), arm_compute::graph::backends::detail::validate_depthwise_convolution_layer(), ValidRegion::ValidRegion(), arm_compute::test::validation::reference::widthconcatenate_layer(), arm_compute::test::validation::reference::winograd_input_transform(), and arm_compute::test::validation::reference::winograd_output_transform().
#define ARM_COMPUTE_ERROR_ON_LOC | ( | cond, | |
func, | |||
file, | |||
line | |||
) | ARM_COMPUTE_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) |
If the condition is true then an error message is printed and an exception thrown.
[in] | cond | Condition to evaluate. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
Definition at line 338 of file Error.h.
Referenced by arm_compute::error_on_format_not_in().
#define ARM_COMPUTE_ERROR_ON_LOC_MSG | ( | cond, | |
func, | |||
file, | |||
line, | |||
... | |||
) |
Definition at line 320 of file Error.h.
Referenced by arm_compute::error_on_format_not_in().
#define ARM_COMPUTE_ERROR_ON_MSG | ( | cond, | |
... | |||
) |
Definition at line 319 of file Error.h.
Referenced by PPMAccessor::access_tensor(), NumPyBinLoader::access_tensor(), arm_compute::test::validation::reference::accumulate_squared(), arm_compute::test::validation::reference::accumulate_weighted(), ICLKernel::add_array_argument(), arm_compute::allocate_workspace(), arm_compute::test::coord2index(), arm_compute::coords2index(), arm_compute::test::validation::reference::deconvolution_layer(), QuantizationInfo::dequantize(), PPMLoader::fill_image(), AssetsLibrary::fill_layer_data(), PPMLoader::fill_planar_tensor(), NPYLoader::fill_tensor(), arm_compute::test::validation::reference::fixed_point_pixel_wise_multiplication(), arm_compute::get_data_layout_dimension_index(), arm_compute::test::validation::reference::hog_detector(), arm_compute::test::index2coord(), arm_compute::index2coords(), PMU::open(), PPMLoader::open(), arm_compute::utils::parse_ppm_header(), QuantizationInfo::quantize(), arm_compute::test::validation::reference::remap(), arm_compute::graph_utils::set_target_hint(), arm_compute::sshr_qs16(), arm_compute::sshr_qs8(), OpenCLTimer::test_start(), arm_compute::test::validation::reference::winograd_filter_transform(), and arm_compute::test::validation::reference::winograd_output_transform().
#define ARM_COMPUTE_RETURN_ERROR_MSG | ( | ... | ) |
An error is returned with the given description.
[in] | ... | Error description message. |
#define ARM_COMPUTE_RETURN_ERROR_ON | ( | cond | ) | ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, #cond) |
If the condition is true, an error is returned.
[in] | cond | Condition to evaluate |
Definition at line 243 of file Error.h.
Referenced by arm_compute::graph::set_tensor_accessor(), arm_compute::graph::backends::detail::validate_convolution_layer(), and arm_compute::graph::backends::detail::validate_depthwise_convolution_layer().
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC | ( | cond, | |
func, | |||
file, | |||
line | |||
) | ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(cond, func, file, line, #cond) |
If the condition is true, an error is returned.
[in] | cond | Condition to evaluate. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
Definition at line 253 of file Error.h.
Referenced by arm_compute::error_on_channel_not_in(), arm_compute::error_on_data_type_channel_not_in(), arm_compute::error_on_data_type_not_in(), arm_compute::error_on_mismatching_data_layouts(), arm_compute::error_on_mismatching_data_types(), arm_compute::error_on_mismatching_shapes(), arm_compute::error_on_tensors_not_even(), arm_compute::error_on_tensors_not_subsampled(), and arm_compute::error_on_value_not_representable_in_fixed_point().
#define ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG | ( | cond, | |
func, | |||
file, | |||
line, | |||
... | |||
) |
If the condition is true, an error is thrown.
[in] | cond | Condition to evaluate. |
[in] | func | Function in which the error occurred. |
[in] | file | File in which the error occurred. |
[in] | line | Line in which the error occurred. |
[in] | ... | Error description message. |
Definition at line 230 of file Error.h.
Referenced by arm_compute::error_on_data_type_channel_not_in(), arm_compute::error_on_data_type_not_in(), arm_compute::error_on_mismatching_data_layouts(), arm_compute::error_on_mismatching_data_types(), arm_compute::error_on_mismatching_fixed_point(), arm_compute::error_on_mismatching_fixed_point_position(), arm_compute::error_on_mismatching_quantization_info(), arm_compute::error_on_mismatching_shapes(), arm_compute::error_on_nullptr(), arm_compute::error_on_tensors_not_even(), arm_compute::error_on_tensors_not_subsampled(), arm_compute::error_on_value_not_representable_in_fixed_point(), and compare_dimension< T >::operator()().
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG | ( | cond, | |
... | |||
) |
If the condition is true, an error is returned.
[in] | cond | Condition to evaluate. |
[in] | ... | Error description message |
#define ARM_COMPUTE_RETURN_ON_ERROR | ( | status | ) |
Checks if a status contains an error and returns it.
[in] | status | Status value to check |
Definition at line 192 of file Error.h.
Referenced by arm_compute::error_on_data_type_channel_not_in(), arm_compute::error_on_data_type_not_in(), arm_compute::error_on_mismatching_data_layouts(), arm_compute::error_on_mismatching_data_types(), arm_compute::error_on_mismatching_dimensions(), arm_compute::error_on_mismatching_fixed_point(), arm_compute::error_on_mismatching_fixed_point_position(), arm_compute::error_on_mismatching_quantization_info(), arm_compute::error_on_mismatching_shapes(), arm_compute::error_on_tensors_not_even(), arm_compute::error_on_tensors_not_subsampled(), arm_compute::error_on_value_not_representable_in_fixed_point(), and arm_compute::detail::for_each_error().
#define ARM_COMPUTE_THROW_ON_ERROR | ( | error | ) | error.throw_if_error(); |
#define ARM_COMPUTE_UNUSED | ( | ... | ) | arm_compute::ignore_unused(__VA_ARGS__) |
To avoid unused variables warnings.
This is useful if for example a variable is only used in debug builds and generates a warning in release builds.
[in] | ... | Variables which are unused. |
Definition at line 159 of file Error.h.
Referenced by DummyAccessor::access_tensor(), ICLKernel::add_array_argument(), arm_compute::allocate_workspace(), arm_compute::test::validation::reference::batch_normalization_layer(), arm_compute::detail::convolve_3x3< 1 >(), arm_compute::detail::convolve_3x3< 2 >(), arm_compute::detail::convolve_3x3< 3 >(), arm_compute::coords2index(), arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::reference::depth_convert(), dummy< T, S >::dummy(), arm_compute::error_on_format_not_in(), PPMLoader::fill_image(), PPMLoader::fill_planar_tensor(), NPYLoader::fill_tensor(), arm_compute::test::validation::reference::fully_connected_layer(), arm_compute::detail::load_matrix_row(), arm_compute::utils::map(), arm_compute::test::validation::reference::non_linear_filter(), dummy< T, S >::operator()(), arm_compute::utils::parse_ppm_header(), relu< T, S >::relu(), arm_compute::test::validation::reference::softmax_layer(), arm_compute::detail::store_results< 3 >(), OpenCLTimer::test_start(), arm_compute::utils::unmap(), and arm_compute::test::validation::reference::winograd_output_transform().