QUDA  1.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
int_fastdiv Class Reference

#include <fast_intdiv.h>

Public Member Functions

__host__ __device__ __forceinline__ int_fastdiv (int divisor=0)
 
__host__ __device__ __forceinline__ int_fastdivoperator= (int divisor)
 
__host__ __device__ __forceinline__ operator int () const
 

Private Member Functions

__host__ __device__ __forceinline__ void update_magic_numbers ()
 

Private Attributes

int d
 
int M
 
int s
 
int n_add_sign
 

Friends

__host__ __device__ __forceinline__ friend int operator/ (const int divident, const int_fastdiv &divisor)
 

Detailed Description

Definition at line 20 of file fast_intdiv.h.

Constructor & Destructor Documentation

◆ int_fastdiv()

__host__ __device__ __forceinline__ int_fastdiv::int_fastdiv ( int  divisor = 0)
inline

Definition at line 25 of file fast_intdiv.h.

References update_magic_numbers().

Here is the call graph for this function:

Member Function Documentation

◆ operator int()

__host__ __device__ __forceinline__ int_fastdiv::operator int ( ) const
inline

Definition at line 40 of file fast_intdiv.h.

References d.

◆ operator=()

__host__ __device__ __forceinline__ int_fastdiv& int_fastdiv::operator= ( int  divisor)
inline

Definition at line 32 of file fast_intdiv.h.

References d, and update_magic_numbers().

Here is the call graph for this function:

◆ update_magic_numbers()

__host__ __device__ __forceinline__ void int_fastdiv::update_magic_numbers ( )
inlineprivate

Definition at line 53 of file fast_intdiv.h.

References quda::abs(), M, and operator/.

Referenced by int_fastdiv(), and operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator/

__host__ __device__ __forceinline__ friend int operator/ ( const int  divident,
const int_fastdiv divisor 
)
friend

Definition at line 118 of file fast_intdiv.h.

Referenced by update_magic_numbers().

Member Data Documentation

◆ d

int int_fastdiv::d
private

Definition at line 46 of file fast_intdiv.h.

Referenced by operator int(), and operator=().

◆ M

int int_fastdiv::M
private

Definition at line 47 of file fast_intdiv.h.

Referenced by operator/(), and update_magic_numbers().

◆ n_add_sign

int int_fastdiv::n_add_sign
private

Definition at line 49 of file fast_intdiv.h.

Referenced by operator/().

◆ s

int int_fastdiv::s
private

Definition at line 48 of file fast_intdiv.h.

Referenced by operator/().


The documentation for this class was generated from the following file: