Functions

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.

Function Documentation

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.

Returns:
An error code depending on the result of the operation:
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.

Parameters:

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.
Returns:
An error code depending on the result of the operation:
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.

Returns:
An error code depending on the result of the operation:
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.

Returns:
An error code depending on the result of the operation:
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.

Returns:
An error code depending on the result of the operation:
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.

Returns:
An error code depending on the result of the operation:
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.

Returns:
An error code depending on the result of the operation:

Submit feedback on this help topic

Copyright © 2010, Intel Corporation. All rights reserved.