blob: 30f00ca57f2c0a091e5500211ec2c85b581f9327 [file] [log] [blame]
#ifndef THC_DEVICE_UTILS_INC
#define THC_DEVICE_UTILS_INC
/* The largest consecutive integer representable in float32 (2^24) */
#define FLOAT32_MAX_CONSECUTIVE_INT 16777216.0f
/**
Computes ceil(a / b)
*/
template <typename T>
__host__ __device__ __forceinline__ T THCCeilDiv(T a, T b) {
return (a + b - 1) / b;
}
#endif // THC_DEVICE_UTILS_INC