aboutsummaryrefslogtreecommitdiff
path: root/src/core/Validate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Validate.cpp')
-rw-r--r--src/core/Validate.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/Validate.cpp b/src/core/Validate.cpp
index d4fabd4a0f..60a97dfcc2 100644
--- a/src/core/Validate.cpp
+++ b/src/core/Validate.cpp
@@ -100,6 +100,16 @@ arm_compute::Status arm_compute::error_on_tensor_not_2d(const char *function, co
return arm_compute::Status{};
}
+arm_compute::Status arm_compute::error_on_tensor_not_2d(const char *function, const char *file, const int line,
+ const arm_compute::ITensorInfo *tensor)
+{
+ ARM_COMPUTE_RETURN_ERROR_ON_LOC(tensor == nullptr, function, file, line);
+ ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(tensor->num_dimensions() != 2,
+ function, file, line,
+ "Only 2D Tensors are supported by this kernel (%d passed)", tensor->num_dimensions());
+ return arm_compute::Status{};
+}
+
arm_compute::Status arm_compute::error_on_channel_not_in_known_format(const char *function, const char *file, const int line,
arm_compute::Format fmt, arm_compute::Channel cn)
{