Functions | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_function_type (arbb_context_t context, arbb_type_t *out_type, unsigned int num_outputs, const arbb_type_t *output_types, unsigned int num_inputs, const arbb_type_t *input_types, arbb_error_details_t *details) |
Adds a new function type with the specified prototype. | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_function_type_parameter_alias (arbb_context_t context, arbb_type_t *out_type, arbb_type_t function_type, const unsigned int *parameter_aliases, arbb_error_details_t *details) |
Converts the provided function_type to a function type with the same signature, but where the outputs are aliased to a subset of the inputs. | |
ARBB_VM_EXPORT arbb_error_t | arbb_begin_function (arbb_context_t context, arbb_function_t *out_function, arbb_type_t function_type, const char *name, int is_remote, arbb_error_details_t *details) |
Creates a new function of the specified function type and begins defining it. | |
ARBB_VM_EXPORT arbb_error_t | arbb_abort_function (arbb_function_t function, arbb_error_details_t *details) |
Aborts the definition of the specified function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_end_function (arbb_function_t function, arbb_error_details_t *details) |
Finishes the definition of the specified function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_parameter (arbb_function_t function, arbb_variable_t *out_var, int get_output, unsigned int index, arbb_error_details_t *details) |
Sets *out_var to the variable corresponding to the input or output of the given function at the position given by index . | |
ARBB_VM_EXPORT arbb_error_t | arbb_serialize_function (arbb_function_t function, arbb_string_t *out_text, arbb_error_details_t *details) |
Serializes the intermediate representation of function . |
ARBB_VM_EXPORT arbb_error_t arbb_get_function_type | ( | arbb_context_t | context, | |
arbb_type_t * | out_type, | |||
unsigned int | num_outputs, | |||
const arbb_type_t * | output_types, | |||
unsigned int | num_inputs, | |||
const arbb_type_t * | input_types, | |||
arbb_error_details_t * | details | |||
) |
Adds a new function type with the specified prototype.
The prototype consists of a number of input and output parameters and their corresponding types. input_types
and output_types
should be arrays with num_inputs
and num_outputs
entries, respectively.
context
is a null object.out_type
is a null pointer.num_inputs
is greater than 0 and input_types
is a null pointer.num_outputs
is greater than 0 and output_types
is a null pointer.input_types
is a null object.output_types
is a null object. ARBB_VM_EXPORT arbb_error_t arbb_get_function_type_parameter_alias | ( | arbb_context_t | context, | |
arbb_type_t * | out_type, | |||
arbb_type_t | function_type, | |||
const unsigned int * | parameter_aliases, | |||
arbb_error_details_t * | details | |||
) |
Converts the provided function_type
to a function type with the same signature, but where the outputs are aliased to a subset of the inputs.
context | The context in which to perform the operation. | |
out_type | The location in which to store the new type. | |
function_type | The function type on which the new type will be based. | |
parameter_aliases | An array of N integers, where N is the number of outputs, specifying the indices of the inputs aliased with each corresponding output. | |
details | If non-null, error details are placed here in case of an error. |
context
is a null object.out_type
is a null pointer.function_type
is a null object.parameter_aliases
is a null pointer.parameter_aliases
are greater than or equal to the number of inputs in function_type
. ARBB_VM_EXPORT arbb_error_t arbb_begin_function | ( | arbb_context_t | context, | |
arbb_function_t * | out_function, | |||
arbb_type_t | function_type, | |||
const char * | name, | |||
int | is_remote, | |||
arbb_error_details_t * | details | |||
) |
Creates a new function of the specified function type and begins defining it.
context
is a null object.out_function
is a null pointer.function_type
is not a valid function type.name
is a null pointer. ARBB_VM_EXPORT arbb_error_t arbb_abort_function | ( | arbb_function_t | function, | |
arbb_error_details_t * | details | |||
) |
Aborts the definition of the specified function.
This frees any resources, such as local variables associated with the function. The function will no longer be a valid object.
This function should be used when an application error occurs during function definition.
ARBB_VM_EXPORT arbb_error_t arbb_end_function | ( | arbb_function_t | function, | |
arbb_error_details_t * | details | |||
) |
Finishes the definition of the specified function.
ARBB_VM_EXPORT arbb_error_t arbb_get_parameter | ( | arbb_function_t | function, | |
arbb_variable_t * | out_var, | |||
int | get_output, | |||
unsigned int | index, | |||
arbb_error_details_t * | details | |||
) |
Sets *out_var
to the variable corresponding to the input or output of the given function at the position given by index
.
If get_output
is non-zero, an output is returned. Otherwise an input is returned.
function
is a null object.out_var
is a null pointer.index
is greater than or equal to the number of inputs or outputs of the function, depending on the value of get_output
.function
is not being defined. ARBB_VM_EXPORT arbb_error_t arbb_serialize_function | ( | arbb_function_t | function, | |
arbb_string_t * | out_text, | |||
arbb_error_details_t * | details | |||
) |
Serializes the intermediate representation of function
.
function
is a null object.out_text
is a null pointer. Copyright © 2010, Intel Corporation. All rights reserved.