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

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

Functions

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

Detailed Description

gpu (CUDA) versions of primitive functions

Function Documentation

◆ Accumulate()

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

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()

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

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()

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

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