MetricKnn API
Fast Similarity Search using the Metric Space Approach
Functions | Variables
mknn_datatype.h File Reference

Datatype Constants. More...

#include "../metricknn_c.h"

Go to the source code of this file.

Functions

bool mknn_datatype_isAnySignedInteger (const MknnDatatype datatype)
 Returns whether the given datatype is one of the signed integer types. More...
 
bool mknn_datatype_isAnyUnsignedInteger (const MknnDatatype datatype)
 Returns whether the given datatype is one of the unsigned integer types. More...
 
bool mknn_datatype_isAnyFloatingPoint (const MknnDatatype datatype)
 Returns whether the given datatype is one of the floating point types. More...
 
bool mknn_datatype_isInt8 (const MknnDatatype datatype)
 
bool mknn_datatype_isInt16 (const MknnDatatype datatype)
 
bool mknn_datatype_isInt32 (const MknnDatatype datatype)
 
bool mknn_datatype_isInt64 (const MknnDatatype datatype)
 
bool mknn_datatype_isUInt8 (const MknnDatatype datatype)
 
bool mknn_datatype_isUInt16 (const MknnDatatype datatype)
 
bool mknn_datatype_isUInt32 (const MknnDatatype datatype)
 
bool mknn_datatype_isUInt64 (const MknnDatatype datatype)
 
bool mknn_datatype_isFloat (const MknnDatatype datatype)
 
bool mknn_datatype_isDouble (const MknnDatatype datatype)
 
bool mknn_datatype_areEqual (const MknnDatatype datatype1, const MknnDatatype datatype2)
 Returns if two datatypes are identical. More...
 
size_t mknn_datatype_sizeof (const MknnDatatype datatype)
 Returns the size in bytes of the given datatype (a number between 1 and 8). More...
 
const char * mknn_datatype_toString (const MknnDatatype datatype)
 
bool mknn_datatype_parseString (const char *string, MknnDatatype *out_datatype)
 

Variables

MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_8bits
 Integer 8 bits-length signed. More...
 
MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_16bits
 Integer 16 bits-length signed. More...
 
MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_32bits
 Integer 32 bits-length signed. More...
 
MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_64bits
 Integer 64 bits-length signed. More...
 
MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_8bits
 Integer 8 bits-length unsigned. More...
 
MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_16bits
 Integer 16 bits-length unsigned. More...
 
MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_32bits
 Integer 32 bits-length unsigned. More...
 
MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_64bits
 Integer 64 bits-length unsigned. More...
 
MknnDatatype MKNN_DATATYPE_FLOATING_POINT_32bits
 Floating point 32 bits-length. More...
 
MknnDatatype MKNN_DATATYPE_FLOATING_POINT_64bits
 Floating point 64 bits-length. More...
 

Detailed Description

Datatype Constants.

Function Documentation

bool mknn_datatype_areEqual ( const MknnDatatype  datatype1,
const MknnDatatype  datatype2 
)

Returns if two datatypes are identical.

Parameters
datatype1one of the constants MKNN_DATATYPE_xxx.
datatype2one of the constants MKNN_DATATYPE_xxx.
Returns
true if datatype1 and datatype2 are identical.
bool mknn_datatype_isAnyFloatingPoint ( const MknnDatatype  datatype)

Returns whether the given datatype is one of the floating point types.

Parameters
datatypeone of the constants MKNN_DATATYPE_xxx.
Returns
true if datatype is MKNN_DATATYPE_FLOATING_POINT_32bits or MKNN_DATATYPE_FLOATING_POINT_64bits, false otherwise.
bool mknn_datatype_isAnySignedInteger ( const MknnDatatype  datatype)

Returns whether the given datatype is one of the signed integer types.

Parameters
datatypeone of the constants MKNN_DATATYPE_xxx.
Returns
true if datatype is MKNN_DATATYPE_SIGNED_INTEGER_8bits or MKNN_DATATYPE_SIGNED_INTEGER_16bits or MKNN_DATATYPE_SIGNED_INTEGER_32bits or MKNN_DATATYPE_SIGNED_INTEGER_64bits, false otherwise.
bool mknn_datatype_isAnyUnsignedInteger ( const MknnDatatype  datatype)

Returns whether the given datatype is one of the unsigned integer types.

Parameters
datatypeone of the constants MKNN_DATATYPE_xxx.
Returns
true if datatype is MKNN_DATATYPE_UNSIGNED_INTEGER_8bits or MKNN_DATATYPE_UNSIGNED_INTEGER_16bits or MKNN_DATATYPE_UNSIGNED_INTEGER_32bits or MKNN_DATATYPE_UNSIGNED_INTEGER_64bits, false otherwise.
bool mknn_datatype_parseString ( const char *  string,
MknnDatatype out_datatype 
)
Parameters
stringthe string to read and parse a datatype. The string should be a value returned by mknn_datatype_toString.
out_datatypethe parsed value
Returns
true if some value was assigned to out_datatype
size_t mknn_datatype_sizeof ( const MknnDatatype  datatype)

Returns the size in bytes of the given datatype (a number between 1 and 8).

Parameters
datatypeone of the constants MKNN_DATATYPE_xxx.
Returns
size in bytes of the given datatype.
const char* mknn_datatype_toString ( const MknnDatatype  datatype)
Parameters
datatypethe constant
Returns
a string with a string representation

Variable Documentation

MknnDatatype MKNN_DATATYPE_FLOATING_POINT_32bits

Floating point 32 bits-length.

Corresponds to standard C type float.

MknnDatatype MKNN_DATATYPE_FLOATING_POINT_64bits

Floating point 64 bits-length.

Corresponds to standard C type double.

MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_16bits

Integer 16 bits-length signed.

Corresponds to int16_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_32bits

Integer 32 bits-length signed.

Corresponds to int32_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_64bits

Integer 64 bits-length signed.

Corresponds to int64_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_SIGNED_INTEGER_8bits

Integer 8 bits-length signed.

Corresponds to int8_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_16bits

Integer 16 bits-length unsigned.

Corresponds to uint16_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_32bits

Integer 32 bits-length unsigned.

Corresponds to uint32_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_64bits

Integer 64 bits-length unsigned.

Corresponds to uint64_t (see stdint.h).

MknnDatatype MKNN_DATATYPE_UNSIGNED_INTEGER_8bits

Integer 8 bits-length unsigned.

Corresponds to uint8_t (see stdint.h).

Powered by Download MetricKnn