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

Function error_on_nullptr

arm_compute/core/Validate.h:158–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 */
157template <typename... Ts>
158inline arm_compute::Status error_on_nullptr(const char *function, const char *file, const int line, Ts &&...pointers)
159{
160 const std::array<const void *, sizeof...(Ts)> pointers_array{{std::forward<Ts>(pointers)...}};
161 bool has_nullptr =
162 std::any_of(pointers_array.begin(), pointers_array.end(), [&](const void *ptr) { return (ptr == nullptr); });
163 ARM_COMPUTE_RETURN_ERROR_ON_LOC_MSG(has_nullptr, function, file, line, "Nullptr object!");
164 return arm_compute::Status{};
165}
166#define ARM_COMPUTE_ERROR_ON_NULLPTR(...) \
167 ARM_COMPUTE_ERROR_THROW_ON(::arm_compute::error_on_nullptr(__func__, __FILE__, __LINE__, __VA_ARGS__))
168#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...) \

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected