Arax -8d09c51940345c86062e8ef2427c705ae66e5926
A Runtime Framework for Decoupling Applications from Heterogeneous Accelerators
Loading...
Searching...
No Matches
arax_accel_types.h File Reference
#include "arax_types.h"
+ Include dependency graph for arax_accel_types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int arax_accel_valid_type (arax_accel_type_e type)
 
const char * arax_accel_type_to_str (arax_accel_type_e type)
 
arax_accel_type_e arax_accel_type_from_str (const char *type)
 

Function Documentation

◆ arax_accel_type_from_str()

arax_accel_type_e arax_accel_type_from_str ( const char * type)

Convert a string to the matching arax_accel_type_e value. type will be compared ignoring capitalization with the string in types_map variable in arax_accel_types.c.

NOTE: This function should not be used in critical paths!

Returns
A value from arax_accel_type_e, if no match is found returns ARAX_ACCEL_TYPES

Definition at line 35 of file arax_accel_types.c.

References ANY, ARAX_ACCEL_TYPES, arax_accel_type_map::str, arax_accel_type_map::type, and types_map.

◆ arax_accel_type_to_str()

const char * arax_accel_type_to_str ( arax_accel_type_e type)

Convert a arax_accel_type_e value to a human readable string. If type not a valid arax_accel_type_e value NULL is returned. NOTE: This function should not be used in critical paths!

Returns
A character representation for the given type,NULL on error.

Definition at line 27 of file arax_accel_types.c.

References arax_accel_valid_type(), arax_accel_type_map::type, and types_map.

+ Here is the call graph for this function:

◆ arax_accel_valid_type()

int arax_accel_valid_type ( arax_accel_type_e type)

Test type, to ensure it is a valid arax_accel_type_e value.

Parameters
typeValue to be checked.
Returns
1 if type is a valid arax_accel_type_e value, 0 otherwise.

Definition at line 22 of file arax_accel_types.c.

References ARAX_ACCEL_TYPES, and arax_accel_type_map::type.

Referenced by arax_accel_type_to_str(), arax_proc_can_run_at(), and arax_proc_get_functor().

+ Here is the caller graph for this function: