Open Deep Learning API
Loading...
Searching...
No Matches
Macros | Typedefs | Enumerations
odla_common.h File Reference

Go to the source code of this file.

Macros

#define NULL   ((void*)0)
 
#define ODLA_API_EXPORT
 API export directives. More...
 
#define ODLA_API_CALL
 

Typedefs

typedef __INT8_TYPE__ odla_int8
 
typedef __INT16_TYPE__ odla_int16
 
typedef __INT32_TYPE__ odla_int32
 
typedef __INT64_TYPE__ odla_int64
 
typedef __UINT8_TYPE__ odla_uint8
 
typedef __UINT16_TYPE__ odla_uint16
 
typedef __UINT32_TYPE__ odla_uint32
 
typedef __UINT64_TYPE__ odla_uint64
 
typedef __INT8_TYPE__ odla_qint8
 
typedef __INT16_TYPE__ odla_qint16
 
typedef __INT32_TYPE__ odla_qint32
 
typedef __INT64_TYPE__ odla_qint64
 
typedef __UINT8_TYPE__ odla_quint8
 
typedef __UINT16_TYPE__ odla_quint16
 
typedef __UINT32_TYPE__ odla_quint32
 
typedef __UINT64_TYPE__ odla_quint64
 
typedef __UINT16_TYPE__ odla_float16
 
typedef __UINT16_TYPE__ odla_bfloat16
 
typedef float odla_float32
 
typedef double odla_float64
 
typedef const char * odla_string
 
typedef odla_uint32 odla_bool
 
typedef char odla_char
 char More...
 
typedef __SIZE_TYPE__ odla_size_t
 size_t More...
 
typedef void odla_void
 void More...
 

Enumerations

enum  odla_element_type {
  ODLA_INT8 , ODLA_INT16 , ODLA_INT32 , ODLA_INT64 ,
  ODLA_UINT8 , ODLA_UINT16 , ODLA_UINT32 , ODLA_UINT64 ,
  ODLA_QINT8 , ODLA_QINT16 , ODLA_QINT32 , ODLA_QINT64 ,
  ODLA_QUINT8 , ODLA_QUINT16 , ODLA_QUINT32 , ODLA_QUINT64 ,
  ODLA_FLOAT16 , ODLA_BFLOAT16 , ODLA_FLOAT32 , ODLA_FLOAT64 ,
  ODLA_BOOL , ODLA_STRING
}
 
enum  odla_status {
  ODLA_SUCCESS , ODLA_DL_ERROR , ODLA_FILE_NOT_EXIST , ODLA_INVALID_PARAM ,
  ODLA_MEM_ERROR , ODLA_UNSUPPORTED_DATATYPE , ODLA_UNSUPPORTED_DEVICE_TYPE , ODLA_UNSUPPORTED_OP ,
  ODLA_TIMEOUT , ODLA_INTERNAL_LOGIC_ERR , ODLA_RECOVERABLE_ERR , ODLA_PARTITION_RESET ,
  ODLA_FULL_RESET , ODLA_UNRECOVERABLE_ERR , ODLA_FAILURE
}
 Return status. More...
 

Detailed Description

This file defines the ODLA basic common types.

Definition in file odla_common.h.

Macro Definition Documentation

◆ NULL

#define NULL   ((void*)0)

Definition at line 96 of file odla_common.h.

◆ ODLA_API_CALL

#define ODLA_API_CALL

Definition at line 173 of file odla_common.h.

◆ ODLA_API_EXPORT

#define ODLA_API_EXPORT

API export directives.

Definition at line 172 of file odla_common.h.

Typedef Documentation

◆ odla_bfloat16

typedef __UINT16_TYPE__ odla_bfloat16

16-bit brain floating point type

Definition at line 89 of file odla_common.h.

◆ odla_bool

boolean type

Definition at line 99 of file odla_common.h.

◆ odla_char

typedef char odla_char

char

Definition at line 131 of file odla_common.h.

◆ odla_float16

typedef __UINT16_TYPE__ odla_float16

16-bit floating point type

Definition at line 88 of file odla_common.h.

◆ odla_float32

typedef float odla_float32

32-bit floating point type

Definition at line 90 of file odla_common.h.

◆ odla_float64

typedef double odla_float64

64-bit floating point type

Definition at line 91 of file odla_common.h.

◆ odla_int16

typedef __INT16_TYPE__ odla_int16

16-bit signed integer type

Definition at line 65 of file odla_common.h.

◆ odla_int32

typedef __INT32_TYPE__ odla_int32

32-bit signed integer type

Definition at line 66 of file odla_common.h.

◆ odla_int64

typedef __INT64_TYPE__ odla_int64

64-bit signed integer type

Definition at line 67 of file odla_common.h.

◆ odla_int8

typedef __INT8_TYPE__ odla_int8

8-bit signed integer type

Definition at line 64 of file odla_common.h.

◆ odla_qint16

typedef __INT16_TYPE__ odla_qint16

16-bit signed quantized integer type

Definition at line 75 of file odla_common.h.

◆ odla_qint32

typedef __INT32_TYPE__ odla_qint32

32-bit signed quantized integer type

Definition at line 76 of file odla_common.h.

◆ odla_qint64

typedef __INT64_TYPE__ odla_qint64

64-bit signed quantized integer type

Definition at line 77 of file odla_common.h.

◆ odla_qint8

typedef __INT8_TYPE__ odla_qint8

8-bit signed quantized integer type

Definition at line 74 of file odla_common.h.

◆ odla_quint16

typedef __UINT16_TYPE__ odla_quint16

16-bit unsigned quantized integer type

Definition at line 81 of file odla_common.h.

◆ odla_quint32

typedef __UINT32_TYPE__ odla_quint32

32-bit unsigned quantized integer type

Definition at line 83 of file odla_common.h.

◆ odla_quint64

typedef __UINT64_TYPE__ odla_quint64

64-bit unsigned quantized integer type

Definition at line 85 of file odla_common.h.

◆ odla_quint8

typedef __UINT8_TYPE__ odla_quint8

8-bit unsigned quantized integer type

Definition at line 79 of file odla_common.h.

◆ odla_size_t

typedef __SIZE_TYPE__ odla_size_t

size_t

Definition at line 134 of file odla_common.h.

◆ odla_string

typedef const char* odla_string

pointer to NULL-terminated string

Definition at line 92 of file odla_common.h.

◆ odla_uint16

typedef __UINT16_TYPE__ odla_uint16

16-bit unsigned integer type

Definition at line 69 of file odla_common.h.

◆ odla_uint32

typedef __UINT32_TYPE__ odla_uint32

32-bit unsigned integer type

Definition at line 70 of file odla_common.h.

◆ odla_uint64

typedef __UINT64_TYPE__ odla_uint64

64-bit unsigned integer type

Definition at line 71 of file odla_common.h.

◆ odla_uint8

typedef __UINT8_TYPE__ odla_uint8

8-bit unsigned integer type

Definition at line 68 of file odla_common.h.

◆ odla_void

typedef void odla_void

void

Definition at line 137 of file odla_common.h.

Enumeration Type Documentation

◆ odla_element_type

enum odla_element_type

Definition at line 102 of file odla_common.h.

102 {
103 ODLA_INT8,
104 ODLA_INT16,
105 ODLA_INT32,
106 ODLA_INT64,
107 ODLA_UINT8,
108 ODLA_UINT16,
109 ODLA_UINT32,
110 ODLA_UINT64,
111
112 ODLA_QINT8,
113 ODLA_QINT16,
114 ODLA_QINT32,
115 ODLA_QINT64,
116 ODLA_QUINT8,
117 ODLA_QUINT16,
118 ODLA_QUINT32,
119 ODLA_QUINT64,
120
121 ODLA_FLOAT16,
122 ODLA_BFLOAT16,
123 ODLA_FLOAT32,
124 ODLA_FLOAT64,
125
126 ODLA_BOOL,
127 ODLA_STRING,
128} odla_element_type;

◆ odla_status

Return status.

Enumerator
ODLA_DL_ERROR 

dlopen a shared library error

ODLA_INVALID_PARAM 

illegal input argument, such as nullptr

ODLA_MEM_ERROR 

allocate/deallocate memory error, out of memory error

ODLA_UNSUPPORTED_OP 

odla op is not implemented yet

ODLA_TIMEOUT 

process timeout

ODLA_INTERNAL_LOGIC_ERR 

internal error

ODLA_RECOVERABLE_ERR 

auto recoverable error

ODLA_PARTITION_RESET 

manual recoverable error, include partition reset and full reset type

ODLA_UNRECOVERABLE_ERR 

unrecoverable error

Definition at line 140 of file odla_common.h.

140 {
141 ODLA_SUCCESS,
144 ODLA_FILE_NOT_EXIST,
149 ODLA_UNSUPPORTED_DATATYPE,
150 ODLA_UNSUPPORTED_DEVICE_TYPE,
161 ODLA_FULL_RESET,
164 ODLA_FAILURE,
odla_status
Return status.
Definition: odla_common.h:140
@ ODLA_INTERNAL_LOGIC_ERR
internal error
Definition: odla_common.h:156
@ ODLA_TIMEOUT
process timeout
Definition: odla_common.h:154
@ ODLA_MEM_ERROR
allocate/deallocate memory error, out of memory error
Definition: odla_common.h:148
@ ODLA_PARTITION_RESET
manual recoverable error, include partition reset and full reset type
Definition: odla_common.h:160
@ ODLA_INVALID_PARAM
illegal input argument, such as nullptr
Definition: odla_common.h:146
@ ODLA_DL_ERROR
dlopen a shared library error
Definition: odla_common.h:143
@ ODLA_RECOVERABLE_ERR
auto recoverable error
Definition: odla_common.h:158
@ ODLA_UNRECOVERABLE_ERR
unrecoverable error
Definition: odla_common.h:163
@ ODLA_UNSUPPORTED_OP
odla op is not implemented yet
Definition: odla_common.h:152