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

cpu versions of the primitive functions More...

Functions

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

Detailed Description

cpu versions of the primitive functions

Function Documentation

◆ Accumulate()

static void dg::exblas::cpu::Accumulate ( int64_t *  accumulator,
double  x 
)
inlinestatic

Accumulate a double to the superaccumulator.

Parameters
accumulatora pointer to at least BIN_COUNT 64 bit integers on the CPU (representing the superaccumulator)
xthe double to add to the superaccumulator

◆ Normalize()

static bool dg::exblas::cpu::Normalize ( int64_t *  accumulator,
int &  imin,
int &  imax 
)
inlinestatic

Normalize a superaccumulator.

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

◆ Round()

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

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

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