Datatypes that shogun supports.
Definition at line 68 of file DataType.h.
|
| TSGDataType (EContainerType ctype, EStructType stype, EPrimitiveType ptype) |
|
| TSGDataType (EContainerType ctype, EStructType stype, EPrimitiveType ptype, index_t *length) |
|
| TSGDataType (EContainerType ctype, EStructType stype, EPrimitiveType ptype, index_t *length_y, index_t *length_x) |
|
bool | equals (TSGDataType other) |
|
bool | equals_without_length (TSGDataType other) |
|
bool | operator== (const TSGDataType &a) |
|
bool | operator!= (const TSGDataType &a) |
|
void | to_string (char *dest, size_t n) const |
|
size_t | sizeof_stype () const |
|
size_t | sizeof_ptype () const |
|
size_t | get_size () |
|
int64_t | get_num_elements () |
|
◆ TSGDataType() [1/3]
TSGDataType |
( |
EContainerType |
ctype, |
|
|
EStructType |
stype, |
|
|
EPrimitiveType |
ptype |
|
) |
| |
|
explicit |
◆ TSGDataType() [2/3]
TSGDataType |
( |
EContainerType |
ctype, |
|
|
EStructType |
stype, |
|
|
EPrimitiveType |
ptype, |
|
|
index_t * |
length |
|
) |
| |
|
explicit |
◆ TSGDataType() [3/3]
constructor
- Parameters
-
ctype | |
stype | |
ptype | |
length_y | |
length_x | |
Definition at line 36 of file DataType.cpp.
◆ equals()
Compares the content of the data types, including the length fields if non-NULL
- Returns
- other type to compare with
-
true if equals, false otherwise
Definition at line 95 of file DataType.cpp.
◆ equals_without_length()
Compares the content of the data types, excluding the length fields
- Returns
- other type to compare with
-
true if equals, false otherwise
Definition at line 67 of file DataType.cpp.
◆ get_num_elements()
int64_t get_num_elements |
( |
| ) |
|
get num of elements
- Returns
- number of (matrix, vector, scalar) elements of type
Definition at line 464 of file DataType.cpp.
◆ get_size()
get size
- Returns
- size of type in bytes
Definition at line 440 of file DataType.cpp.
◆ offset_sparseentry()
size_t offset_sparseentry |
( |
EPrimitiveType |
ptype | ) |
|
|
static |
offset of sparse entry
- Parameters
-
Definition at line 308 of file DataType.cpp.
◆ operator!=()
◆ operator==()
◆ ptype_to_string()
void ptype_to_string |
( |
char * |
dest, |
|
|
EPrimitiveType |
ptype, |
|
|
size_t |
n |
|
) |
| |
|
static |
◆ sizeof_ptype() [1/2]
size_t sizeof_ptype |
( |
| ) |
const |
◆ sizeof_ptype() [2/2]
size_t sizeof_ptype |
( |
EPrimitiveType |
ptype | ) |
|
|
static |
get the size of the primitive type ptype
- Parameters
-
- Returns
- its size
Definition at line 252 of file DataType.cpp.
◆ sizeof_sparseentry()
size_t sizeof_sparseentry |
( |
EPrimitiveType |
ptype | ) |
|
|
static |
size of sparse entry
- Parameters
-
Definition at line 279 of file DataType.cpp.
◆ sizeof_stype() [1/2]
size_t sizeof_stype |
( |
| ) |
const |
◆ sizeof_stype() [2/2]
size_t sizeof_stype |
( |
EStructType |
stype, |
|
|
EPrimitiveType |
ptype |
|
) |
| |
|
static |
get the size of the structured type stype that internally uses the primitive type ptype as type
- Parameters
-
stype | the structured type |
ptype | the primitive type |
- Returns
- its size
Definition at line 189 of file DataType.cpp.
◆ string_to_ptype()
bool string_to_ptype |
( |
EPrimitiveType * |
ptype, |
|
|
const char * |
str |
|
) |
| |
|
static |
◆ stype_to_string()
void stype_to_string |
( |
char * |
dest, |
|
|
EStructType |
stype, |
|
|
EPrimitiveType |
ptype, |
|
|
size_t |
n |
|
) |
| |
|
static |
◆ to_string()
void to_string |
( |
char * |
dest, |
|
|
size_t |
n |
|
) |
| const |
◆ m_ctype
◆ m_length_x
◆ m_length_y
◆ m_ptype
◆ m_stype
The documentation for this struct was generated from the following files: