Compute Library
arm_compute::helpers::tensor_info Namespace Reference


template<typename... Ts>
bool tensors_have_different_quantization_info (const ITensorInfo *tensor_info_1, const ITensorInfo *tensor_info_2, Ts... tensor_infos)
 Checks if the quantization info of given tensors are different. More...

Function Documentation

◆ tensors_have_different_quantization_info()

bool arm_compute::helpers::tensor_info::tensors_have_different_quantization_info ( const ITensorInfo tensor_info_1,
const ITensorInfo tensor_info_2,
Ts...  tensor_infos 

Checks if the quantization info of given tensors are different.

tensor_info_1Tensor info of the first tensor
tensor_info_2Tensor info of the second tensor
tensor_infosTensor infos of the rest tensors
True if tensors have mismatching quantization info else false.

Definition at line 44 of file tensor_info.h.

References ITensorInfo::quantization_info().

Referenced by ClWidthConcatenate2TensorsKernel::configure(), and ClWidthConcatenate4TensorsKernel::configure().

45 {
46  const QuantizationInfo first_quantization_info = tensor_info_1->quantization_info();
48  const std::array < const ITensorInfo *, 1 + sizeof...(Ts) > tensor_infos_array{ { tensor_info_2, std::forward<Ts>(tensor_infos)... } };
49  return std::any_of(tensor_infos_array.begin(), tensor_infos_array.end(), [&](const ITensorInfo * tensor_info)
50  {
51  return tensor_info->quantization_info() != first_quantization_info;
52  });
53 }