MCPcopy Create free account
hub / github.com/Ipotrick/Daxa / check_result

Function check_result

src/cpp_wrapper.cpp:236–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234
235template <usize N = 1>
236void check_result(daxa_Result result, char const * message, std::array<daxa_Result, N> allowed_codes = {DAXA_RESULT_SUCCESS})
237{
238 bool result_allowed = false;
239 for (auto allowed_code : allowed_codes)
240 {
241 result_allowed = (result_allowed || allowed_code == result);
242 }
243 if (!result_allowed)
244 {
245#if DAXA_VALIDATION
246 std::cout << std::format(
247 "[[DAXA ASSERT FAILURE]]: error code: {}, {}.\n\n",
248 daxa_result_to_string(result),
249 message)
250 << std::flush;
251#endif
252 std::abort();
253 }
254}
255
256// --- End Helpers ---
257

Callers 15

create_instanceFunction · 0.85
create_device_2Method · 0.85
choose_deviceMethod · 0.85
create_memoryMethod · 0.85
device_memory_reportMethod · 0.85
tlas_build_sizesMethod · 0.85
blas_build_sizesMethod · 0.85

Calls 1

daxa_result_to_stringFunction · 0.85

Tested by

no test coverage detected