morapi_Device Struct Reference
Device information.
More...
#include <morapi_softneuro.h>
Public Member Functions
Related Functions
morapi_Int32 | morapi_Dnn_static_getDeviceNum (morapi_Env *env) |
const morapi_Device * | morapi_Dnn_static_getDevice (morapi_Env *env, morapi_Int32 i_index) |
const morapi_Device * | morapi_Dnn_static_findDevice (morapi_Env *env, const morapi_Char *i_device_name) |
Detailed Description
Device information.
This structure holds device specific information such as memory model, thread model, cache line size and so on.
See also
morapi_DeviceCB, MORAPI_INSTALL_DEVICE()
Member Function Documentation
morapi_Device_getObj()
void * morapi_Device_getObj (const morapi_Device * self)
Gets the device object.
Parameters
- self : device module
morapi_Device_getName()
const morapi_Char * morapi_Device_getName (const morapi_Device * self)
Gets the device name.
Parameters
- self : device module
morapi_Device_getIndex()
morapi_Int32 morapi_Device_getIndex (const morapi_Device * self)
Gets the index.
Parameters
- self : device module
morapi_Device_setArchID()
morapi_Result morapi_Device_setArchID (morapi_Device * self,
morapi_Uint64 i_arch_id)
Sets the architecture ID.
Parameters
- self : device module
- i_arch_id : architecture id
morapi_Device_getArchID()
morapi_Uint64 morapi_Device_getArchID (const morapi_Device * self)
Gets the device architecture ID.
Parameters
- self : device module
morapi_Device_setMemoryModel()
morapi_Result morapi_Device_setMemoryModel (morapi_Device * self,
morapi_DeviceMemoryModel i_memory_model)
Sets the device memory model.
The default is MORAPI_DEVICE_MEMORY_MODEL_DEDICATED.
Parameters
- self : device module
- i_memory_model : memory model
morapi_Device_getMemoryModel()
morapi_DeviceMemoryModel morapi_Device_getMemoryModel (const morapi_Device * self)
Gets the device memory model.
Parameters
- self : device module
morapi_Device_setThreadModel()
morapi_Result morapi_Device_setThreadModel (morapi_Device * self,
morapi_DeviceThreadModel i_thread_model)
Sets the device thread model.
The default is MORAPI_DEVICE_THREAD_MODEL_UNSHARED.
Parameters
- self : device module
- i_thread_model : thread model
morapi_Device_getThreadModel()
morapi_DeviceThreadModel morapi_Device_getThreadModel (const morapi_Device * self)
Gets the device thread model.
Parameters
- self : device model
morapi_Device_setCacheLineSize()
morapi_Result morapi_Device_setCacheLineSize (morapi_Device * self,
morapi_Int32 i_cache_line_size)
Sets the cache line size.
The default is 64 (arm and intel cpu).
Parameters
- self : device.
- i_cache_line_size : cache line size.
morapi_Device_getCacheLineSize()
morapi_Int32 morapi_Device_getCacheLineSize (const morapi_Device * self)
Gets the cache line size.
The default is 64 (arm and intel cpu).
Parameters
- self : device.
morapi_Device_getFeatureNum()
morapi_Int32 morapi_Device_getFeatureNum (const morapi_Device * self)
Gets the number of features.
morapi_Device_getFeatures()
const morapi_Char ** morapi_Device_getFeatures (const morapi_Device * self)
Gets the features.
Friends And Related Function Documentation
morapi_Dnn_static_getDeviceNum()
morapi_Int32 morapi_Dnn_static_getDeviceNum (morapi_Env * env)
Gets the number of devices.
morapi_Dnn_static_getDevice()
const morapi_Device * morapi_Dnn_static_getDevice (morapi_Env * env,
morapi_Int32 i_index)
Gets devices.
morapi_Dnn_static_findDevice()
const morapi_Device * morapi_Dnn_static_findDevice (morapi_Env * env,
const morapi_Char * i_device_name)
Finds a device.