The MSG argument fo the LVARRAY_ERROR_IF is useless when used on a GPU (device):
|
"***** MSG: " STRINGIZE( MSG ) "\n\n"; \ |
For example, the expression in
|
LVARRAY_ERROR_IF( index < 0 || index >= m_dims[ 0 ], \ |
|
"Array Bounds Check Failed: index=" << index << " m_dims[0]=" << m_dims[0] ) |
is printed as Array Bounds Check Failed: index= << index << m_dims[0]= << m_dims[0] in the stacktraces (unevaluated, hence not helpful).
One could use printf or snprintf together with MSG and ... variadic macros arguments which can be used as printf(MSG, __VA_ARGS__); maybe in combination with __VA_OPT__.