9min(
const T& a,
const T& b)
16max(
const T& a,
const T& b)
24 const size_t tmp= a.x > a.y ? a.x : a.y;
25 return tmp > a.z ? tmp: a.z;
28static inline const Volume
29max(
const Volume& a,
const Volume& b)
31 return (Volume){max(a.x, b.x), max(a.y, b.y), max(a.z, b.z)};
34static inline const Volume
35min(
const Volume& a,
const Volume& b)
37 return (Volume){min(a.x, b.x), min(a.y, b.y), min(a.z, b.z)};
45TO_VOLUME(
const T a,
const char*
file,
const int line)
53TO_VOLUME(
const dim3 a,
const char* ,
const int)
55 return (Volume){a.x, a.y, a.z};
59TO_VOLUME(
const size3_t a,
const char* ,
const int)
61 return (Volume){a.x, a.y, a.z};
65operator*(
const Volume& a,
const T& b)
67 return (Volume){a.x / b, a.y / b, a.z / b};
70#define to_volume(a) TO_VOLUME(a, __FILE__, __LINE__)
73to_dim3(
const Volume v)
84operator-(
const Volume& a,
const Volume& b)
93 return to_volume(res);
96operator*(
const Volume& a,
const int& b)
109operator*(
const int& a,
const Volume& b)
#define as_size_t(i)
Definition errchk.h:101
#define ERRCHK_ALWAYS(retval)
Definition errchk.h:95
#define INDIRECT_ERRCHK_ALWAYS(retval, file, line)
Definition errchk.h:224
#define HOST_INLINE
Definition func_attributes.h:16
#define HOST_DEVICE_INLINE
Definition func_attributes.h:15
#define UNUSED
Definition func_attributes.h:4
Volume size3_t
Definition host_datatypes.h:76
static int FILE * file
Definition string_vec.h:120
char line[10000]
Definition string_vec.h:122