Fast division + modulus operation Host code pre-computes values to avoid expensive operations in kernel code. More...
#include <fastmath.hpp>
Public Member Functions | |
| FastDivMod () | |
| Constructor, called in Hostcode to pre-compute multiplier and shift_right;. | |
| FastDivMod (int divisor_) | |
| operator int () const | |
| __XETLA_API KERNEL_FUNC void | fast_divmod (int "ient, int &remainder, int dividend) const |
| Kernel side function to find quotient and remainder. | |
| __XETLA_API KERNEL_FUNC int | div (int dividend) const |
| kernel side utility functions for query of quotient | |
Public Attributes | |
| int | divisor |
| unsigned int | multiplier |
| unsigned int | shift_right |
Fast division + modulus operation Host code pre-computes values to avoid expensive operations in kernel code.
|
inline |
Constructor, called in Hostcode to pre-compute multiplier and shift_right;.
|
inline |
|
inline |
kernel side utility functions for query of quotient
|
inline |
Kernel side function to find quotient and remainder.
|
inline |
| int gpu::xetla::FastDivMod::divisor |
| unsigned int gpu::xetla::FastDivMod::multiplier |
| unsigned int gpu::xetla::FastDivMod::shift_right |