Enumerations | |
| enum | gDataType { GINT32 = 3, GFLOAT32 = 4, GFLOAT64 = 8 } |
| enum | gBackend |
| enum | gRenderMode { GDISPLAY2D = (1 << 1), GHEIGHTFIELD2D = (1 << 3), GSTATS = (1 << 4) } |
Functions | |
| LIBRA_API int | libra_Init (int argc, char **argv) |
| Initializes Libra API. | |
| LIBRA_API void | libra_Shutdown () |
| Shutdown Libra API and release Libra internal resources. | |
| LIBRA_API void | libra_SetDefaultDataType (gDataType dataType) |
| Set default Libra API data type. | |
| LIBRA_API gDataType | libra_GetDefaultDataType () |
| Get default Libra API data type. | |
| LIBRA_API void | libra_SetCurrentBackend (enum gBackend backend) |
| Set Libra API current compute backend. | |
| LIBRA_API enum gBackend | libra_GetCurrentBackend () |
| Get Libra API current compute backend. | |
| LIBRA_API void | libra_SetDefaultIndexing (int indexing) |
| Set default Libra API indexing mode. | |
| LIBRA_API int | libra_GetDefaultIndexing () |
| Get default Libra API indexing mode. | |
| LIBRA_API void | libra_Flush () |
| flush all Libra API commands for processing. | |
| LIBRA_API void | libra_Finish () |
| finish processing of all Libra API commands. | |
| LIBRA_API gVarHandle | libra_Create (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates an MxN array. | |
| LIBRA_API gVarHandle | libra_ComplexCreate (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates an MxN array of complex valued elements. | |
| LIBRA_API gVarHandle | libra_Sparse_f (gVarHandle *dst, float *values, int *rows, int *columns, int nz, int type) |
| creates a sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_Sparse_d (gVarHandle *dst, double *values, int *rows, int *columns, int nz, int type) |
| creates a sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_SparseBlockDiagonal_f (gVarHandle *dst, float *values, int *rows, int *columns, int nz, int blockCount, int type) |
| creates a sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_SparseBlockDiagonal_d (gVarHandle *dst, double *values, int *rows, int *columns, int nz, int blockCount, int type) |
| creates a sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_SparseCSC_f (gVarHandle *dst, float *values, int *rows, int *colIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Column (CSC) format. | |
| LIBRA_API gVarHandle | libra_SparseCSC_d (gVarHandle *dst, double *values, int *rows, int *colIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Column (CSC) format. | |
| LIBRA_API gVarHandle | libra_SparseCSR_f (gVarHandle *dst, float *values, int *columns, int *rowIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Row (CSR) format. | |
| LIBRA_API gVarHandle | libra_SparseCSR_d (gVarHandle *dst, double *values, int *columns, int *rowIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Row (CSR) format. | |
| LIBRA_API gVarHandle | libra_SparseBanded_f (gVarHandle *dst, int rowCount, int columnCount, float **values, int *positions, int bandCount, int type) |
| creates a sparse matrix, with input in Coordinate (Coord) format. | |
| LIBRA_API gVarHandle | libra_SparseBanded_d (gVarHandle *dst, int rowCount, int columnCount, double **values, int *positions, int bandCount, int type) |
| creates a sparse matrix, with input in Coordinate (Coord) format. | |
| LIBRA_API gVarHandle | libra_SparseBanded2_f (gVarHandle *dst, int rowCount, int columnCount, float *values, int *positions, int bandCount, int type) |
| creates a sparse matrix, with input in Coordinate (Coord) format. | |
| LIBRA_API gVarHandle | libra_SparseBanded2_d (gVarHandle *dst, int rowCount, int columnCount, double *values, int *positions, int bandCount, int type) |
| creates a sparse matrix, with input in Coordinate (Coord) format. | |
| LIBRA_API gVarHandle | libra_ComplexSparse_f (gVarHandle *dst, float *values, int *rows, int *columns, int nz, int type) |
| creates a sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_ComplexSparse_d (gVarHandle *dst, double *values, int *rows, int *columns, int nz, int type) |
| creates a sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseBlockDiagonal_f (gVarHandle *dst, float *values, int *rows, int *columns, int nz, int blockCount, int type) |
| creates a block diagonal sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseBlockDiagonal_d (gVarHandle *dst, double *values, int *rows, int *columns, int nz, int blockCount, int type) |
| creates a block diagonal sparse matrix, with input in Coordinate format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseCSC_f (gVarHandle *dst, float *values, int *rows, int *colIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Column (CSC) format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseCSC_d (gVarHandle *dst, double *values, int *rows, int *colIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Column (CSC) format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseCSR_f (gVarHandle *dst, float *values, int *columns, int *rowIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Row (CSR) format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseCSR_d (gVarHandle *dst, double *values, int *columns, int *rowIndex, int nz, int type) |
| creates a sparse matrix, with input in Compressed Sparse Row (CSR) format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseBanded_f (gVarHandle *dst, int rowCount, int columnCount, float **values, int *positions, int bandCount, int type) |
| creates a sparse matrix, with input in Coordinate (Coord) format. | |
| LIBRA_API gVarHandle | libra_ComplexSparseBanded_d (gVarHandle *dst, int rowCount, int columnCount, double **values, int *positions, int bandCount, int type) |
| creates a sparse matrix, with input in Coordinate (Coord) format. | |
| LIBRA_API double | libra_GetTime () |
| used for performance measuring Libra API. | |
| LIBRA_API void | libra_GetRenderBufferBytes8888 (int *renderBufferBytes) |
| gets the byte elements of the renderbuffer object RGBA_8888 format and writes them into a sequential byte array | |
| LIBRA_API void | libra_SetRenderMatrix (float *matrix4x4) |
| when Libra is in debug or SDK mode, displays a variable graphically, transformed by the supplied 4x4 transform matrix. | |
| LIBRA_API void | libra_Render (gVarHandle var, gRenderMode mode, int varRowStride) |
| when Libra is in debug or SDK mode, displays a variable graphically. | |
| LIBRA_API void | libra_RenderText (const char *string, unsigned int pixelPosX, unsigned int pixelPosY, unsigned int colorRGBA) |
| when Libra is in debug or SDK mode, displays a text string graphically. | |
| LIBRA_API gVarHandle | libra_Eye (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates an identity matrix. | |
| LIBRA_API gVarHandle | libra_ComplexEye (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates an identity matrix. | |
| LIBRA_API gVarHandle | libra_Ones (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates a matrix whose elements are all 1. | |
| LIBRA_API gVarHandle | libra_ComplexOnes (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates a matrix whose elements are all 1. | |
| LIBRA_API gVarHandle | libra_Zeros (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates a matrix whose elements are all 0. | |
| LIBRA_API gVarHandle | libra_ComplexZeros (gVarHandle *dst, int rowCount, int columnCount, int type) |
| creates a matrix whose elements are all 0. | |
| LIBRA_API gVarHandle | libra_Indexmap (gVarHandle *dst, int rowCount, int columnCount, float rowCoeff, float colCoeff, float offs, int type) |
| creates an object where the element values are a linear function of their row, column index. | |
| LIBRA_API gVarHandle | libra_Step (gVarHandle *dst, float from, float to, float stride, int type) |
| creates a vector which elements are in a sequence | |
| LIBRA_API gVarHandle | libra_Rand (gVarHandle *dst, int rowCount, int columnCount, int type, float scale) |
| creates a matrix filled with random values. | |
| LIBRA_API void | libra_Release (gVarHandle *handle) |
| releases a gVarHandle. | |
| LIBRA_API gVarHandle | libra_Assign (gVarHandle *dst, gVarHandle var) |
| assigns a Libra object to another object. | |
| LIBRA_API gVarHandle | libra_Subarray (gVarHandle *dst, gVarHandle rows, gVarHandle columns, gVarHandle array) |
| returns a subarray of a Libra object to another object. | |
| LIBRA_API gHandle | libra_malloc (const unsigned int byteCount) |
| allocates count bytes of memory from computer main memory. | |
| LIBRA_API void | libra_free (const gHandle memory) |
| free the memory allocated using libra_malloc. | |
| LIBRA_API void | libra_SetIntData (gVarHandle handle, const int *mem, unsigned int byteOffset, unsigned int byteCount, gHandle callFunc, gHandle userData) |
| sets the elements of an object from an integer array | |
| LIBRA_API void | libra_SetFloatData (gVarHandle handle, const float *mem, unsigned int byteOffset, unsigned int byteCount, gHandle callFunc, gHandle userData) |
| sets the elements of an object from an float array | |
| LIBRA_API void | libra_SetDoubleData (gVarHandle handle, const double *mem, unsigned int byteOffset, unsigned int byteCount, gHandle callFunc, gHandle userData) |
| sets the elements of an object from an double array | |
| LIBRA_API void | libra_GetIntData (gVarHandle handle, int *mem, unsigned int byteOffset, unsigned int byteCount, gHandle callFunc, gHandle userData) |
| gets the elements of an object and writes them into an int array | |
| LIBRA_API void | libra_GetFloatData (gVarHandle handle, float *mem, unsigned int byteOffset, unsigned int byteCount, gHandle callFunc, gHandle userData) |
| gets the elements of an object and writes them into an float array | |
| LIBRA_API void | libra_GetDoubleData (gVarHandle handle, double *mem, unsigned int byteOffset, unsigned int byteCount, gHandle callFunc, gHandle userData) |
| gets the elements of an object and writes them into an double array | |
| LIBRA_API int | libra_GetRowCount (gVarHandle handle) |
| get the number of rows from an object. | |
| LIBRA_API int | libra_GetColumnCount (gVarHandle handle) |
| get the number of columns from an object. | |
| LIBRA_API int | libra_GetElementCount (gVarHandle handle) |
| get the number of elements from an object. | |
| LIBRA_API int | libra_GetDimensionCount (gVarHandle handle) |
| get the number of dimensions from an object. | |
| LIBRA_API int | libra_GetType (gVarHandle handle) |
| get the gDataType of an object. | |
| LIBRA_API int | libra_IsComplex (gVarHandle *dst, gVarHandle handle) |
| return 1 if the queried object is a complex object othwerwise 0. | |
| LIBRA_API int | libra_IsSparse (gVarHandle *dst, gVarHandle handle) |
| return 1 if the queried object is a sparse data object othwerwise 0. | |
| LIBRA_API int | libra_IsReal (gVarHandle *dst, gVarHandle handle) |
| return 1 if the queried object is a real object othwerwise 0. | |
| LIBRA_API void | libra_SetPrintFunc (void(*func)(const char *msg)) |
| set print function. | |
| LIBRA_API void | libra_PrintVar (gVarHandle handle) |
| print the elements of an object. | |
| LIBRA_API void | libra_PrintText (const char *text) |
| print the text string to output. Default output is stdout and debug window if available. | |
| LIBRA_API void | libra_PrintFloat (float f) |
| print f. | |
| LIBRA_API void | libra_PrintDouble (double d) |
| print d. | |
| LIBRA_API void | libra_PrintInt (int i) |
| print i. | |
| LIBRA_API gVarHandle | libra_Matmul (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform matrix multiply. | |
| LIBRA_API gVarHandle | libra_JacobiIter (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2, gVarHandle gVH3) |
| perform one jacobi iteration. | |
| LIBRA_API gVarHandle | libra_JacobiSolve (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| return the the solution of a linear equation system. | |
| LIBRA_API gVarHandle | libra_Mul (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform multiply, element by element. | |
| LIBRA_API gVarHandle | libra_Muldv (gVarHandle *dst, double d, gVarHandle var) |
| perform multiply, element by element. | |
| LIBRA_API gVarHandle | libra_Mulvd (gVarHandle *dst, gVarHandle var, double d) |
| perform multiply, element by element. | |
| LIBRA_API gVarHandle | libra_Mulfv (gVarHandle *dst, float f, gVarHandle var) |
| perform multiply, element by element. | |
| LIBRA_API gVarHandle | libra_Mulvf (gVarHandle *dst, gVarHandle var, float f) |
| perform multiply, element by element. | |
| LIBRA_API gVarHandle | libra_Div (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform division, element by element. | |
| LIBRA_API gVarHandle | libra_Divdv (gVarHandle *dst, double d, gVarHandle gVH2) |
| perform division, element by element. | |
| LIBRA_API gVarHandle | libra_Divfv (gVarHandle *dst, float f, gVarHandle gVH2) |
| perform division, element by element. | |
| LIBRA_API gVarHandle | libra_Divvd (gVarHandle *dst, gVarHandle gVH1, double d) |
| perform division, element by element. | |
| LIBRA_API gVarHandle | libra_Divvf (gVarHandle *dst, gVarHandle gVH1, float f) |
| perform division, element by element. | |
| LIBRA_API gVarHandle | libra_Mldivide (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform left division. | |
| LIBRA_API gVarHandle | libra_Pow (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| performs the power function, raising base left operand to the power of right operand, element by element. | |
| LIBRA_API gVarHandle | libra_Mod (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform modulo operation, element by element. | |
| LIBRA_API gVarHandle | libra_Add (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform addition, element by element. | |
| LIBRA_API gVarHandle | libra_Sub (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform subtraction, element by element. | |
| LIBRA_API gVarHandle | libra_Dot (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform the inner (dot) product. | |
| LIBRA_API gVarHandle | libra_Neg (gVarHandle *dst, gVarHandle var) |
| performs negation. | |
| LIBRA_API gVarHandle | libra_Max (gVarHandle *dst, gVarHandle var) |
| performs max of the elements of an object. | |
| LIBRA_API gVarHandle | libra_Maxvv (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform max, element by element. | |
| LIBRA_API gVarHandle | libra_Min (gVarHandle *dst, gVarHandle var) |
| performs min of the elements of an object. | |
| LIBRA_API gVarHandle | libra_Minvv (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform min, element by element. | |
| LIBRA_API gVarHandle | libra_ImageFilter (gVarHandle *dst, gVarHandle var1, gVarHandle var2, const char *options) |
| return the linear filtering of image var1 and filter var2. | |
| LIBRA_API gVarHandle | libra_Sin (gVarHandle *dst, gVarHandle var) |
| performs sine, element by element. | |
| LIBRA_API gVarHandle | libra_Cos (gVarHandle *dst, gVarHandle var) |
| performs cosine, element by element. | |
| LIBRA_API gVarHandle | libra_Tan (gVarHandle *dst, gVarHandle var) |
| performs tangent, element by element. | |
| LIBRA_API gVarHandle | libra_ArcSin (gVarHandle *dst, gVarHandle var) |
| performs arcsine (inverse of sine), element by element. | |
| LIBRA_API gVarHandle | libra_ArcCos (gVarHandle *dst, gVarHandle var) |
| performs arccosine (inverse of cosine), element by element. | |
| LIBRA_API gVarHandle | libra_ArcTan (gVarHandle *dst, gVarHandle var) |
| performs arctangent (inverse of tangent), element by element. | |
| LIBRA_API gVarHandle | libra_Log (gVarHandle *dst, gVarHandle var) |
| performs the natural logarithm, element by element. | |
| LIBRA_API gVarHandle | libra_Log2 (gVarHandle *dst, gVarHandle var) |
| performs the logarithm of base 2, element by element. | |
| LIBRA_API gVarHandle | libra_Log10 (gVarHandle *dst, gVarHandle var) |
| performs the logarithm of base 10, element by element. | |
| LIBRA_API gVarHandle | libra_Exp (gVarHandle *dst, gVarHandle var) |
| performs the exponential function of base e, element by element. | |
| LIBRA_API gVarHandle | libra_Exp2 (gVarHandle *dst, gVarHandle var) |
| performs the exponential function of base 2, element by element. | |
| LIBRA_API gVarHandle | libra_Exp10 (gVarHandle *dst, gVarHandle var) |
| performs the exponential function of base 10, element by element. | |
| LIBRA_API gVarHandle | libra_Sqrt (gVarHandle *dst, gVarHandle var) |
| computes the squared root, element by element. | |
| LIBRA_API gVarHandle | libra_InvSqrt (gVarHandle *dst, gVarHandle var) |
| computes 1.0 divided by the squared root, element by element. | |
| LIBRA_API gVarHandle | libra_Ceil (gVarHandle *dst, gVarHandle var) |
| the input is rounded upwards to nearest integer, element by element. | |
| LIBRA_API gVarHandle | libra_Floor (gVarHandle *dst, gVarHandle var) |
| the input is rounded downwards (truncated) to the nearest integer, element by element. | |
| LIBRA_API gVarHandle | libra_Round (gVarHandle *dst, gVarHandle var) |
| the input is rounded to the nearest integer, element by element. | |
| LIBRA_API gVarHandle | libra_Abs (gVarHandle *dst, gVarHandle var) |
| computes the absolute value, element by element. | |
| LIBRA_API gVarHandle | libra_Sign (gVarHandle *dst, gVarHandle var) |
| performs the sign (sgn) function, element by element. | |
| LIBRA_API gVarHandle | libra_Sum (gVarHandle *dst, gVarHandle var) |
| computes the sum of all elements in an object. | |
| LIBRA_API gVarHandle | libra_Transpose (gVarHandle *dst, gVarHandle var) |
| computes the transpose of an object. | |
| LIBRA_API gVarHandle | libra_Conj (gVarHandle *dst, gVarHandle var) |
| computes the conj of an object. | |
| LIBRA_API gVarHandle | libra_Cast (gVarHandle *dst, gVarHandle var, gDataType dataType) |
| casts an object into a new object with the specified gDataType. | |
| LIBRA_API gVarHandle | libra_Usolve (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| return the the solution of a upper triangular equation system. | |
| LIBRA_API gVarHandle | libra_Lsolve (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| return the the solution of a lower triangular equation system. | |
| LIBRA_API gVarHandle | libra_CGsolve (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| return the the solution of a linear equation system. | |
| LIBRA_API gVarHandle | libra_Sort (gVarHandle *dst, gVarHandle var) |
| return a sorted gVar. | |
| LIBRA_API gVarHandle | libra_FFT (gVarHandle *dst, gVarHandle var) |
| return the 1D fourier transform of a gVar. | |
| LIBRA_API gVarHandle | libra_IFFT (gVarHandle *dst, gVarHandle var) |
| return the inverse 1D fourier transform of a gVar. | |
| LIBRA_API gVarHandle | libra_FFTShift (gVarHandle *dst, gVarHandle var) |
| swaps "half-spaces" of var along each dimension. | |
| LIBRA_API gVarHandle | libra_IFFTShift (gVarHandle *dst, gVarHandle var) |
| inverse swaps "half-spaces" of var along each dimension. | |
| LIBRA_API gVarHandle | libra_Real (gVarHandle *dst, gVarHandle var) |
| return Real part of a gVar. | |
| LIBRA_API gVarHandle | libra_Imag (gVarHandle *dst, gVarHandle var) |
| return Imag part of a gVar. | |
| LIBRA_API gVarHandle | libra_ComplexCreateVar (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| return a Complex var from two Real var. | |
| LIBRA_API gVarHandle | libra_Diag (gVarHandle *dst, gVarHandle var) |
| extracts the diagonal of an object | |
| LIBRA_API gVarHandle | libra_Diag_K (gVarHandle *dst, gVarHandle var, int k) |
| creates an object (typically a matrix) with the specified diagonal at position k. | |
| LIBRA_API gVarHandle | libra_CmpEq (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| compares two objects, element by element | |
| LIBRA_API gVarHandle | libra_CmpGt (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| compares two objects, element by element | |
| LIBRA_API gVarHandle | libra_CmpGeq (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| compares two objects, element by element | |
| LIBRA_API gVarHandle | libra_CmpLt (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| compares two objects, element by element | |
| LIBRA_API gVarHandle | libra_CmpLeq (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| compares two objects, element by element | |
| LIBRA_API gVarHandle | libra_Compare_NotEqual (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| compares two objects, element by element | |
| LIBRA_API gVarHandle | libra_Not (gVarHandle *dst, gVarHandle var) |
| perform the logical not operation of an object, element by element | |
| LIBRA_API gVarHandle | libra_And (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Anddv (gVarHandle *dst, double d, gVarHandle var) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Andvd (gVarHandle *dst, gVarHandle var, double d) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Andfv (gVarHandle *dst, float f, gVarHandle var) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Andvf (gVarHandle *dst, gVarHandle var, float f) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Or (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform the logical or operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Ordv (gVarHandle *dst, double d, gVarHandle var) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Orvd (gVarHandle *dst, gVarHandle var, double d) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Orfv (gVarHandle *dst, float f, gVarHandle var) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Orvf (gVarHandle *dst, gVarHandle var, float f) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Xor (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| perform the logical xor operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Xordv (gVarHandle *dst, double d, gVarHandle var) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Xorvd (gVarHandle *dst, gVarHandle var, double d) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Xorfv (gVarHandle *dst, float f, gVarHandle var) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Xorvf (gVarHandle *dst, gVarHandle var, float f) |
| perform the logical and operation of two objects, element by element | |
| LIBRA_API gVarHandle | libra_Cond (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2, gVarHandle gVH3) |
| condition operand ? left operand : right operand. conditionally selects elements from two operators, element by element. | |
| LIBRA_API gVarHandle | libra_GatherVector (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2) |
| gathers selected elements from a vector. | |
| LIBRA_API gVarHandle | libra_GatherMatrix (gVarHandle *dst, gVarHandle gVH1, gVarHandle gVH2, gVarHandle gVH3) |
| gathers selected elements from a (sparse) matrix. | |
| LIBRA_API void | libra_ScatterVector (gVarHandle gVH1, gVarHandle gVH2, gVarHandle gVH3) |
| scatters elements into selected positions of a vector. | |
| LIBRA_API void | libra_ScatterMatrix (gVarHandle gVH1, gVarHandle gVH2, gVarHandle gVH3, gVarHandle gVH4) |
| scatters elements into selected positions of a matrix. | |
| LIBRA_API void | libra_ScatterMatrixiif (int i, int j, float value, gVarHandle var) |
| scatters element into selected position i,j of a matrix, vector or scalar. | |
| LIBRA_API void | libra_ScatterMatrixiiff (int i, int j, float re, float im, gVarHandle var) |
| scatters element into selected position i,j of a matrix, vector or scalar. | |
| LIBRA_API void | libra_ScatterVectorif (int i, float value, gVarHandle var) |
| scatters element into selected position i of a vector. | |
| LIBRA_API void | libra_ScatterVectoriff (int i, float re, float im, gVarHandle var) |
| scatters element into selected position i of a vector. | |
| LIBRA_API void | libra_ScatterMatrixiid (int i, int j, double value, gVarHandle var) |
| scatters element into selected position i,j of a matrix, vector or scalar. | |
| LIBRA_API void | libra_ScatterMatrixiidd (int i, int j, double re, double im, gVarHandle var) |
| scatters element into selected position i,j of a matrix, vector or scalar. | |
| LIBRA_API void | libra_ScatterVectorid (int i, double value, gVarHandle var) |
| scatters element into selected position i of a vector. | |
| LIBRA_API void | libra_ScatterVectoridd (int i, double re, double im, gVarHandle var) |
| scatters element into selected position i of a vector. | |
| LIBRA_API void | libra_ImageRead (gVarHandle *var, const char *, int type) |
| creates a var matrix from an image file. | |
| LIBRA_API const char * | libra_GetVersion () |
| obtain version information. | |
| LIBRA_API const char * | libra_GetLastErrorMessage () |
| obtain error information. | |
| LIBRA_API void | libra_ClearLastErrorMessage () |
| reset the error information string. | |
| enum gBackend |
Libra backend types
| enum gDataType |
| enum gRenderMode |
| gVarHandle libra_Abs | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
computes the absolute value, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Add | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform addition, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_And | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Anddv | ( | gVarHandle * | dst, | |
| double | d, | |||
| gVarHandle | var | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| d | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Andfv | ( | gVarHandle * | dst, | |
| float | f, | |||
| gVarHandle | var | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| f | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Andvd | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| double | d | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| d | the right (scalar) operand. |
| gVarHandle libra_Andvf | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| float | f | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| f | the right (scalar) operand. |
| gVarHandle libra_ArcCos | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs arccosine (inverse of cosine), element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_ArcSin | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs arcsine (inverse of sine), element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_ArcTan | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs arctangent (inverse of tangent), element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Assign | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
assigns a Libra object to another object.
| dst | the handle of the destination object to be assigned. | |
| var | the handle of the source object to assign. |
| gVarHandle libra_Cast | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| gDataType | dataType | |||
| ) |
casts an object into a new object with the specified gDataType.
| dst | adress of destination handle. | |
| var | handle to the operand. | |
| dataType | the desired gDataType of the new object. |
| gVarHandle libra_Ceil | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
the input is rounded upwards to nearest integer, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_CGsolve | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
return the the solution of a linear equation system.
| dst | adress of destination handle. | |
| gVH1 | handle to the matrix operand. | |
| gVH2 | handle to the vector operand. |
| void libra_ClearLastErrorMessage | ( | ) |
reset the error information string.
All Libra functions and operations sets a string with information about what goes wrong, for example if you try to add a vector and a matrix this string will tell you that the operand dimensions did not match. A call to this function resets this string.
| gVarHandle libra_CmpEq | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
compares two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_CmpGeq | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
compares two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_CmpGt | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
compares two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle gVarHandle libra_CmpLeq | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
compares two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_CmpLt | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
compares two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Compare_NotEqual | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
compares two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_ComplexCreate | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates an MxN array of complex valued elements.
| dst | adress of destination handle. | |
| rowCount | number of rows to be created. | |
| columnCount | number of columns to be created. | |
| type | specifies the data type for the elements. |
| gVarHandle libra_ComplexCreateVar | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
return a Complex var from two Real var.
| dst | adress of destination handle. | |
| gVH1 | handle to the first var. | |
| gVH2 | handle to the second var. |
| gVarHandle libra_ComplexEye | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates an identity matrix.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
| gVarHandle libra_ComplexOnes | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates a matrix whose elements are all 1.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
| gVarHandle libra_ComplexSparse_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparse_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle gVarHandle libra_ComplexSparseBanded_d | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| double ** | values, | |||
| int * | positions, | |||
| int | bandCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate (Coord) format.
| dst | adress of destination handle. | |
| rowCount | number of rows | |
| columnCount | number of colums | |
| values | A array that contains pointers to the values of the band vectors | |
| positions | an array that contains each bands offset from the main diagonal | |
| bandCount | the number of bands | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle gVarHandle libra_ComplexSparseBanded_f | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| float ** | values, | |||
| int * | positions, | |||
| int | bandCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate (Coord) format.
| dst | adress of destination handle. | |
| rowCount | number of rows | |
| columnCount | number of colums | |
| values | A array that contains pointers to the values of the band vectors | |
| positions | an array that contains each bands offset from the main diagonal | |
| bandCount | the number of bands | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparseBlockDiagonal_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | blockCount, | |||
| int | type | |||
| ) |
creates a block diagonal sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| blockCount | the number of submatrices in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparseBlockDiagonal_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | blockCount, | |||
| int | type | |||
| ) |
creates a block diagonal sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| blockCount | the number of submatrices in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparseCSC_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | rows, | |||
| int * | colIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Column (CSC) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| colIndex | Element j of the integer array colIndex gives the index into the values array that contains the first non-zero element in a column j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparseCSC_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | rows, | |||
| int * | colIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Column (CSC) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| colIndex | Element j of the integer array colIndex gives the index into the values array that contains the first non-zero element in a column j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparseCSR_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | columns, | |||
| int * | rowIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Row (CSR) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| rowIndex | Element j of the integer array rowIndex gives the index into the values array that contains the first non-zero element in a row j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexSparseCSR_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | columns, | |||
| int * | rowIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Row (CSR) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| rowIndex | Element j of the integer array rowIndex gives the index into the values array that contains the first non-zero element in a row j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_ComplexZeros | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates a matrix whose elements are all 0.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
| gVarHandle libra_Cond | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2, | |||
| gVarHandle | gVH3 | |||
| ) |
condition operand ? left operand : right operand.
conditionally selects elements from two operators, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the condition operand. | |
| gVH2 | handle to the left operand. | |
| gVH3 | handle to the right operand. |
| gVarHandle libra_Conj | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
computes the conj of an object.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Cos | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs cosine, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Create | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates an MxN array.
| dst | adress of destination handle. | |
| rowCount | number of rows to be created. | |
| columnCount | number of columns to be created. | |
| type | specifies the data type for the elements. |
| gVarHandle gVarHandle libra_Diag | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
extracts the diagonal of an object
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Diag_K | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| int | k | |||
| ) |
creates an object (typically a matrix) with the specified diagonal at position k.
| dst | adress of destination handle. | |
| var | handle to the operand, i.e. a vector with the desired diagonal elements. | |
| k | the diagonal position |
| gVarHandle libra_Div | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform division, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Divdv | ( | gVarHandle * | dst, | |
| double | d, | |||
| gVarHandle | gVH2 | |||
| ) |
perform division, element by element.
| dst | adress of destination handle. | |
| d | the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Divfv | ( | gVarHandle * | dst, | |
| float | f, | |||
| gVarHandle | gVH2 | |||
| ) |
perform division, element by element.
| dst | adress of destination handle. | |
| f | the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Divvd | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| double | d | |||
| ) |
perform division, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| d | the right operand. |
| gVarHandle libra_Divvf | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| float | f | |||
| ) |
perform division, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| f | the right operand. |
| gVarHandle libra_Dot | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform the inner (dot) product.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Exp | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the exponential function of base e, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Exp10 | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the exponential function of base 10, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Exp2 | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the exponential function of base 2, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Eye | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates an identity matrix.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
| gVarHandle libra_FFT | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
return the 1D fourier transform of a gVar.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_FFTShift | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
swaps "half-spaces" of var along each dimension.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| void libra_Finish | ( | ) |
finish processing of all Libra API commands.
All Libra API commands are processed up to this point before returning control to application.
| gVarHandle libra_Floor | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
the input is rounded downwards (truncated) to the nearest integer, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| void libra_Flush | ( | ) |
flush all Libra API commands for processing.
All Libra API commands are immediately sent to current backend for processing.
| void libra_free | ( | const gHandle | memory | ) |
free the memory allocated using libra_malloc.
| memory | a pointer to memory |
| gVarHandle libra_GatherMatrix | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2, | |||
| gVarHandle | gVH3 | |||
| ) |
gathers selected elements from a (sparse) matrix.
| dst | adress of destination handle. | |
| gVH1 | handle to row selector operand. | |
| gVH2 | handle to column selector operand. | |
| gVH3 | handle to the object from which to gather. |
| gVarHandle libra_GatherVector | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
gathers selected elements from a vector.
| dst | adress of destination handle. | |
| gVH1 | handle to element selector operand. | |
| gVH2 | handle to the object from which to gather. |
| int libra_GetColumnCount | ( | gVarHandle | handle | ) |
get the number of columns from an object.
| handle | the handle of the queried object. |
| gBackend libra_GetCurrentBackend | ( | ) |
Get Libra API current compute backend.
| gDataType libra_GetDefaultDataType | ( | ) |
Get default Libra API data type.
| int libra_GetDefaultIndexing | ( | ) |
Get default Libra API indexing mode.
| void libra_GetDimensionCount | ( | gVarHandle | handle | ) |
get the number of dimensions from an object.
| handle | the handle of the queried object. |
| void libra_GetDoubleData | ( | gVarHandle | handle, | |
| double * | mem, | |||
| unsigned int | byteOffset, | |||
| unsigned int | byteCount, | |||
| gHandle | callFunc, | |||
| gHandle | userData | |||
| ) |
gets the elements of an object and writes them into an double array
| handle | the handle of the object which element data is to be fetched from. | |
| mem | adress of the memory to where to put the double precision data when available. | |
| byteOffset | a byte offset to the object's data. 0 offset is default. | |
| byteCount | a byte count defining amount of data in bytes to retrieve. 0 byte count means all object data. | |
| callFunc | user-supplied callback invoked as data is transferred. | |
| userData | user-supplied data passed back to callback. |
| int libra_GetElementCount | ( | gVarHandle | handle | ) |
get the number of elements from an object.
| handle | the handle of the queried object. |
| void libra_GetFloatData | ( | gVarHandle | handle, | |
| float * | mem, | |||
| unsigned int | byteOffset, | |||
| unsigned int | byteCount, | |||
| gHandle | callFunc, | |||
| gHandle | userData | |||
| ) |
gets the elements of an object and writes them into an float array
| handle | the handle of the object which element data is to be fetched from. | |
| mem | adress of the memory to where to put the float data when available. | |
| byteOffset | a byte offset to the object's data. 0 offset is default. | |
| byteCount | a byte count defining amount of data in bytes to retrieve. 0 byte count means all object data. | |
| callFunc | user-supplied callback invoked as data is transferred. | |
| userData | user-supplied data passed back to callback. |
| void libra_GetIntData | ( | gVarHandle | handle, | |
| int * | mem, | |||
| unsigned int | byteOffset, | |||
| unsigned int | byteCount, | |||
| gHandle | callFunc, | |||
| gHandle | userData | |||
| ) |
gets the elements of an object and writes them into an int array
| handle | the handle of the object which element data is to be fetched from. | |
| mem | adress of the memory to where to put the integer data when available. | |
| byteOffset | a byte offset to the object's data. 0 offset is default. | |
| byteCount | a byte count defining amount of data in bytes to retrieve. 0 byte count means all object data. | |
| callFunc | user-supplied callback invoked as data is transferred. | |
| userData | user-supplied data passed back to callback. |
| const char * libra_GetLastErrorMessage | ( | ) |
obtain error information.
| void libra_GetRenderBufferBytes8888 | ( | int * | renderBufferBytes | ) |
gets the byte elements of the renderbuffer object RGBA_8888 format and writes them into a sequential byte array
| renderBufferBytes | adress of the memory to where to put the byte data when available. |
| int libra_GetRowCount | ( | gVarHandle | handle | ) |
get the number of rows from an object.
| handle | the handle of the queried object. |
| double libra_GetTime | ( | ) |
used for performance measuring Libra API.
| int libra_GetType | ( | gVarHandle | handle | ) |
get the gDataType of an object.
| handle | the handle of the queried object. |
| const char * libra_GetVersion | ( | ) |
obtain version information.
| gVarHandle libra_IFFT | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
return the inverse 1D fourier transform of a gVar.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_IFFTShift | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
inverse swaps "half-spaces" of var along each dimension.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Imag | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
return Imag part of a gVar.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_ImageFilter | ( | gVarHandle * | dst, | |
| gVarHandle | var1, | |||
| gVarHandle | var2, | |||
| const char * | options | |||
| ) |
return the linear filtering of image var1 and filter var2.
| dst | adress of destination handle. | |
| var1 | handle to the image operand. | |
| var2 | handle to the filter operand. | |
| options | to control the details of filtering. |
| void libra_ImageRead | ( | gVarHandle * | dst, | |
| const char * | fileName, | |||
| int | type | |||
| ) |
creates a var matrix from an image file.
| dst | adress of destination handle. | |
| fileName | the filename of the image to be loaded relative to your binary path. | |
| type | specifies the data type for the elements. |
| gVarHandle libra_Indexmap | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| float | rowCoeff, | |||
| float | colCoeff, | |||
| float | offs, | |||
| int | type | |||
| ) |
creates an object where the element values are a linear function of their row, column index.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| rowCoeff | row index multiplier coefficient | |
| colCoeff | column index multiplier coefficient | |
| offs | an offset coefficient | |
| type | the gDataType to be used for representation of elements. |
| int libra_Init | ( | int | argc, | |
| char ** | argv | |||
| ) |
Initializes Libra API.
| argc | The number of arguments passed to this function. | |
| argv | An array of pointers to the parameters. |
Following command line parameters (argv) are valid: -b OPENCL_BACKEND, CUDA_BACKEND, OPENGL_BACKEND and CPU_BACKEND. -c ClientSDK, enables visual feedback for Libra SDK applications. -? HELP with cmdLine parameters.
| gVarHandle libra_InvSqrt | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
computes 1.0 divided by the squared root, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| int libra_IsComplex | ( | gVarHandle * | dst, | |
| gVarHandle | handle | |||
| ) |
return 1 if the queried object is a complex object othwerwise 0.
| dst | adress of destination handle. | |
| handle | the handle of the queried object. |
| int libra_IsReal | ( | gVarHandle * | dst, | |
| gVarHandle | handle | |||
| ) |
return 1 if the queried object is a real object othwerwise 0.
| dst | adress of destination handle. | |
| handle | the handle of the queried object. |
| int libra_IsSparse | ( | gVarHandle * | dst, | |
| gVarHandle | handle | |||
| ) |
return 1 if the queried object is a sparse data object othwerwise 0.
| dst | adress of destination handle. | |
| handle | the handle of the queried object. |
| gVarHandle libra_JacobiIter | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2, | |||
| gVarHandle | gVH3 | |||
| ) |
perform one jacobi iteration.
| dst | adress of destination handle. | |
| gVH1 | handle to the (sparse) matrix. | |
| gVH2 | handle to the vector(s). | |
| gVH3 | handle to the vector(s). |
| gVarHandle libra_JacobiSolve | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
return the the solution of a linear equation system.
| dst | adress of destination handle. | |
| gVH1 | handle to the matrix operand. | |
| gVH2 | handle to the vector operand. |
| gVarHandle libra_Log | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the natural logarithm, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Log10 | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the logarithm of base 10, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Log2 | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the logarithm of base 2, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Lsolve | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
return the the solution of a lower triangular equation system.
| dst | adress of destination handle. | |
| gVH1 | handle to the matrix operand. | |
| gVH2 | handle to the vector operand. |
| gHandle libra_malloc | ( | const unsigned int | byteCount | ) |
allocates count bytes of memory from computer main memory.
| byteCount | byte count. |
| gVarHandle libra_Matmul | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform matrix multiply.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Max | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs max of the elements of an object.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Maxvv | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform max, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Min | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs min of the elements of an object.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Minvv | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform min, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Mldivide | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform left division.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Mod | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform modulo operation, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Mul | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform multiply, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Muldv | ( | gVarHandle * | dst, | |
| double | d, | |||
| gVarHandle | var | |||
| ) |
perform multiply, element by element.
| dst | adress of destination handle. | |
| d | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Mulfv | ( | gVarHandle * | dst, | |
| float | f, | |||
| gVarHandle | var | |||
| ) |
perform multiply, element by element.
| dst | adress of destination handle. | |
| f | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Mulvd | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| double | d | |||
| ) |
perform multiply, element by element.
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| d | the right (scalar) operand. |
| gVarHandle libra_Mulvf | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| float | f | |||
| ) |
perform multiply, element by element.
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| f | the right (scalar) operand. |
| gVarHandle libra_Neg | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs negation.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Not | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
perform the logical not operation of an object, element by element
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Ones | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates a matrix whose elements are all 1.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
| gVarHandle libra_Or | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform the logical or operation of two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Ordv | ( | gVarHandle * | dst, | |
| double | d, | |||
| gVarHandle | var | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| d | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Orfv | ( | gVarHandle * | dst, | |
| float | f, | |||
| gVarHandle | var | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| f | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Orvd | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| double | d | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| d | the right (scalar) operand. |
| gVarHandle libra_Orvf | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| float | f | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| f | the right (scalar) operand. |
| gVarHandle libra_Pow | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
performs the power function, raising base left operand to the power of right operand, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| void libra_PrintDouble | ( | double | d | ) |
print d.
| d | double value to print. |
| void libra_PrintFloat | ( | float | f | ) |
print f.
| f | float value to print. |
| int libra_PrintInt | ( | int | i | ) |
print i.
| i | int value to print. |
| int libra_PrintText | ( | const char * | text | ) |
print the text string to output. Default output is stdout and debug window if available.
| text | the text string to be sent to output. |
| int libra_PrintVar | ( | gVarHandle | handle | ) |
print the elements of an object.
| handle | the handle of the object. |
| gVarHandle libra_Rand | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type, | |||
| float | scale | |||
| ) |
creates a matrix filled with random values.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. | |
| scale | the scale value to be multipled with the generated numbers [0.0f, 1.0f]. Default scale value is 1.0f. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
| gVarHandle libra_Real | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
return Real part of a gVar.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| void libra_Release | ( | gVarHandle * | handle | ) |
releases a gVarHandle.
| handle | a pointer to the gVarHandle to be released. |
| void libra_Render | ( | gVarHandle | var, | |
| gRenderMode | mode, | |||
| int | varRowStride | |||
| ) |
when Libra is in debug or SDK mode, displays a variable graphically.
| var | handle to the object to be displayed. | |
| mode | determines how the object is displayed. | |
| varRowStride | The logical stride of an object. For example specifying vector rowCount when displayed as 2D data. |
| void libra_RenderText | ( | const char * | string, | |
| unsigned int | pixelPosX, | |||
| unsigned int | pixelPosY, | |||
| unsigned int | byteColorRGBA | |||
| ) |
when Libra is in debug or SDK mode, displays a text string graphically.
| string | the text string to be displayed. | |
| pixelPosX | the x pixel position of the text string relative to upperleft corner of the window. | |
| pixelPosY | the y pixel position of the text string relative to upperleft corner of the window. | |
| byteColorRGBA | the byte component rgba color of the text string to be displayed. |
| gVarHandle libra_Round | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
the input is rounded to the nearest integer, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| void libra_ScatterMatrix | ( | gVarHandle | gVH1, | |
| gVarHandle | gVH2, | |||
| gVarHandle | gVH3, | |||
| gVarHandle | gVH4 | |||
| ) |
scatters elements into selected positions of a matrix.
| gVH1 | handle to element row selector operand. | |
| gVH2 | handle to element column selector operand. | |
| gVH3 | handle to values to be scattered operand. | |
| gVH4 | handle to the matrix which to scatter the values into. |
| void libra_ScatterMatrixiid | ( | int | i, | |
| int | j, | |||
| double | value, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i,j of a matrix, vector or scalar.
| i | to element row selector operand. | |
| j | to element column selector operand. | |
| value | scatter value operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterMatrixiidd | ( | int | i, | |
| int | j, | |||
| double | re, | |||
| double | im, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i,j of a matrix, vector or scalar.
| i | to element row selector operand. | |
| j | to element column selector operand. | |
| re | scatter re operand. | |
| im | scatter im operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterMatrixiif | ( | int | i, | |
| int | j, | |||
| float | value, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i,j of a matrix, vector or scalar.
| i | to element row selector operand. | |
| j | to element column selector operand. | |
| value | scatter value operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterMatrixiiff | ( | int | i, | |
| int | j, | |||
| float | re, | |||
| float | im, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i,j of a matrix, vector or scalar.
| i | to element row selector operand. | |
| j | to element column selector operand. | |
| re | scatter re operand. | |
| im | scatter im operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterVector | ( | gVarHandle | gVH1, | |
| gVarHandle | gVH2, | |||
| gVarHandle | gVH3 | |||
| ) |
scatters elements into selected positions of a vector.
| gVH1 | handle to element selector operand. | |
| gVH2 | handle to values to be scattered operand. | |
| gVH3 | handle to the vector which to scatter the values into. |
| void libra_ScatterVectorid | ( | int | i, | |
| double | value, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i of a vector.
| i | to element row selector operand. | |
| value | scatter value operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterVectoridd | ( | int | i, | |
| double | re, | |||
| double | im, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i of a vector.
| i | to element row selector operand. | |
| re | scatter re operand. | |
| im | scatter im operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterVectorif | ( | int | i, | |
| float | value, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i of a vector.
| i | to element row selector operand. | |
| value | scatter value operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_ScatterVectoriff | ( | int | i, | |
| float | re, | |||
| float | im, | |||
| gVarHandle | var | |||
| ) |
scatters element into selected position i of a vector.
| i | to element row selector operand. | |
| re | scatter re operand. | |
| im | scatter im operand. | |
| var | handle to the matrix which to scatter the values into. |
| void libra_SetCurrentBackend | ( | enum gBackend | backend | ) |
Set Libra API current compute backend.
| backend | the backend to be used for computations. |
| void libra_SetDefaultDataType | ( | gDataType | dataType | ) |
Set default Libra API data type.
| dataType | the data type to be used when no type is explicitly selected by the user. |
| void libra_SetDefaultIndexing | ( | int | indexing | ) |
Set default Libra API indexing mode.
| indexing | the indexing mode used by Libra API. |
| void libra_SetDoubleData | ( | gVarHandle | handle, | |
| const double * | mem, | |||
| unsigned int | byteOffset, | |||
| unsigned int | byteCount, | |||
| gHandle | callFunc, | |||
| gHandle | userData | |||
| ) |
sets the elements of an object from an double array
| handle | the handle of the object which element data is to be set. | |
| mem | adress of the memory from where to fetch the double precision data. | |
| byteOffset | a byte offset to the object's data. 0 offset is default. | |
| byteCount | a byte count defining amount of data in bytes to send to object. 0 byte count means data equal to object size. | |
| callFunc | user-supplied callback invoked as data is transferred. | |
| userData | user-supplied data passed back to callback. |
| void libra_SetFloatData | ( | gVarHandle | handle, | |
| const float * | mem, | |||
| unsigned int | byteOffset, | |||
| unsigned int | byteCount, | |||
| gHandle | callFunc, | |||
| gHandle | userData | |||
| ) |
sets the elements of an object from an float array
| handle | the handle of the object which element data is to be set. | |
| mem | adress of the memory from where to fetch the floating point data. | |
| byteOffset | a byte offset to the object's data. 0 offset is default. | |
| byteCount | a byte count defining amount of data in bytes to send to object. 0 byte count means data equal to object size. | |
| callFunc | user-supplied callback invoked as data is transferred. | |
| userData | user-supplied data passed back to callback. |
| void libra_SetIntData | ( | gVarHandle | handle, | |
| const int * | mem, | |||
| unsigned int | byteOffset, | |||
| unsigned int | byteCount, | |||
| gHandle | callFunc, | |||
| gHandle | userData | |||
| ) |
sets the elements of an object from an integer array
| handle | the handle of the object which element data is to be set. | |
| mem | adress of the memory from where to fetch the integer data. | |
| byteOffset | a byte offset to the object's data. 0 offset is default. | |
| byteCount | a byte count defining amount of data in bytes to send to object. 0 byte count means data equal to object size. | |
| callFunc | user-supplied callback invoked as data is transferred. | |
| userData | user-supplied data passed back to callback. |
| int libra_SetPrintFunc | ( | void(*)(const char *msg) | func | ) |
set print function.
| func | the print function. |
| void libra_SetRenderMatrix | ( | float * | matrix4x4 | ) |
when Libra is in debug or SDK mode, displays a variable graphically, transformed by the supplied 4x4 transform matrix.
| matrix4x4 | 16 floating point values representing the render transform matrix. |
| void libra_Shutdown | ( | ) |
Shutdown Libra API and release Libra internal resources.
Called before exiting your sample application.
| gVarHandle libra_Sign | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs the sign (sgn) function, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Sin | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs sine, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Sort | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
return a sorted gVar.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Sparse_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_Sparse_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle gVarHandle libra_SparseBanded2_d | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| double * | values, | |||
| int * | positions, | |||
| int | bandCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate (Coord) format.
| dst | adress of destination handle. | |
| rowCount | number of rows | |
| columnCount | number of colums | |
| values | A array that contains the values of the band vectors | |
| positions | an array that contains each bands offset from the main diagonal | |
| bandCount | the number of bands | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle gVarHandle libra_SparseBanded2_f | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| float * | values, | |||
| int * | positions, | |||
| int | bandCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate (Coord) format.
| dst | adress of destination handle. | |
| rowCount | number of rows | |
| columnCount | number of colums | |
| values | A array that contains the values of the band vectors | |
| positions | an array that contains each bands offset from the main diagonal | |
| bandCount | the number of bands | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle gVarHandle libra_SparseBanded_d | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| double ** | values, | |||
| int * | positions, | |||
| int | bandCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate (Coord) format.
| dst | adress of destination handle. | |
| rowCount | number of rows | |
| columnCount | number of colums | |
| values | A array that contains pointers to the values of the band vectors | |
| positions | an array that contains each bands offset from the main diagonal | |
| bandCount | the number of bands | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle gVarHandle libra_SparseBanded_f | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| float ** | values, | |||
| int * | positions, | |||
| int | bandCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate (Coord) format.
| dst | adress of destination handle. | |
| rowCount | number of rows | |
| columnCount | number of colums | |
| values | A array that contains pointers to the values of the band vectors | |
| positions | an array that contains each bands offset from the main diagonal | |
| bandCount | the number of bands | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_SparseBlockDiagonal_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | blockCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| blockCount | the number of submatrices in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_SparseBlockDiagonal_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | rows, | |||
| int * | columns, | |||
| int | nz, | |||
| int | blockCount, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Coordinate format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| nz | the number of non zero elements in A. | |
| blockCount | the number of submatrices in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_SparseCSC_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | rows, | |||
| int * | colIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Column (CSC) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| colIndex | Element j of the integer array colIndex gives the index into the values array that contains the first non-zero element in a column j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_SparseCSC_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | rows, | |||
| int * | colIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Column (CSC) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| rows | Element i of the integer array rows contains the number of the row in A that contained the value in values(i). | |
| colIndex | Element j of the integer array colIndex gives the index into the values array that contains the first non-zero element in a column j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_SparseCSR_d | ( | gVarHandle * | dst, | |
| double * | values, | |||
| int * | columns, | |||
| int * | rowIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Row (CSR) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| rowIndex | Element j of the integer array rowIndex gives the index into the values array that contains the first non-zero element in a row j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_SparseCSR_f | ( | gVarHandle * | dst, | |
| float * | values, | |||
| int * | columns, | |||
| int * | rowIndex, | |||
| int | nz, | |||
| int | type | |||
| ) |
creates a sparse matrix, with input in Compressed Sparse Row (CSR) format.
| dst | adress of destination handle. | |
| values | A array that contains the non-zero entries of A. | |
| columns | Element i of the integer array columns contains the number of the column in A that contained the value in values(i). | |
| rowIndex | Element j of the integer array rowIndex gives the index into the values array that contains the first non-zero element in a row j of A. | |
| nz | the number of non zero elements in A. | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_Sqrt | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
computes the squared root, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Step | ( | gVarHandle * | dst, | |
| float | from, | |||
| float | to, | |||
| float | stride, | |||
| int | type | |||
| ) |
creates a vector which elements are in a sequence
| dst | adress of destination handle. | |
| from | the number which the sequence starts with. | |
| to | the number which the sequence ends with | |
| stride | the difference between any two elements in the sequence next to eachother | |
| type | the gDataType to be used for representation of elements. |
| gVarHandle libra_Sub | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform subtraction, element by element.
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Subarray | ( | gVarHandle * | dst, | |
| gVarHandle | rows, | |||
| gVarHandle | columns, | |||
| gVarHandle | array | |||
| ) |
returns a subarray of a Libra object to another object.
| dst | the handle of the destination object to be assigned. | |
| array | the handle of object representing the array. | |
| rows | the handle of object representing row span. | |
| columns | the handle of object representing column span. |
| gVarHandle libra_Sum | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
computes the sum of all elements in an object.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Tan | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
performs tangent, element by element.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Transpose | ( | gVarHandle * | dst, | |
| gVarHandle | var | |||
| ) |
computes the transpose of an object.
| dst | adress of destination handle. | |
| var | handle to the operand. |
| gVarHandle libra_Usolve | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
return the the solution of a upper triangular equation system.
| dst | adress of destination handle. | |
| gVH1 | handle to the matrix operand. | |
| gVH2 | handle to the vector operand. |
| gVarHandle libra_Xor | ( | gVarHandle * | dst, | |
| gVarHandle | gVH1, | |||
| gVarHandle | gVH2 | |||
| ) |
perform the logical xor operation of two objects, element by element
| dst | adress of destination handle. | |
| gVH1 | handle to the left operand. | |
| gVH2 | handle to the right operand. |
| gVarHandle libra_Xordv | ( | gVarHandle * | dst, | |
| double | d, | |||
| gVarHandle | var | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| d | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Xorfv | ( | gVarHandle * | dst, | |
| float | f, | |||
| gVarHandle | var | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| f | the left (scalar) operand. | |
| var | handle to the right operand. |
| gVarHandle libra_Xorvd | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| double | d | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| d | the right (scalar) operand. |
| gVarHandle libra_Xorvf | ( | gVarHandle * | dst, | |
| gVarHandle | var, | |||
| float | f | |||
| ) |
perform the logical and operation of two objects, element by element
| dst | adress of destination handle. | |
| var | handle to the left operand. | |
| f | the right (scalar) operand. |
| gVarHandle libra_Zeros | ( | gVarHandle * | dst, | |
| int | rowCount, | |||
| int | columnCount, | |||
| int | type | |||
| ) |
creates a matrix whose elements are all 0.
| dst | adress of destination handle. | |
| rowCount | the number of rows to be created. | |
| columnCount | the number of columns to be created. | |
| type | the gDataType to be used for representation of elements. |
Depending on rowCount and columnCount, the returned gVarHandle can also represent a vector or a scalar.
1.5.2