ReproBLAS
|
binned.h defines the binned types and the lower level functions associated with their use. More...
#include <stddef.h>
#include <stdlib.h>
#include <float.h>
Go to the source code of this file.
Macros | |
#define | DBWIDTH 40 |
Binned double precision bin width. More... | |
#define | SBWIDTH 13 |
Binned single precision bin width. More... | |
#define | binned_DBMAXINDEX (((DBL_MAX_EXP - DBL_MIN_EXP + DBL_MANT_DIG - 1)/DBWIDTH) - 1) |
Binned double precision maximum index. More... | |
#define | binned_SBMAXINDEX (((FLT_MAX_EXP - FLT_MIN_EXP + FLT_MANT_DIG - 1)/SBWIDTH) - 1) |
Binned single precision maximum index. More... | |
#define | binned_DBMAXFOLD (binned_DBMAXINDEX + 1) |
The maximum double precision fold supported by the library. More... | |
#define | binned_SBMAXFOLD (binned_SBMAXINDEX + 1) |
The maximum single precision fold supported by the library. More... | |
#define | binned_DBENDURANCE (1 << (DBL_MANT_DIG - DBWIDTH - 2)) |
Binned double precision deposit endurance. More... | |
#define | binned_SBENDURANCE (1 << (FLT_MANT_DIG - SBWIDTH - 2)) |
Binned single precision deposit endurance. More... | |
#define | binned_DBCAPACITY (binned_DBENDURANCE*(1.0/DBL_EPSILON - 1.0)) |
Binned double precision capacity. More... | |
#define | binned_SBCAPACITY (binned_SBENDURANCE*(1.0/FLT_EPSILON - 1.0)) |
Binned single precision capacity. More... | |
#define | binned_DMCOMPRESSION (1.0/(1 << (DBL_MANT_DIG - DBWIDTH + 1))) |
Binned double precision compression factor. More... | |
#define | binned_SMCOMPRESSION (1.0/(1 << (FLT_MANT_DIG - SBWIDTH + 1))) |
Binned single precision compression factor. More... | |
#define | binned_DMEXPANSION (1.0*(1 << (DBL_MANT_DIG - DBWIDTH + 1))) |
Binned double precision expansion factor. More... | |
#define | binned_SMEXPANSION (1.0*(1 << (FLT_MANT_DIG - SBWIDTH + 1))) |
Binned single precision expansion factor. More... | |
Typedefs | |
typedef double | double_binned |
The binned double datatype. More... | |
typedef double | double_complex_binned |
The binned complex double datatype. More... | |
typedef float | float_binned |
The binned float datatype. More... | |
typedef float | float_complex_binned |
The binned complex float datatype. More... | |
Functions | |
size_t | binned_dbsize (const int fold) |
binned double precision size More... | |
size_t | binned_zbsize (const int fold) |
binned complex double precision size More... | |
size_t | binned_sbsbze (const int fold) |
binned single precision size More... | |
size_t | binned_cbsize (const int fold) |
binned complex single precision size More... | |
double_binned * | binned_dballoc (const int fold) |
binned double precision allocation More... | |
double_complex_binned * | binned_zballoc (const int fold) |
binned complex double precision allocation More... | |
float_binned * | binned_sballoc (const int fold) |
binned single precision allocation More... | |
float_complex_binned * | binned_cballoc (const int fold) |
binned complex single precision allocation More... | |
int | binned_dbnum (const int fold) |
binned double precision size More... | |
int | binned_zbnum (const int fold) |
binned complex double precision size More... | |
int | binned_sbnum (const int fold) |
binned single precision size More... | |
int | binned_cbnum (const int fold) |
binned complex single precision size More... | |
double | binned_dbbound (const int fold, const int N, const double X, const double S) |
Get binned double precision summation error bound. More... | |
float | binned_sbbound (const int fold, const int N, const float X, const float S) |
Get binned single precision summation error bound. More... | |
const double * | binned_dmbins (const int X) |
Get binned double precision reference bins. More... | |
const float * | binned_smbins (const int X) |
Get binned single precision reference bins. More... | |
int | binned_dindex (const double X) |
Get index of double precision. More... | |
int | binned_dmindex (const double *priX) |
Get index of manually specified binned double precision. More... | |
int | binned_dmindex0 (const double *priX) |
Check if index of manually specified binned double precision is 0. More... | |
int | binned_sindex (const float X) |
Get index of single precision. More... | |
int | binned_smindex (const float *priX) |
Get index of manually specified binned single precision. More... | |
int | binned_smindex0 (const float *priX) |
Check if index of manually specified binned single precision is 0. More... | |
int | binned_dmdenorm (const int fold, const double *priX) |
Check if binned type has denormal bits. More... | |
int | binned_zmdenorm (const int fold, const double *priX) |
Check if binned type has denormal bits. More... | |
int | binned_smdenorm (const int fold, const float *priX) |
Check if binned type has denormal bits. More... | |
int | binned_cmdenorm (const int fold, const float *priX) |
Check if binned type has denormal bits. More... | |
void | binned_dbprint (const int fold, const double_binned *X) |
Print binned double precision. More... | |
void | binned_dmprint (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX) |
Print manually specified binned double precision. More... | |
void | binned_zbprint (const int fold, const double_complex_binned *X) |
Print binned complex double precision. More... | |
void | binned_zmprint (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX) |
Print manually specified binned complex double precision. More... | |
void | binned_sbprint (const int fold, const float_binned *X) |
Print binned single precision. More... | |
void | binned_smprint (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX) |
Print manually specified binned single precision. More... | |
void | binned_cbprint (const int fold, const float_complex_binned *X) |
Print binned complex single precision. More... | |
void | binned_cmprint (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX) |
Print manually specified binned complex single precision. More... | |
void | binned_dbdbset (const int fold, const double_binned *X, double_binned *Y) |
Set binned double precision (Y = X) More... | |
void | binned_dmdmset (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX, double *priY, const int incpriY, double *carY, const int inccarY) |
Set manually specified binned double precision (Y = X) More... | |
void | binned_zbzbset (const int fold, const double_complex_binned *X, double_complex_binned *Y) |
Set binned complex double precision (Y = X) More... | |
void | binned_zmzmset (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX, double *priY, const int incpriY, double *carY, const int inccarY) |
Set manually specified binned complex double precision (Y = X) More... | |
void | binned_zbdbset (const int fold, const double_binned *X, double_complex_binned *Y) |
Set binned complex double precision to binned double precision (Y = X) More... | |
void | binned_zmdmset (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX, double *priY, const int incpriY, double *carY, const int inccarY) |
Set manually specified binned complex double precision to manually specified binned double precision (Y = X) More... | |
void | binned_sbsbset (const int fold, const float_binned *X, float_binned *Y) |
Set binned single precision (Y = X) More... | |
void | binned_smsmset (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX, float *priY, const int incpriY, float *carY, const int inccarY) |
Set manually specified binned single precision (Y = X) More... | |
void | binned_cbcbset (const int fold, const float_complex_binned *X, float_complex_binned *Y) |
Set binned complex single precision (Y = X) More... | |
void | binned_cmcmset (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX, float *priY, const int incpriY, float *carY, const int inccarY) |
Set manually specified binned complex single precision (Y = X) More... | |
void | binned_cbsbset (const int fold, const float_binned *X, float_complex_binned *Y) |
Set binned complex single precision to binned single precision (Y = X) More... | |
void | binned_cmsmset (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX, float *priY, const int incpriY, float *carY, const int inccarY) |
Set manually specified binned complex single precision to manually specified binned single precision (Y = X) More... | |
void | binned_dbsetzero (const int fold, double_binned *X) |
Set binned double precision to 0 (X = 0) More... | |
void | binned_dmsetzero (const int fold, double *priX, const int incpriX, double *carX, const int inccarX) |
Set manually specified binned double precision to 0 (X = 0) More... | |
void | binned_zbsetzero (const int fold, double_complex_binned *X) |
Set binned double precision to 0 (X = 0) More... | |
void | binned_zmsetzero (const int fold, double *priX, const int incpriX, double *carX, const int inccarX) |
Set manually specified binned complex double precision to 0 (X = 0) More... | |
void | binned_sbsetzero (const int fold, float_binned *X) |
Set binned single precision to 0 (X = 0) More... | |
void | binned_smsetzero (const int fold, float *priX, const int incpriX, float *carX, const int inccarX) |
Set manually specified binned single precision to 0 (X = 0) More... | |
void | binned_cbsetzero (const int fold, float_complex_binned *X) |
Set binned single precision to 0 (X = 0) More... | |
void | binned_cmsetzero (const int fold, float *priX, const int incpriX, float *carX, const int inccarX) |
Set manually specified binned complex single precision to 0 (X = 0) More... | |
void | binned_dbdbadd (const int fold, const double_binned *X, double_binned *Y) |
Add binned double precision (Y += X) More... | |
void | binned_dmdmadd (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX, double *priY, const int incpriY, double *carY, const int inccarY) |
Add manually specified binned double precision (Y += X) More... | |
void | binned_zbzbadd (const int fold, const double_complex_binned *X, double_complex_binned *Y) |
Add binned complex double precision (Y += X) More... | |
void | binned_zmzmadd (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX, double *priY, const int incpriY, double *carY, const int inccarY) |
Add manually specified binned complex double precision (Y += X) More... | |
void | binned_sbsbadd (const int fold, const float_binned *X, float_binned *Y) |
Add binned single precision (Y += X) More... | |
void | binned_smsmadd (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX, float *priY, const int incpriY, float *carY, const int inccarY) |
Add manually specified binned single precision (Y += X) More... | |
void | binned_cbcbadd (const int fold, const float_complex_binned *X, float_complex_binned *Y) |
Add binned complex single precision (Y += X) More... | |
void | binned_cmcmadd (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX, float *priY, const int incpriY, float *carY, const int inccarY) |
Add manually specified binned complex single precision (Y += X) More... | |
void | binned_dbdbaddv (const int fold, const int N, const double_binned *X, const int incX, double_binned *Y, const int incY) |
Add binned double precision vectors (Y += X) More... | |
void | binned_zbzbaddv (const int fold, const int N, const double_complex_binned *X, const int incX, double_complex_binned *Y, const int incY) |
Add binned complex double precision vectors (Y += X) More... | |
void | binned_sbsbaddv (const int fold, const int N, const float_binned *X, const int incX, float_binned *Y, const int incY) |
Add binned single precision vectors (Y += X) More... | |
void | binned_cbcbaddv (const int fold, const int N, const float_complex_binned *X, const int incX, float_complex_binned *Y, const int incY) |
Add binned complex single precision vectors (Y += X) More... | |
void | binned_dbdadd (const int fold, const double X, double_binned *Y) |
Add double precision to binned double precision (Y += X) More... | |
void | binned_dmdadd (const int fold, const double X, double *priY, const int incpriY, double *carY, const int inccarY) |
Add double precision to manually specified binned double precision (Y += X) More... | |
void | binned_zbzadd (const int fold, const void *X, double_complex_binned *Y) |
Add complex double precision to binned complex double precision (Y += X) More... | |
void | binned_zmzadd (const int fold, const void *X, double *priY, const int incpriY, double *carY, const int inccarY) |
Add complex double precision to manually specified binned complex double precision (Y += X) More... | |
void | binned_sbsadd (const int fold, const float X, float_binned *Y) |
Add single precision to binned single precision (Y += X) More... | |
void | binned_smsadd (const int fold, const float X, float *priY, const int incpriY, float *carY, const int inccarY) |
Add single precision to manually specified binned single precision (Y += X) More... | |
void | binned_cbcadd (const int fold, const void *X, float_complex_binned *Y) |
Add complex single precision to binned complex single precision (Y += X) More... | |
void | binned_cmcadd (const int fold, const void *X, float *priY, const int incpriY, float *carY, const int inccarY) |
Add complex single precision to manually specified binned complex single precision (Y += X) More... | |
void | binned_dbdupdate (const int fold, const double X, double_binned *Y) |
Update binned double precision with double precision (X -> Y) More... | |
void | binned_dmdupdate (const int fold, const double X, double *priY, const int incpriY, double *carY, const int inccarY) |
Update manually specified binned double precision with double precision (X -> Y) More... | |
void | binned_zbzupdate (const int fold, const void *X, double_complex_binned *Y) |
Update binned complex double precision with complex double precision (X -> Y) More... | |
void | binned_zmzupdate (const int fold, const void *X, double *priY, const int incpriY, double *carY, const int inccarY) |
Update manually specified binned complex double precision with complex double precision (X -> Y) More... | |
void | binned_zbdupdate (const int fold, const double X, double_complex_binned *Y) |
Update binned complex double precision with double precision (X -> Y) More... | |
void | binned_zmdupdate (const int fold, const double X, double *priY, const int incpriY, double *carY, const int inccarY) |
Update manually specified binned complex double precision with double precision (X -> Y) More... | |
void | binned_sbsupdate (const int fold, const float X, float_binned *Y) |
Update binned single precision with single precision (X -> Y) More... | |
void | binned_smsupdate (const int fold, const float X, float *priY, const int incpriY, float *carY, const int inccarY) |
Update manually specified binned single precision with single precision (X -> Y) More... | |
void | binned_cbcupdate (const int fold, const void *X, float_complex_binned *Y) |
Update binned complex single precision with complex single precision (X -> Y) More... | |
void | binned_cmcupdate (const int fold, const void *X, float *priY, const int incpriY, float *carY, const int inccarY) |
Update manually specified binned complex single precision with complex single precision (X -> Y) More... | |
void | binned_cbsupdate (const int fold, const float X, float_complex_binned *Y) |
Update binned complex single precision with single precision (X -> Y) More... | |
void | binned_cmsupdate (const int fold, const float X, float *priY, const int incpriY, float *carY, const int inccarY) |
Update manually specified binned complex single precision with single precision (X -> Y) More... | |
void | binned_dbddeposit (const int fold, const double X, double_binned *Y) |
Add double precision to suitably binned binned double precision (Y += X) More... | |
void | binned_dmddeposit (const int fold, const double X, double *priY, const int incpriY) |
Add double precision to suitably binned manually specified binned double precision (Y += X) More... | |
void | binned_zbzdeposit (const int fold, const void *X, double_complex_binned *Y) |
Add complex double precision to suitably binned binned complex double precision (Y += X) More... | |
void | binned_zmzdeposit (const int fold, const void *X, double *priY, const int incpriY) |
Add complex double precision to suitably binned manually specified binned complex double precision (Y += X) More... | |
void | binned_sbsdeposit (const int fold, const float X, float_binned *Y) |
Add single precision to suitably binned binned single precision (Y += X) More... | |
void | binned_smsdeposit (const int fold, const float X, float *priY, const int incpriY) |
Add single precision to suitably binned manually specified binned single precision (Y += X) More... | |
void | binned_cbcdeposit (const int fold, const void *X, float_complex_binned *Y) |
Add complex single precision to suitably binned binned complex single precision (Y += X) More... | |
void | binned_cmcdeposit (const int fold, const void *X, float *priY, const int incpriY) |
Add complex single precision to suitably binned manually specified binned complex single precision (Y += X) More... | |
void | binned_dbrenorm (const int fold, double_binned *X) |
Renormalize binned double precision. More... | |
void | binned_dmrenorm (const int fold, double *priX, const int incpriX, double *carX, const int inccarX) |
Renormalize manually specified binned double precision. More... | |
void | binned_zbrenorm (const int fold, double_complex_binned *X) |
Renormalize binned complex double precision. More... | |
void | binned_zmrenorm (const int fold, double *priX, const int incpriX, double *carX, const int inccarX) |
Renormalize manually specified binned complex double precision. More... | |
void | binned_sbrenorm (const int fold, float_binned *X) |
Renormalize binned single precision. More... | |
void | binned_smrenorm (const int fold, float *priX, const int incpriX, float *carX, const int inccarX) |
Renormalize manually specified binned single precision. More... | |
void | binned_cbrenorm (const int fold, float_complex_binned *X) |
Renormalize binned complex single precision. More... | |
void | binned_cmrenorm (const int fold, float *priX, const int incpriX, float *carX, const int inccarX) |
Renormalize manually specified binned complex single precision. More... | |
void | binned_dbdconv (const int fold, const double X, double_binned *Y) |
Convert double precision to binned double precision (X -> Y) More... | |
void | binned_dmdconv (const int fold, const double X, double *priY, const int incpriY, double *carY, const int inccarY) |
Convert double precision to manually specified binned double precision (X -> Y) More... | |
void | binned_zbzconv (const int fold, const void *X, double_complex_binned *Y) |
Convert complex double precision to binned complex double precision (X -> Y) More... | |
void | binned_zmzconv (const int fold, const void *X, double *priY, const int incpriY, double *carY, const int inccarY) |
Convert complex double precision to manually specified binned complex double precision (X -> Y) More... | |
void | binned_sbsconv (const int fold, const float X, float_binned *Y) |
Convert single precision to binned single precision (X -> Y) More... | |
void | binned_smsconv (const int fold, const float X, float *priY, const int incpriY, float *carY, const int inccarY) |
Convert single precision to manually specified binned single precision (X -> Y) More... | |
void | binned_cbcconv (const int fold, const void *X, float_complex_binned *Y) |
Convert complex single precision to binned complex single precision (X -> Y) More... | |
void | binned_cmcconv (const int fold, const void *X, float *priY, const int incpriY, float *carY, const int inccarY) |
Convert complex single precision to manually specified binned complex single precision (X -> Y) More... | |
double | binned_ddbconv (const int fold, const double_binned *X) |
Convert binned double precision to double precision (X -> Y) More... | |
double | binned_ddmconv (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX) |
Convert manually specified binned double precision to double precision (X -> Y) More... | |
void | binned_zzbconv_sub (const int fold, const double_complex_binned *X, void *conv) |
Convert binned complex double precision to complex double precision (X -> Y) More... | |
void | binned_zzmconv_sub (const int fold, const double *priX, const int incpriX, const double *carX, const int inccarX, void *conv) |
Convert manually specified binned complex double precision to complex double precision (X -> Y) More... | |
float | binned_ssbconv (const int fold, const float_binned *X) |
Convert binned single precision to single precision (X -> Y) More... | |
float | binned_ssmconv (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX) |
Convert manually specified binned single precision to single precision (X -> Y) More... | |
void | binned_ccbconv_sub (const int fold, const float_complex_binned *X, void *conv) |
Convert binned complex single precision to complex single precision (X -> Y) More... | |
void | binned_ccmconv_sub (const int fold, const float *priX, const int incpriX, const float *carX, const int inccarX, void *conv) |
Convert manually specified binned complex single precision to complex single precision (X -> Y) More... | |
void | binned_dbnegate (const int fold, double_binned *X) |
Negate binned double precision (X = -X) More... | |
void | binned_dmnegate (const int fold, double *priX, const int incpriX, double *carX, const int inccarX) |
Negate manually specified binned double precision (X = -X) More... | |
void | binned_zbnegate (const int fold, double_complex_binned *X) |
Negate binned complex double precision (X = -X) More... | |
void | binned_zmnegate (const int fold, double *priX, const int incpriX, double *carX, const int inccarX) |
Negate manually specified binned complex double precision (X = -X) More... | |
void | binned_sbnegate (const int fold, float_binned *X) |
Negate binned single precision (X = -X) More... | |
void | binned_smnegate (const int fold, float *priX, const int incpriX, float *carX, const int inccarX) |
Negate manually specified binned single precision (X = -X) More... | |
void | binned_cbnegate (const int fold, float_complex_binned *X) |
Negate binned complex single precision (X = -X) More... | |
void | binned_cmnegate (const int fold, float *priX, const int incpriX, float *carX, const int inccarX) |
Negate manually specified binned complex single precision (X = -X) More... | |
double | binned_dscale (const double X) |
Get a reproducible double precision scale. More... | |
float | binned_sscale (const float X) |
Get a reproducible single precision scale. More... | |
void | binned_dmdrescale (const int fold, const double X, const double scaleY, double *priY, const int incpriY, double *carY, const int inccarY) |
rescale manually specified binned double precision sum of squares More... | |
void | binned_zmdrescale (const int fold, const double X, const double scaleY, double *priY, const int incpriY, double *carY, const int inccarY) |
rescale manually specified binned complex double precision sum of squares More... | |
void | binned_smsrescale (const int fold, const float X, const float scaleY, float *priY, const int incpriY, float *carY, const int inccarY) |
rescale manually specified binned single precision sum of squares More... | |
void | binned_cmsrescale (const int fold, const float X, const float scaleY, float *priY, const int incpriY, float *carY, const int inccarY) |
rescale manually specified binned complex single precision sum of squares More... | |
double | binned_dmdmaddsq (const int fold, const double scaleX, const double *priX, const int incpriX, const double *carX, const int inccarX, const double scaleY, double *priY, const int incpriY, double *carY, const int inccarY) |
Add manually specified binned double precision scaled sums of squares (Y += X) More... | |
double | binned_dbdbaddsq (const int fold, const double scaleX, const double_binned *X, const double scaleY, double_binned *Y) |
Add binned double precision scaled sums of squares (Y += X) More... | |
float | binned_smsmaddsq (const int fold, const float scaleX, const float *priX, const int incpriX, const float *carX, const int inccarX, const float scaleY, float *priY, const int incpriY, float *carY, const int inccarY) |
Add manually specified binned single precision scaled sums of squares (Y += X) More... | |
float | binned_sbsbaddsq (const int fold, const float scaleX, const float_binned *X, const float scaleY, float_binned *Y) |
Add binned single precision scaled sums of squares (Y += X) More... | |
double | binned_ufp (const double X) |
unit in the first place More... | |
float | binned_ufpf (const float X) |
unit in the first place More... | |
binned.h defines the binned types and the lower level functions associated with their use.
This header is modeled after cblas.h, and as such functions are prefixed with character sets describing the data types they operate upon. For example, the function dfoo
would perform the function foo
on double
possibly returning a double
.
If two character sets are prefixed, the first set of characters describes the output and the second the input type. For example, the function dzbar
would perform the function bar
on double
complex
and return a double
.
Such character sets are listed as follows:
double
)*void
)float
)*void
)double
, double
)double
, double
)float
, float
)float
, float
)Throughout the library, complex types are specified via *void
pointers. These routines will sometimes be suffixed by sub, to represent that a function has been made into a subroutine. This allows programmers to use whatever complex types they are already using, as long as the memory pointed to is of the form of two adjacent floating point types, the first and second representing real and imaginary components of the complex number.
The goal of using binned types is to obtain either more accurate or reproducible summation of floating point numbers. In reproducible summation, floating point numbers are split into several slices along predefined boundaries in the exponent range. The space between two boundaries is called a bin. Binned types are composed of several accumulators, each accumulating the slices in a particular bin. The accumulators correspond to the largest consecutive nonzero bins seen so far.
The parameter fold
describes how many accumulators are used in the binned types supplied to a subroutine (an binned type with k
accumulators is k-fold
). The default value for this parameter can be set in config.h. If you are unsure of what value to use for fold
, we recommend 3. Note that the fold
of binned types must be the same for all binned types that interact with each other. Operations on more than one binned type assume all binned types being operated upon have the same fold
. Note that the fold
of an binned type may not be changed once the type has been allocated. A common use case would be to set the value of fold
as a global macro in your code and supply it to all binned functions that you use.
Power users of the library may find themselves wanting to manually specify the underlying primary and carry vectors of an binned type themselves. If you do not know what these are, don't worry about the manually specified binned types.
#define binned_DBCAPACITY (binned_DBENDURANCE*(1.0/DBL_EPSILON - 1.0)) |
Binned double precision capacity.
The maximum number of double precision numbers that can be summed using binned double precision. Applies also to binned complex double precision.
#define binned_DBENDURANCE (1 << (DBL_MANT_DIG - DBWIDTH - 2)) |
Binned double precision deposit endurance.
The number of deposits that can be performed before a renorm is necessary. Applies also to binned complex double precision.
#define binned_DBMAXFOLD (binned_DBMAXINDEX + 1) |
The maximum double precision fold supported by the library.
#define binned_DBMAXINDEX (((DBL_MAX_EXP - DBL_MIN_EXP + DBL_MANT_DIG - 1)/DBWIDTH) - 1) |
Binned double precision maximum index.
maximum index (inclusive)
#define binned_DMCOMPRESSION (1.0/(1 << (DBL_MANT_DIG - DBWIDTH + 1))) |
Binned double precision compression factor.
This factor is used to scale down inputs before deposition into the bin of highest index
#define binned_DMEXPANSION (1.0*(1 << (DBL_MANT_DIG - DBWIDTH + 1))) |
Binned double precision expansion factor.
This factor is used to scale up inputs after deposition into the bin of highest index
#define binned_SBCAPACITY (binned_SBENDURANCE*(1.0/FLT_EPSILON - 1.0)) |
Binned single precision capacity.
The maximum number of single precision numbers that can be summed using binned single precision. Applies also to binned complex double precision.
#define binned_SBENDURANCE (1 << (FLT_MANT_DIG - SBWIDTH - 2)) |
Binned single precision deposit endurance.
The number of deposits that can be performed before a renorm is necessary. Applies also to binned complex single precision.
#define binned_SBMAXFOLD (binned_SBMAXINDEX + 1) |
The maximum single precision fold supported by the library.
#define binned_SBMAXINDEX (((FLT_MAX_EXP - FLT_MIN_EXP + FLT_MANT_DIG - 1)/SBWIDTH) - 1) |
Binned single precision maximum index.
maximum index (inclusive)
#define binned_SMCOMPRESSION (1.0/(1 << (FLT_MANT_DIG - SBWIDTH + 1))) |
Binned single precision compression factor.
This factor is used to scale down inputs before deposition into the bin of highest index
#define binned_SMEXPANSION (1.0*(1 << (FLT_MANT_DIG - SBWIDTH + 1))) |
Binned single precision expansion factor.
This factor is used to scale up inputs after deposition into the bin of highest index
#define DBWIDTH 40 |
Binned double precision bin width.
bin width (in bits)
#define SBWIDTH 13 |
Binned single precision bin width.
bin width (in bits)
typedef double double_binned |
The binned double datatype.
To allocate a double_binned, call binned_dballoc()
double
. Therefore, if you have defined an array of double_binned, you must index it by multiplying the index into the array by the number of underlying double
that make up the double_binned. This number can be obtained by a call to binned_dbnum() typedef double double_complex_binned |
The binned complex double datatype.
To allocate a double_complex_binned, call binned_zballoc()
double
. Therefore, if you have defined an array of double_complex_binned, you must index it by multiplying the index into the array by the number of underlying double
that make up the double_complex_binned. This number can be obtained by a call to binned_zbnum() typedef float float_binned |
The binned float datatype.
To allocate a float_binned, call binned_sballoc()
float
. Therefore, if you have defined an array of float_binned, you must index it by multiplying the index into the array by the number of underlying float
that make up the float_binned. This number can be obtained by a call to binned_sbnum() typedef float float_complex_binned |
The binned complex float datatype.
To allocate a float_complex_binned, call binned_cballoc()
float
. Therefore, if you have defined an array of float_complex_binned, you must index it by multiplying the index into the array by the number of underlying float
that make up the float_complex_binned. This number can be obtained by a call to binned_cbnum() float_complex_binned* binned_cballoc | ( | const int | fold | ) |
binned complex single precision allocation
fold | the fold of the binned type |
free()
)void binned_cbcadd | ( | const int | fold, |
const void * | X, | ||
float_complex_binned * | Y | ||
) |
Add complex single precision to binned complex single precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_cbcbadd | ( | const int | fold, |
const float_complex_binned * | X, | ||
float_complex_binned * | Y | ||
) |
Add binned complex single precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_cbcbaddv | ( | const int | fold, |
const int | N, | ||
const float_complex_binned * | X, | ||
const int | incX, | ||
float_complex_binned * | Y, | ||
const int | incY | ||
) |
Add binned complex single precision vectors (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
N | vector length |
X | binned vector X |
incX | X vector stride (use every incX'th element) |
Y | binned vector Y |
incY | Y vector stride (use every incY'th element) |
void binned_cbcbset | ( | const int | fold, |
const float_complex_binned * | X, | ||
float_complex_binned * | Y | ||
) |
Set binned complex single precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_cbcconv | ( | const int | fold, |
const void * | X, | ||
float_complex_binned * | Y | ||
) |
Convert complex single precision to binned complex single precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_cbcdeposit | ( | const int | fold, |
const void * | X, | ||
float_complex_binned * | Y | ||
) |
Add complex single precision to suitably binned binned complex single precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_cbcupdate | ( | const int | fold, |
const void * | X, | ||
float_complex_binned * | Y | ||
) |
Update binned complex single precision with complex single precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value of real and imaginary components less than absolute value of real and imaginary components of X respectively.
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_cbnegate | ( | const int | fold, |
float_complex_binned * | X | ||
) |
Negate binned complex single precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
X | binned scalar X |
int binned_cbnum | ( | const int | fold | ) |
binned complex single precision size
fold | the fold of the binned type |
float
) of the binned typevoid binned_cbprint | ( | const int | fold, |
const float_complex_binned * | X | ||
) |
Print binned complex single precision.
fold | the fold of the binned types |
X | binned scalar X |
void binned_cbrenorm | ( | const int | fold, |
float_complex_binned * | X | ||
) |
Renormalize binned complex single precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
X | binned scalar X |
void binned_cbsbset | ( | const int | fold, |
const float_binned * | X, | ||
float_complex_binned * | Y | ||
) |
Set binned complex single precision to binned single precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_cbsetzero | ( | const int | fold, |
float_complex_binned * | X | ||
) |
Set binned single precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
X | binned scalar X |
size_t binned_cbsize | ( | const int | fold | ) |
binned complex single precision size
fold | the fold of the binned type |
void binned_cbsupdate | ( | const int | fold, |
const float | X, | ||
float_complex_binned * | Y | ||
) |
Update binned complex single precision with single precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_ccbconv_sub | ( | const int | fold, |
const float_complex_binned * | X, | ||
void * | conv | ||
) |
Convert binned complex single precision to complex single precision (X -> Y)
fold | the fold of the binned types |
X | binned scalar X |
conv | scalar return |
void binned_ccmconv_sub | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
void * | conv | ||
) |
Convert manually specified binned complex single precision to complex single precision (X -> Y)
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
conv | scalar return |
void binned_cmcadd | ( | const int | fold, |
const void * | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Add complex single precision to manually specified binned complex single precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_cmcconv | ( | const int | fold, |
const void * | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Convert complex single precision to manually specified binned complex single precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_cmcdeposit | ( | const int | fold, |
const void * | X, | ||
float * | priY, | ||
const int | incpriY | ||
) |
Add complex single precision to suitably binned manually specified binned complex single precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
void binned_cmcmadd | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Add manually specified binned complex single precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_cmcmset | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Set manually specified binned complex single precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_cmcupdate | ( | const int | fold, |
const void * | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Update manually specified binned complex single precision with complex single precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value of real and imaginary components less than absolute value of real and imaginary components of X respectively.
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
int binned_cmdenorm | ( | const int | fold, |
const float * | priX | ||
) |
Check if binned type has denormal bits.
A quick check to determine if calculations involving X cannot be performed with "denormals are zero"
fold | the fold of the binned type |
priX | X's primary vector |
void binned_cmnegate | ( | const int | fold, |
float * | priX, | ||
const int | incpriX, | ||
float * | carX, | ||
const int | inccarX | ||
) |
Negate manually specified binned complex single precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_cmprint | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX | ||
) |
Print manually specified binned complex single precision.
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_cmrenorm | ( | const int | fold, |
float * | priX, | ||
const int | incpriX, | ||
float * | carX, | ||
const int | inccarX | ||
) |
Renormalize manually specified binned complex single precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_cmsetzero | ( | const int | fold, |
float * | priX, | ||
const int | incpriX, | ||
float * | carX, | ||
const int | inccarX | ||
) |
Set manually specified binned complex single precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_cmsmset | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Set manually specified binned complex single precision to manually specified binned single precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_cmsrescale | ( | const int | fold, |
const float | X, | ||
const float | scaleY, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
rescale manually specified binned complex single precision sum of squares
Rescale an binned complex single precision sum of squares Y
fold | the fold of the binned types |
X | Y's new scaleY (X == binned_sscale (f) for some float f) (X >= scaleY) |
scaleY | Y's current scaleY (scaleY == binned_sscale (f) for some float f) (X >= scaleY) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_cmsupdate | ( | const int | fold, |
const float | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Update manually specified binned complex single precision with single precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
double_binned* binned_dballoc | ( | const int | fold | ) |
binned double precision allocation
fold | the fold of the binned type |
free()
)double binned_dbbound | ( | const int | fold, |
const int | N, | ||
const double | X, | ||
const double | S | ||
) |
Get binned double precision summation error bound.
This is a bound on the absolute error of a summation using binned types
fold | the fold of the binned types |
N | the number of double precision floating point summands |
X | the summand of maximum absolute value |
S | the value of the sum computed using binned types |
void binned_dbdadd | ( | const int | fold, |
const double | X, | ||
double_binned * | Y | ||
) |
Add double precision to binned double precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_dbdbadd | ( | const int | fold, |
const double_binned * | X, | ||
double_binned * | Y | ||
) |
Add binned double precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
double binned_dbdbaddsq | ( | const int | fold, |
const double | scaleX, | ||
const double_binned * | X, | ||
const double | scaleY, | ||
double_binned * | Y | ||
) |
Add binned double precision scaled sums of squares (Y += X)
Performs the operation Y += X, where X and Y represent scaled sums of squares.
fold | the fold of the binned types |
scaleX | scale of X (scaleX == binned_dscale (Z) for some double Z) |
X | binned scalar X |
scaleY | scale of Y (scaleY == binned_dscale (Z) for some double Z) |
Y | binned scalar Y |
void binned_dbdbaddv | ( | const int | fold, |
const int | N, | ||
const double_binned * | X, | ||
const int | incX, | ||
double_binned * | Y, | ||
const int | incY | ||
) |
Add binned double precision vectors (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
N | vector length |
X | binned vector X |
incX | X vector stride (use every incX'th element) |
Y | binned vector Y |
incY | Y vector stride (use every incY'th element) |
void binned_dbdbset | ( | const int | fold, |
const double_binned * | X, | ||
double_binned * | Y | ||
) |
Set binned double precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_dbdconv | ( | const int | fold, |
const double | X, | ||
double_binned * | Y | ||
) |
Convert double precision to binned double precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_dbddeposit | ( | const int | fold, |
const double | X, | ||
double_binned * | Y | ||
) |
Add double precision to suitably binned binned double precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_dbdupdate | ( | const int | fold, |
const double | X, | ||
double_binned * | Y | ||
) |
Update binned double precision with double precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_dbnegate | ( | const int | fold, |
double_binned * | X | ||
) |
Negate binned double precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
X | binned scalar X |
int binned_dbnum | ( | const int | fold | ) |
binned double precision size
fold | the fold of the binned type |
double
) of the binned typevoid binned_dbprint | ( | const int | fold, |
const double_binned * | X | ||
) |
Print binned double precision.
fold | the fold of the binned types |
X | binned scalar X |
void binned_dbrenorm | ( | const int | fold, |
double_binned * | X | ||
) |
Renormalize binned double precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
X | binned scalar X |
void binned_dbsetzero | ( | const int | fold, |
double_binned * | X | ||
) |
Set binned double precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
X | binned scalar X |
size_t binned_dbsize | ( | const int | fold | ) |
binned double precision size
fold | the fold of the binned type |
double binned_ddbconv | ( | const int | fold, |
const double_binned * | X | ||
) |
Convert binned double precision to double precision (X -> Y)
fold | the fold of the binned types |
X | binned scalar X |
double binned_ddmconv | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX | ||
) |
Convert manually specified binned double precision to double precision (X -> Y)
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
int binned_dindex | ( | const double | X | ) |
Get index of double precision.
The index of a non-binned type is the smallest index an binned type would need to have to sum it reproducibly. Higher indicies correspond to smaller bins.
X | scalar X |
const double* binned_dmbins | ( | const int | X | ) |
Get binned double precision reference bins.
returns a pointer to the bins corresponding to the given index
X | index |
void binned_dmdadd | ( | const int | fold, |
const double | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Add double precision to manually specified binned double precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_dmdconv | ( | const int | fold, |
const double | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Convert double precision to manually specified binned double precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_dmddeposit | ( | const int | fold, |
const double | X, | ||
double * | priY, | ||
const int | incpriY | ||
) |
Add double precision to suitably binned manually specified binned double precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
int binned_dmdenorm | ( | const int | fold, |
const double * | priX | ||
) |
Check if binned type has denormal bits.
A quick check to determine if calculations involving X cannot be performed with "denormals are zero"
fold | the fold of the binned type |
priX | X's primary vector |
void binned_dmdmadd | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Add manually specified binned double precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
double binned_dmdmaddsq | ( | const int | fold, |
const double | scaleX, | ||
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
const double | scaleY, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Add manually specified binned double precision scaled sums of squares (Y += X)
Performs the operation Y += X, where X and Y represent scaled sums of squares.
fold | the fold of the binned types |
scaleX | scale of X (scaleX == binned_dscale (Z) for some double Z) |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
scaleY | scale of Y (scaleY == binned_dscale (Z) for some double Z) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_dmdmset | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Set manually specified binned double precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_dmdrescale | ( | const int | fold, |
const double | X, | ||
const double | scaleY, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
rescale manually specified binned double precision sum of squares
Rescale an binned double precision sum of squares Y
fold | the fold of the binned types |
X | Y's new scaleY (X == binned_dscale (f) for some double f) (X >= scaleY) |
scaleY | Y's current scaleY (scaleY == binned_dscale (f) for some double f) (X >= scaleY) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_dmdupdate | ( | const int | fold, |
const double | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Update manually specified binned double precision with double precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
int binned_dmindex | ( | const double * | priX | ) |
Get index of manually specified binned double precision.
The index of an binned type is the bin that it corresponds to. Higher indicies correspond to smaller bins.
priX | X's primary vector |
int binned_dmindex0 | ( | const double * | priX | ) |
Check if index of manually specified binned double precision is 0.
A quick check to determine if the index is 0
priX | X's primary vector |
void binned_dmnegate | ( | const int | fold, |
double * | priX, | ||
const int | incpriX, | ||
double * | carX, | ||
const int | inccarX | ||
) |
Negate manually specified binned double precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_dmprint | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX | ||
) |
Print manually specified binned double precision.
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_dmrenorm | ( | const int | fold, |
double * | priX, | ||
const int | incpriX, | ||
double * | carX, | ||
const int | inccarX | ||
) |
Renormalize manually specified binned double precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_dmsetzero | ( | const int | fold, |
double * | priX, | ||
const int | incpriX, | ||
double * | carX, | ||
const int | inccarX | ||
) |
Set manually specified binned double precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
double binned_dscale | ( | const double | X | ) |
Get a reproducible double precision scale.
For any given X, return a reproducible scaling factor Y of the form
2^(DBWIDTH * z) where z is an integer
such that
Y * 2^(-DBL_MANT_DIG
- DBWIDTH - 1) < X < Y * 2\^(DBWIDTH + 2)
X | double precision number to be scaled |
float_binned* binned_sballoc | ( | const int | fold | ) |
binned single precision allocation
fold | the fold of the binned type |
free()
)float binned_sbbound | ( | const int | fold, |
const int | N, | ||
const float | X, | ||
const float | S | ||
) |
Get binned single precision summation error bound.
This is a bound on the absolute error of a summation using binned types
fold | the fold of the binned types |
N | the number of single precision floating point summands |
X | the summand of maximum absolute value |
S | the value of the sum computed using binned types |
void binned_sbnegate | ( | const int | fold, |
float_binned * | X | ||
) |
Negate binned single precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
X | binned scalar X |
int binned_sbnum | ( | const int | fold | ) |
binned single precision size
fold | the fold of the binned type |
float
) of the binned typevoid binned_sbprint | ( | const int | fold, |
const float_binned * | X | ||
) |
Print binned single precision.
fold | the fold of the binned types |
X | binned scalar X |
void binned_sbrenorm | ( | const int | fold, |
float_binned * | X | ||
) |
Renormalize binned single precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
X | binned scalar X |
void binned_sbsadd | ( | const int | fold, |
const float | X, | ||
float_binned * | Y | ||
) |
Add single precision to binned single precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_sbsbadd | ( | const int | fold, |
const float_binned * | X, | ||
float_binned * | Y | ||
) |
Add binned single precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
float binned_sbsbaddsq | ( | const int | fold, |
const float | scaleX, | ||
const float_binned * | X, | ||
const float | scaleY, | ||
float_binned * | Y | ||
) |
Add binned single precision scaled sums of squares (Y += X)
Performs the operation Y += X, where X and Y represent scaled sums of squares.
fold | the fold of the binned types |
scaleX | scale of X (scaleX == binned_sscale (Z) for some float Z) |
X | binned scalar X |
scaleY | scale of Y (scaleY == binned_sscale (Z) for some float Z) |
Y | binned scalar Y |
void binned_sbsbaddv | ( | const int | fold, |
const int | N, | ||
const float_binned * | X, | ||
const int | incX, | ||
float_binned * | Y, | ||
const int | incY | ||
) |
Add binned single precision vectors (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
N | vector length |
X | binned vector X |
incX | X vector stride (use every incX'th element) |
Y | binned vector Y |
incY | Y vector stride (use every incY'th element) |
void binned_sbsbset | ( | const int | fold, |
const float_binned * | X, | ||
float_binned * | Y | ||
) |
Set binned single precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
size_t binned_sbsbze | ( | const int | fold | ) |
binned single precision size
fold | the fold of the binned type |
void binned_sbsconv | ( | const int | fold, |
const float | X, | ||
float_binned * | Y | ||
) |
Convert single precision to binned single precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_sbsdeposit | ( | const int | fold, |
const float | X, | ||
float_binned * | Y | ||
) |
Add single precision to suitably binned binned single precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_sbsetzero | ( | const int | fold, |
float_binned * | X | ||
) |
Set binned single precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
X | binned scalar X |
void binned_sbsupdate | ( | const int | fold, |
const float | X, | ||
float_binned * | Y | ||
) |
Update binned single precision with single precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
int binned_sindex | ( | const float | X | ) |
Get index of single precision.
The index of a non-binned type is the smallest index an binned type would need to have to sum it reproducibly. Higher indicies correspond to smaller bins.
X | scalar X |
const float* binned_smbins | ( | const int | X | ) |
Get binned single precision reference bins.
returns a pointer to the bins corresponding to the given index
X | index |
int binned_smdenorm | ( | const int | fold, |
const float * | priX | ||
) |
Check if binned type has denormal bits.
A quick check to determine if calculations involving X cannot be performed with "denormals are zero"
fold | the fold of the binned type |
priX | X's primary vector |
int binned_smindex | ( | const float * | priX | ) |
Get index of manually specified binned single precision.
The index of an binned type is the bin that it corresponds to. Higher indicies correspond to smaller bins.
priX | X's primary vector |
int binned_smindex0 | ( | const float * | priX | ) |
Check if index of manually specified binned single precision is 0.
A quick check to determine if the index is 0
priX | X's primary vector |
void binned_smnegate | ( | const int | fold, |
float * | priX, | ||
const int | incpriX, | ||
float * | carX, | ||
const int | inccarX | ||
) |
Negate manually specified binned single precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_smprint | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX | ||
) |
Print manually specified binned single precision.
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_smrenorm | ( | const int | fold, |
float * | priX, | ||
const int | incpriX, | ||
float * | carX, | ||
const int | inccarX | ||
) |
Renormalize manually specified binned single precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_smsadd | ( | const int | fold, |
const float | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Add single precision to manually specified binned single precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_smsconv | ( | const int | fold, |
const float | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Convert single precision to manually specified binned single precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_smsdeposit | ( | const int | fold, |
const float | X, | ||
float * | priY, | ||
const int | incpriY | ||
) |
Add single precision to suitably binned manually specified binned single precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
void binned_smsetzero | ( | const int | fold, |
float * | priX, | ||
const int | incpriX, | ||
float * | carX, | ||
const int | inccarX | ||
) |
Set manually specified binned single precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_smsmadd | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Add manually specified binned single precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
float binned_smsmaddsq | ( | const int | fold, |
const float | scaleX, | ||
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
const float | scaleY, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Add manually specified binned single precision scaled sums of squares (Y += X)
Performs the operation Y += X, where X and Y represent scaled sums of squares.
fold | the fold of the binned types |
scaleX | scale of X (scaleX == binned_sscale (Z) for some float Z) |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
scaleY | scale of Y (scaleY == binned_sscale (Z) for some double Z) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_smsmset | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Set manually specified binned single precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_smsrescale | ( | const int | fold, |
const float | X, | ||
const float | scaleY, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
rescale manually specified binned single precision sum of squares
Rescale an binned single precision sum of squares Y
fold | the fold of the binned types |
X | Y's new scaleY (X == binned_sscale (f) for some float f) (X >= scaleY) |
scaleY | Y's current scaleY (scaleY == binned_sscale (f) for some float f) (X >= scaleY) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_smsupdate | ( | const int | fold, |
const float | X, | ||
float * | priY, | ||
const int | incpriY, | ||
float * | carY, | ||
const int | inccarY | ||
) |
Update manually specified binned single precision with single precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
float binned_ssbconv | ( | const int | fold, |
const float_binned * | X | ||
) |
Convert binned single precision to single precision (X -> Y)
fold | the fold of the binned types |
X | binned scalar X |
float binned_sscale | ( | const float | X | ) |
Get a reproducible single precision scale.
For any given X, return a reproducible scaling factor Y of the form
2^(SBWIDTH * z) where z is an integer
such that
Y * 2^(-FLT_MANT_DIG
- SBWIDTH - 1) < X < Y * 2\^(SBWIDTH + 2)
X | single precision number to be scaled |
float binned_ssmconv | ( | const int | fold, |
const float * | priX, | ||
const int | incpriX, | ||
const float * | carX, | ||
const int | inccarX | ||
) |
Convert manually specified binned single precision to single precision (X -> Y)
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
double binned_ufp | ( | double | X | ) |
unit in the first place
This method returns just the implicit 1 in the mantissa of a double
X | scalar X |
float binned_ufpf | ( | float | X | ) |
unit in the first place
This method returns just the implicit 1 in the mantissa of a float
X | scalar X |
double_complex_binned* binned_zballoc | ( | const int | fold | ) |
binned complex double precision allocation
fold | the fold of the binned type |
free()
)void binned_zbdbset | ( | const int | fold, |
const double_binned * | X, | ||
double_complex_binned * | Y | ||
) |
Set binned complex double precision to binned double precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_zbdupdate | ( | const int | fold, |
const double | X, | ||
double_complex_binned * | Y | ||
) |
Update binned complex double precision with double precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_zbnegate | ( | const int | fold, |
double_complex_binned * | X | ||
) |
Negate binned complex double precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
X | binned scalar X |
int binned_zbnum | ( | const int | fold | ) |
binned complex double precision size
fold | the fold of the binned type |
double
) of the binned typevoid binned_zbprint | ( | const int | fold, |
const double_complex_binned * | X | ||
) |
Print binned complex double precision.
fold | the fold of the binned types |
X | binned scalar X |
void binned_zbrenorm | ( | const int | fold, |
double_complex_binned * | X | ||
) |
Renormalize binned complex double precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
X | binned scalar X |
void binned_zbsetzero | ( | const int | fold, |
double_complex_binned * | X | ||
) |
Set binned double precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
X | binned scalar X |
size_t binned_zbsize | ( | const int | fold | ) |
binned complex double precision size
fold | the fold of the binned type |
void binned_zbzadd | ( | const int | fold, |
const void * | X, | ||
double_complex_binned * | Y | ||
) |
Add complex double precision to binned complex double precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_zbzbadd | ( | const int | fold, |
const double_complex_binned * | X, | ||
double_complex_binned * | Y | ||
) |
Add binned complex double precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_zbzbaddv | ( | const int | fold, |
const int | N, | ||
const double_complex_binned * | X, | ||
const int | incX, | ||
double_complex_binned * | Y, | ||
const int | incY | ||
) |
Add binned complex double precision vectors (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
N | vector length |
X | binned vector X |
incX | X vector stride (use every incX'th element) |
Y | binned vector Y |
incY | Y vector stride (use every incY'th element) |
void binned_zbzbset | ( | const int | fold, |
const double_complex_binned * | X, | ||
double_complex_binned * | Y | ||
) |
Set binned complex double precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
X | binned scalar X |
Y | binned scalar Y |
void binned_zbzconv | ( | const int | fold, |
const void * | X, | ||
double_complex_binned * | Y | ||
) |
Convert complex double precision to binned complex double precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_zbzdeposit | ( | const int | fold, |
const void * | X, | ||
double_complex_binned * | Y | ||
) |
Add complex double precision to suitably binned binned complex double precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
void binned_zbzupdate | ( | const int | fold, |
const void * | X, | ||
double_complex_binned * | Y | ||
) |
Update binned complex double precision with complex double precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value of real and imaginary components less than absolute value of real and imaginary components of X respectively.
fold | the fold of the binned types |
X | scalar X |
Y | binned scalar Y |
int binned_zmdenorm | ( | const int | fold, |
const double * | priX | ||
) |
Check if binned type has denormal bits.
A quick check to determine if calculations involving X cannot be performed with "denormals are zero"
fold | the fold of the binned type |
priX | X's primary vector |
void binned_zmdmset | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Set manually specified binned complex double precision to manually specified binned double precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmdrescale | ( | const int | fold, |
const double | X, | ||
const double | scaleY, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
rescale manually specified binned complex double precision sum of squares
Rescale an binned complex double precision sum of squares Y
fold | the fold of the binned types |
X | Y's new scaleY (X == binned_dscale (f) for some double f) (X >= scaleY) |
scaleY | Y's current scaleY (scaleY == binned_dscale (f) for some double f) (X >= scaleY) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmdupdate | ( | const int | fold, |
const double | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Update manually specified binned complex double precision with double precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value less than X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmnegate | ( | const int | fold, |
double * | priX, | ||
const int | incpriX, | ||
double * | carX, | ||
const int | inccarX | ||
) |
Negate manually specified binned complex double precision (X = -X)
Performs the operation X = -X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_zmprint | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX | ||
) |
Print manually specified binned complex double precision.
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_zmrenorm | ( | const int | fold, |
double * | priX, | ||
const int | incpriX, | ||
double * | carX, | ||
const int | inccarX | ||
) |
Renormalize manually specified binned complex double precision.
Renormalization keeps the primary vector within the necessary bins by shifting over to the carry vector
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_zmsetzero | ( | const int | fold, |
double * | priX, | ||
const int | incpriX, | ||
double * | carX, | ||
const int | inccarX | ||
) |
Set manually specified binned complex double precision to 0 (X = 0)
Performs the operation X = 0
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
void binned_zmzadd | ( | const int | fold, |
const void * | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Add complex double precision to manually specified binned complex double precision (Y += X)
Performs the operation Y += X on an binned type Y
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmzconv | ( | const int | fold, |
const void * | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Convert complex double precision to manually specified binned complex double precision (X -> Y)
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmzdeposit | ( | const int | fold, |
const void * | X, | ||
double * | priY, | ||
const int | incpriY | ||
) |
Add complex double precision to suitably binned manually specified binned complex double precision (Y += X)
Performs the operation Y += X on an binned type Y where the index of Y is larger than the index of X
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
void binned_zmzmadd | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Add manually specified binned complex double precision (Y += X)
Performs the operation Y += X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmzmset | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Set manually specified binned complex double precision (Y = X)
Performs the operation Y = X
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zmzupdate | ( | const int | fold, |
const void * | X, | ||
double * | priY, | ||
const int | incpriY, | ||
double * | carY, | ||
const int | inccarY | ||
) |
Update manually specified binned complex double precision with complex double precision (X -> Y)
This method updates Y to an index suitable for adding numbers with absolute value of real and imaginary components less than absolute value of real and imaginary components of X respectively.
fold | the fold of the binned types |
X | scalar X |
priY | Y's primary vector |
incpriY | stride within Y's primary vector (use every incpriY'th element) |
carY | Y's carry vector |
inccarY | stride within Y's carry vector (use every inccarY'th element) |
void binned_zzbconv_sub | ( | const int | fold, |
const double_complex_binned * | X, | ||
void * | conv | ||
) |
Convert binned complex double precision to complex double precision (X -> Y)
fold | the fold of the binned types |
X | binned scalar X |
conv | scalar return |
void binned_zzmconv_sub | ( | const int | fold, |
const double * | priX, | ||
const int | incpriX, | ||
const double * | carX, | ||
const int | inccarX, | ||
void * | conv | ||
) |
Convert manually specified binned complex double precision to complex double precision (X -> Y)
fold | the fold of the binned types |
priX | X's primary vector |
incpriX | stride within X's primary vector (use every incpriX'th element) |
carX | X's carry vector |
inccarX | stride within X's carry vector (use every inccarX'th element) |
conv | scalar return |