scalinfo.h File Reference


Detailed Description

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.

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...

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 tagComplex_t complex_t
 Single precision complex data type.
typedef tagDoublecomplex_t doublecomplex_t
 Double precision complex data type.

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.

Note:
Developers who add additional complex types should modify the corresponding macro, IS_VAL_COMPLEX (mangle.h).


#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.

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.

Typedefs

typedef tagBebop_scalinfo_t oski_scalinfo_t
 Information about an available scalar type.

Functions

size_t oski_GetNumScalarIndexTypes (void)
 Returns the number of registered scalar index types.
const oski_scalinfo_toski_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_toski_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.


Define Documentation

#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.

Parameters:
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.
Returns:
Defines an initialization record for oski_scalinfo_t type.

#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.

Parameters:
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.
Returns:
Defines an initialization record for oski_scalinfo_t type.


Function Documentation

const char* oski_GetScalarIndexName oski_id_t  id  ) 
 

Lookup the string name of a given scalar integer index type.

Parameters:
[in] id Type id.
Returns:
The scalar integer index type name, or "[unknown]".

char oski_GetScalarIndexTag oski_id_t  id  ) 
 

Lookup the abbreviated name of a given scalar integer index type.

Parameters:
[in] id Type id.
Returns:
The scalar integer index abbreviated name (tag), or NULL on error (e.g., the id could not be found).

const char* oski_GetScalarValueName oski_id_t  id  ) 
 

Lookup the string name of a given scalar non-zero value type.

Parameters:
[in] id Type id.
Returns:
The scalar integer index type name, or "[unknown]".

char oski_GetScalarValueTag oski_id_t  id  ) 
 

Lookup the abbreviated name of a given scalar non-zero value type.

Parameters:
[in] id Type id.
Returns:
The scalar integer index abbreviated name (tag), or NULL on error (e.g., the id could not be found).


Generated on Wed Sep 19 16:41:23 2007 for BeBOP Optimized Sparse Kernel Interface Library by  doxygen 1.4.6