Extension: ExBLAS
#include "dg/algorithm.h" (or as a standalone library as "dg/exblas/exblas.h")
Loading...
Searching...
No Matches
dg::exblas::gpu Namespace Reference

gpu (CUDA) versions of primitive functions More...

Functions

__device__ void Accumulate (int64_t *accumulator, double x, int stride=1)
 Accumulate a double to the superaccumulator (GPU version)
 
__device__ int Normalize (int64_t *accumulator, int &imin, int &imax, int stride=1)
 Normalize a superaccumulator (GPU version)
 
__device__ double Round (int64_t *accumulator)
 Convert a superaccumulator to the nearest double precision number (GPU version)
 

Detailed Description

gpu (CUDA) versions of primitive functions

Function Documentation

◆ Accumulate()

__device__ void dg::exblas::gpu::Accumulate ( int64_t * accumulator,
double x,
int stride = 1 )
inline

Accumulate a double to the superaccumulator (GPU version)

Parameters
accumulatora pointer to at least BIN_COUNT 64 bit integers on the GPU (representing the superaccumulator)
xthe double to add to the superaccumulator
stridestride in which accumulator is to be accessed

◆ Normalize()

__device__ int dg::exblas::gpu::Normalize ( int64_t * accumulator,
int & imin,
int & imax,
int stride = 1 )
inline

Normalize a superaccumulator (GPU version)

Parameters
accumulatora pointer to at least BIN_COUNT 64 bit integers on the GPU (representing the superaccumulator)
iminthe first index in the accumulator
imaxthe last index in the accumulator
stridestrid in which the superaccumulator is accessed
Returns
carry in bit (sign)

◆ Round()

__device__ double dg::exblas::gpu::Round ( int64_t * accumulator)
inline

Convert a superaccumulator to the nearest double precision number (GPU version)

Parameters
accumulatora pointer to at least BIN_COUNT 64 bit integers on the GPU (representing the superaccumulator)
Returns
the double precision number nearest to the superaccumulator