23 template <
typename T,
typename U>
28 auto remainder = val % alignment;
29 result = alignment - remainder;
30 result *= (remainder != 0);
36 template <
typename T,
typename U>
44 template <
typename T,
typename U>
48 if (alignment != 0) { result = val % alignment; }
53 template <
typename T,
typename U>
#define DEVICE
Definition: gpu_support.hpp:35
#define HOST
Definition: gpu_support.hpp:34
Definition: buffer.hpp:35
HOST DEVICE auto padded_size(T val, U alignment)
Definition: padding.hpp:37
HOST DEVICE auto downpadded_size(T val, U alignment)
Definition: padding.hpp:54
HOST DEVICE auto downpadding_size(T val, U alignment)
Definition: padding.hpp:45
HOST DEVICE auto padding_size(T val, U alignment)
Definition: padding.hpp:24