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

Go to the source code of this file.

Data Structures

struct  arax_proc_s
 

Functions

arax_proc_sarax_proc_init (arax_object_repo_s *repo, const char *name)
 
AraxFunctorarax_proc_get_functor (arax_proc_s *proc, arax_accel_type_e type)
 
AraxFunctorarax_proc_set_functor (arax_proc_s *proc, arax_accel_type_e type, AraxFunctor *vfn)
 
int arax_proc_can_run_at (arax_proc_s *proc, arax_accel_type_e type)
 

Function Documentation

◆ arax_proc_can_run_at()

int arax_proc_can_run_at ( arax_proc_s * proc,
arax_accel_type_e type )

Returns if proc can 'run' in an accelerator of type.

Note
type has to be different than ANY.
Parameters
procAn initialized arax_proc_s instance.
typeAccelerator type to check against.
Returns
0 if type can not execute proc. Non zero otherwise.

Definition at line 33 of file arax_proc.c.

References ANY, arax_accel_valid_type(), arax_assert, and arax_proc_s::canrun.

+ Here is the call graph for this function:

◆ arax_proc_get_functor()

AraxFunctor * arax_proc_get_functor ( arax_proc_s * proc,
arax_accel_type_e type )

Return proc functor pointer for provided type.

Returns
Pointer to functor, null is returned if no functior is set for given type.

Definition at line 16 of file arax_proc.c.

References arax_accel_valid_type(), arax_assert, and arax_proc_s::functors.

Referenced by arax_proc_set_functor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arax_proc_init()

arax_proc_s * arax_proc_init ( arax_object_repo_s * repo,
const char * name )

Initialize a arax_proc at the memory pointed by mem.

Parameters
repoThe arax_object_repo_s that will track the initialized procedure.
nameNULL terminated string, will be copied to private buffer.
Returns
An initialized instance of arax_proc_s, NULL on failure.

Definition at line 4 of file arax_proc.c.

References arax_object_register(), and ARAX_TYPE_PROC.

Referenced by arax_proc_register().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ arax_proc_set_functor()

AraxFunctor * arax_proc_set_functor ( arax_proc_s * proc,
arax_accel_type_e type,
AraxFunctor * vfn )

Set the AraxFunctor of proc for the provided type.

Parameters
procAn initialized arax_proc_s instance.
typeAccelerator type for provided functor.
vfnFunctor pointer, can be null.
Returns
Returns previous value of proc, just as arax_proc_get_functor() would return.

Definition at line 22 of file arax_proc.c.

References arax_proc_get_functor(), arax_proc_s::canrun, and arax_proc_s::functors.

+ Here is the call graph for this function: