7#define DEFINE_EXCEPTION_CLASS(name) \
8class name : public std::exception { \
12 explicit name() : msg(#name) { } \
14 explicit name(std::string message) : msg(#name) { msg = msg + " - " + message; } \
16 explicit name(const char* message) : msg(#name) { msg = msg + " - " + std::string(message); } \
18 const char* what() const noexcept override { return msg.c_str(); } \
57#undef DEFINE_EXCEPTION_CLASS
A CUDA runtime error occurred.
Definition exceptions.hpp:53
Requested device not available.
Definition exceptions.hpp:31
Objects are on different devices.
Definition exceptions.hpp:36
Accessed a value outside the bounds of matrix.
Definition exceptions.hpp:46
Shape of two matrices are not equal.
Definition exceptions.hpp:41
Main namespace.
Definition common.hpp:33