BeBOP Optimized Sparse Kernel Interface Library
1.0.1h
|
Define the scalar types available to the library. More...
Go to the source code of this file.
Data Structures | |
struct | tagComplex_t |
Single precision complex data type. More... | |
struct | tagDoublecomplex_t |
Double precision complex data type. More... | |
struct | tagBebop_scalinfo_t |
Information about an available scalar type. More... | |
Defines | |
#define | INC_OSKI_SCALINFO_H |
oski/scalinfo.h has been included. | |
#define | OSKI_SCALIND(macro_tag, conc_typ, name, tag) { OSKI_SCALIND_##macro_tag, name, tag, sizeof(conc_typ) } |
Macro used to define a new scalar index type. | |
#define | OSKI_SCALIND_END INVALID_ID |
NULL (end) record. | |
#define | OSKI_SCALIND_END_REC OSKI_SCALIND(END, char, "", (char)NULL) |
END descriptor. | |
#define | OSKI_SCALVAL(macro_tag, conc_typ, name, tag) { OSKI_SCALVAL_##macro_tag, name, tag, sizeof(conc_typ) } |
Macro used to define a new scalar non-zero value type. | |
#define | OSKI_SCALVAL_END INVALID_ID |
NULL (end) record. | |
#define | OSKI_SCALVAL_END_REC OSKI_SCALVAL(END, char, "", (char)NULL) |
END descriptor. | |
Available integer index types. | |
To make a new integer index type available to the system, define a record here. By default, we predefine types for integers and long-integers. | |
#define | OSKI_SCALIND_INT 1 |
INT -- Equivalent C type: int. | |
#define | OSKI_SCALIND_INT_REC OSKI_SCALIND(INT, int, "integer", 'i') |
INT descriptor. | |
#define | OSKI_SCALIND_LONG 2 |
LONG -- Equivalent C type: long. | |
#define | OSKI_SCALIND_LONG_REC OSKI_SCALIND(LONG, long, "long", 'l') |
LONG descriptor. | |
Available non-zero value types. | |
To make a new integer index type available to the system, define a record here. By default, we predefine types for {single, double}-precision x {real, complex} types.
| |
#define | OSKI_SCALVAL_SINGLE 1 |
SINGLE -- Equivalent C type: float. | |
#define | OSKI_SCALVAL_SINGLE_REC OSKI_SCALVAL(SINGLE, float, "single", 's') |
SINGLE descriptor. | |
#define | OSKI_SCALVAL_DOUBLE 2 |
DOUBLE -- Equivalent C type: double. | |
#define | OSKI_SCALVAL_DOUBLE_REC OSKI_SCALVAL(DOUBLE, double, "double", 'd') |
DOUBLE descriptor. | |
#define | OSKI_SCALVAL_COMPLEX 3 |
COMPLEX -- Equivalent C++ type: complex<float> | |
#define | OSKI_SCALVAL_COMPLEX_REC OSKI_SCALVAL(COMPLEX, complex_t, "complex", 'c') |
COMPLEX descriptor. | |
#define | OSKI_SCALVAL_DOUBLECOMPLEX 4 |
DOUBLECOMPLEX -- Equivalent C++ type: complex<double> | |
#define | OSKI_SCALVAL_DOUBLECOMPLEX_REC OSKI_SCALVAL(DOUBLECOMPLEX, doublecomplex_t, "double_complex", 'z') |
DOUBLECOMPLEX descriptor. | |
Typedefs | |
typedef struct tagBebop_scalinfo_t | oski_scalinfo_t |
Information about an available scalar type. | |
Functions | |
size_t | oski_GetNumScalarIndexTypes (void) |
Returns 1 iff the given scalar type is a complex type. | |
const oski_scalinfo_t * | oski_LookupScalarIndexInfo (oski_id_t id) |
Lookup information about a scalar integer index type. | |
const char * | oski_GetScalarIndexName (oski_id_t id) |
Lookup the string name of a given scalar integer index type. | |
char | oski_GetScalarIndexTag (oski_id_t id) |
Lookup the abbreviated name of a given scalar integer index type. | |
size_t | oski_GetNumScalarValueTypes (void) |
Returns the number of registered non-zero value types. | |
const oski_scalinfo_t * | oski_LookupScalarValueInfo (oski_id_t id) |
Lookup information about a scalar non-zero value type. | |
const char * | oski_GetScalarValueName (oski_id_t id) |
Lookup the string name of a given scalar non-zero value type. | |
char | oski_GetScalarValueTag (oski_id_t id) |
Lookup the abbreviated name of a given scalar non-zero value type. | |
Complex-valued data types. | |
#define | _COMPLEX complex_t |
Synonym for single precision complex type. | |
#define | _DOUBLE_COMPLEX double_complex_t |
Synonym for double precision complex type. | |
#define | _RE(x) (x).real |
Macro to extract the real part of a complex number. | |
#define | _IM(x) (x).imag |
Macro to extract the imaginary part of a complex number. | |
typedef struct tagComplex_t | complex_t |
Single precision complex data type. | |
typedef struct tagDoublecomplex_t | doublecomplex_t |
Double precision complex data type. |
Define the scalar types available to the library.
This module (see also: scalinfo.c) defines all possible scalar types that may be used to create a sparse matrix. Among other reasons, the library needs this information to create fully-qualified dynamic library names for the matrix type-specific kernel implementations.
Users who wish to make alternative scalar types available for use as indices or non-zero values should add their definitions here. In addition, we advise these users to modify the corresponding test program (see "tests" subdirectory, 'info' test) to check for any such new scalar types.
#define _DOUBLE_COMPLEX double_complex_t |
Synonym for double precision complex type.
#define _IM | ( | x | ) | (x).imag |
Macro to extract the imaginary part of a complex number.
Referenced by array_CompareElems_NoAbort(), check_values(), oski_CalcMatRepr1Norm(), oski_CalcVecViewInfNorm(), oski_CalcVecViewInfNormDiff(), oski_PrintDebugVecView(), and oski_StreamMatRepr().
#define _RE | ( | x | ) | (x).real |
Macro to extract the real part of a complex number.
Referenced by array_CompareElems_NoAbort(), check_values(), oski_CalcMatRepr1Norm(), oski_CalcVecViewInfNorm(), oski_CalcVecViewInfNormDiff(), oski_PrintDebugVecView(), oski_StreamMatRepr(), and ResetDiagImag().
#define INC_OSKI_SCALINFO_H |
oski/scalinfo.h has been included.
#define OSKI_SCALIND | ( | macro_tag, | |
conc_typ, | |||
name, | |||
tag | |||
) | { OSKI_SCALIND_##macro_tag, name, tag, sizeof(conc_typ) } |
Macro used to define a new scalar index type.
macro_tag | Suffix for constant macro defining the type's unique id number. |
conc_typ | Corresponding concrete C type. |
name | String name used to identify this type. |
tag | Unique one character identifier. |
#define OSKI_SCALIND_END INVALID_ID |
NULL (end) record.
Referenced by oski_LookupScalarIndexInfo().
#define OSKI_SCALIND_INT 1 |
INT -- Equivalent C type: int.
#define OSKI_SCALIND_INT_REC OSKI_SCALIND(INT, int, "integer", 'i') |
INT descriptor.
#define OSKI_SCALIND_LONG 2 |
LONG -- Equivalent C type: long.
#define OSKI_SCALIND_LONG_REC OSKI_SCALIND(LONG, long, "long", 'l') |
LONG descriptor.
#define OSKI_SCALVAL | ( | macro_tag, | |
conc_typ, | |||
name, | |||
tag | |||
) | { OSKI_SCALVAL_##macro_tag, name, tag, sizeof(conc_typ) } |
Macro used to define a new scalar non-zero value type.
macro_tag | Suffix for constant macro defining the type's unique id number. |
conc_typ | Corresponding concrete C type. |
name | String name used to identify this type. |
tag | Unique one character identifier. |
#define OSKI_SCALVAL_COMPLEX_REC OSKI_SCALVAL(COMPLEX, complex_t, "complex", 'c') |
COMPLEX descriptor.
#define OSKI_SCALVAL_DOUBLE 2 |
DOUBLE -- Equivalent C type: double.
#define OSKI_SCALVAL_DOUBLE_REC OSKI_SCALVAL(DOUBLE, double, "double", 'd') |
DOUBLE descriptor.
#define OSKI_SCALVAL_DOUBLECOMPLEX_REC OSKI_SCALVAL(DOUBLECOMPLEX, doublecomplex_t, "double_complex", 'z') |
DOUBLECOMPLEX descriptor.
#define OSKI_SCALVAL_END INVALID_ID |
NULL (end) record.
Referenced by oski_LookupScalarValueInfo().
#define OSKI_SCALVAL_SINGLE 1 |
SINGLE -- Equivalent C type: float.
#define OSKI_SCALVAL_SINGLE_REC OSKI_SCALVAL(SINGLE, float, "single", 's') |
SINGLE descriptor.
size_t oski_GetNumScalarIndexTypes | ( | void | ) |
Returns 1 iff the given scalar type is a complex type.
Returns the number of registered scalar index types.
References INVALID_ID, and oski_GetNumScalarIndexTypes().
Referenced by oski_GetNumScalarIndexTypes().
const char* oski_GetScalarIndexName | ( | oski_id_t | id | ) |
Lookup the string name of a given scalar integer index type.
[in] | id | Type id. |
References tagBebop_scalinfo_t::name, oski_GetScalarIndexName(), and oski_LookupScalarIndexInfo().
Referenced by MakeLuaConvMethodName(), oski_GetScalarIndexName(), and oski_MakeModuleDesc().
char oski_GetScalarIndexTag | ( | oski_id_t | id | ) |
Lookup the abbreviated name of a given scalar integer index type.
[in] | id | Type id. |
References oski_GetScalarIndexTag(), oski_LookupScalarIndexInfo(), and tagBebop_scalinfo_t::tag.
Referenced by oski_GetScalarIndexTag(), and oski_MakeModuleName().
const char* oski_GetScalarValueName | ( | oski_id_t | id | ) |
Lookup the string name of a given scalar non-zero value type.
[in] | id | Type id. |
References tagBebop_scalinfo_t::name, oski_GetScalarValueName(), and oski_LookupScalarValueInfo().
Referenced by MakeLuaConvMethodName(), oski_GetScalarValueName(), and oski_MakeModuleDesc().
char oski_GetScalarValueTag | ( | oski_id_t | id | ) |
Lookup the abbreviated name of a given scalar non-zero value type.
[in] | id | Type id. |
References oski_GetScalarValueTag(), oski_LookupScalarValueInfo(), and tagBebop_scalinfo_t::tag.
Referenced by oski_GetScalarValueTag(), and oski_MakeModuleName().