namespace ixion::draft

Enum

array_type

enum class ixion::draft::array_type

Values:

enumerator unknown
enumerator float32
enumerator float64
enumerator uint32

Type aliases

create_compute_engine_t

using ixion::draft::create_compute_engine_t = compute_engine *(*)()

destroy_compute_engine_t

using ixion::draft::destroy_compute_engine_t = void (*)(const compute_engine*)

Functions

init_modules

void ixion::draft::init_modules()

Initialize modules if exists.

unload_module

void ixion::draft::unload_module(void *handler)

Struct

array

struct array

Public Members

float *float32
double *float64
uint32_t *uint32
void *data
union ixion::draft::array
array_type type = array_type::unknown
std::size_t size = 0u

module_def

struct module_def

Public Members

create_compute_engine_t create_compute_engine
destroy_compute_engine_t destroy_compute_engine

Classes

compute_engine

class compute_engine

Default compute engine class that uses CPU for all its computations.

This class also serves as the fallback for its child classes in case they don’t support the function being requested or the function doesn’t meet the criteria that it requires.

Each function of this class should not modify the state of the class instance.

Public Functions

compute_engine()
virtual ~compute_engine()
virtual std::string_view get_name() const
virtual void compute_fibonacci(array &io)

Public Static Functions

static std::shared_ptr<compute_engine> create(std::string_view name = std::string_view())

Create a compute engine instance.

Parameters:

name – name of the compute engine, or an empty name for the default one.

Returns:

compute engine instance associted with the specified name. Note that if no compute engine is registered with the specified name, the default one is created.

static void add_class(void *hdl, std::string_view name, create_compute_engine_t func_create, destroy_compute_engine_t func_destroy)

Add a new compute engine class.

Parameters:
  • hdl – handler for the dynamically-loaded module in which the compute engine being registered resides.

  • name – name of the compute engine.

  • func_create – function that creates a new instance of this compute engine class.

  • func_destroy – function that destroyes the instance of this compute engine class.