Go to the source code of this file.
Classes | |
struct | arbb_context_t |
A context within which VM calls are being made. More... | |
struct | arbb_refcountable_t |
A reference-countable object in the VM API. More... | |
struct | arbb_error_details_t |
A structure representing detailed error information from a function call. More... | |
struct | arbb_global_variable_t |
A global variable or constant. More... | |
struct | arbb_variable_t |
A variable in the VM. More... | |
struct | arbb_function_t |
A function in the VM. More... | |
struct | arbb_type_t |
A type for a variable or function. More... | |
struct | arbb_binding_t |
A binding specification to indicate a binding between host data and global variables. More... | |
struct | arbb_string_t |
A string returned by the VM API. More... | |
Defines | |
#define | ARBB_VM_EXPORT |
Enumerations | |
enum | arbb_error_t { arbb_error_none, arbb_error_invalid_argument, arbb_error_scoping, arbb_error_out_of_bounds, arbb_error_arithmetic, arbb_error_bad_alloc, arbb_error_uninitialized_access, arbb_error_internal } |
An error code representing the result of a function. More... | |
enum | arbb_scalar_type_t { arbb_i8, arbb_i16, arbb_i32, arbb_i64, arbb_u8, arbb_u16, arbb_u32, arbb_u64, arbb_f32, arbb_f64, arbb_boolean, arbb_usize, arbb_isize } |
The fixed set of scalar types provided. More... | |
enum | arbb_opcode_t { arbb_op_abs, arbb_op_acos, arbb_op_asin, arbb_op_atan, arbb_op_ceil, arbb_op_copy, arbb_op_cos, arbb_op_cosh, arbb_op_exp, arbb_op_exp10, arbb_op_floor, arbb_op_ln, arbb_op_log10, arbb_op_log_not, arbb_op_bit_not, arbb_op_rcp, arbb_op_round, arbb_op_rsqrt, arbb_op_sin, arbb_op_sinh, arbb_op_sqrt, arbb_op_tan, arbb_op_tanh, arbb_op_neg, arbb_op_add, arbb_op_bit_and, arbb_op_atan2, arbb_op_compare, arbb_op_div, arbb_op_div_tan, arbb_op_equal, arbb_op_geq, arbb_op_greater, arbb_op_bit_or, arbb_op_leq, arbb_op_less, arbb_op_log_and, arbb_op_log_or, arbb_op_lsh, arbb_op_max, arbb_op_min, arbb_op_mod, arbb_op_mul, arbb_op_neq, arbb_op_pow, arbb_op_rsh, arbb_op_sub, arbb_op_bit_xor, arbb_op_select, arbb_op_gather, arbb_op_scatter, arbb_op_pack, arbb_op_unpack, arbb_op_shuffle, arbb_op_unshuffle, arbb_op_repeat, arbb_op_distribute, arbb_op_repeat_row, arbb_op_repeat_col, arbb_op_repeat_page, arbb_op_transpose, arbb_op_swap_col, arbb_op_swap_row, arbb_op_swap_page, arbb_op_shift_constant, arbb_op_shift_clamp, arbb_op_rotate, arbb_op_reverse, arbb_op_length, arbb_op_new_vector, arbb_op_apply_nesting, arbb_op_get_nesting, arbb_op_cat, arbb_op_cast, arbb_op_extract, arbb_op_split, arbb_op_unsplit, arbb_op_kill, arbb_op_index, arbb_op_mask, arbb_op_copy_nesting, arbb_op_flatten, arbb_op_const_vector, arbb_op_sort, arbb_op_sort_rank, arbb_op_replace, arbb_op_wall_clock, arbb_op_set_regular_nesting, arbb_op_replace_row, arbb_op_replace_col, arbb_op_replace_page, arbb_op_get_nrows, arbb_op_get_ncols, arbb_op_get_npages, arbb_op_replace_2d_section, arbb_op_extract_row, arbb_op_extract_col, arbb_op_extract_page, arbb_op_section, arbb_op_all_set, arbb_op_copy_length, arbb_op_segment, arbb_op_replace_segment, arbb_op_alloc, arbb_op_alloc_as, arbb_op_dump, arbb_op_create_dumper, arbb_op_kill_dumper, arbb_op_set_dumper_fmt, arbb_op_replace_element, arbb_op_get_elt_coord, arbb_op_reset_dbg, arbb_op_set_dbg, arbb_op_bitwise_cast, arbb_op_get_neighbor, arbb_op_expect_size, arbb_op_add_reduce, arbb_op_mul_reduce, arbb_op_max_reduce, arbb_op_max_reduce_loc, arbb_op_min_reduce, arbb_op_min_reduce_loc, arbb_op_and_reduce, arbb_op_ior_reduce, arbb_op_xor_reduce, arbb_op_add_scan, arbb_op_mul_scan, arbb_op_max_scan, arbb_op_min_scan, arbb_op_and_scan, arbb_op_ior_scan, arbb_op_xor_scan, arbb_op_add_merge } |
The set of operations that can be performed using arbb_op() or arbb_op_dynamic(). More... | |
enum | arbb_call_opcode_t { arbb_op_call, arbb_op_map } |
The set of ways in which functions may be called using arbb_call_op(). More... | |
enum | arbb_loop_type_t { arbb_loop_for, arbb_loop_while } |
The set of allowed loop types. More... | |
enum | arbb_loop_block_t { arbb_loop_block_init, arbb_loop_block_cond, arbb_loop_block_body, arbb_loop_block_step } |
The set of allowed loop block types. More... | |
enum | arbb_range_access_mode_t { arbb_read_only_range, arbb_write_only_range, arbb_read_write_range } |
The set of access modes allowed for arbb_map_to_host(). More... | |
Functions | |
ARBB_VM_EXPORT int | arbb_is_refcountable_null (arbb_refcountable_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_refcountable_null (arbb_refcountable_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_error_details_null (arbb_error_details_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_error_details_null (arbb_error_details_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_string_null (arbb_string_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_string_null (arbb_string_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_context_null (arbb_context_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_context_null (arbb_context_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_function_null (arbb_function_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_function_null (arbb_function_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_variable_null (arbb_variable_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_variable_null (arbb_variable_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_global_variable_null (arbb_global_variable_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_global_variable_null (arbb_global_variable_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_binding_null (arbb_binding_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_binding_null (arbb_binding_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT int | arbb_is_type_null (arbb_type_t object) |
Returns 1 if object is a null object. | |
ARBB_VM_EXPORT void | arbb_set_type_null (arbb_type_t *object) |
Sets *object to be a null object. | |
ARBB_VM_EXPORT const char * | arbb_get_error_message (arbb_error_details_t error_details) |
Returns a character string with an informative error message corresponding to error_details . | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_error_code (arbb_error_details_t error_details) |
Returns the error code corresponding to error_details object. | |
ARBB_VM_EXPORT void | arbb_free_error_details (arbb_error_details_t error_details) |
Frees the resources for error_details . | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_default_context (arbb_context_t *out_context, arbb_error_details_t *details) |
Retrieves the default context used to issue VM operations. | |
ARBB_VM_EXPORT arbb_refcountable_t | arbb_function_to_refcountable (arbb_function_t convertible) |
Converts the given arbb_function_t to an arbb_refcountable_t instance. | |
ARBB_VM_EXPORT arbb_refcountable_t | arbb_global_variable_to_refcountable (arbb_global_variable_t convertible) |
Converts the given arbb_global_variable_t to an arbb_refcountable_t instance. | |
ARBB_VM_EXPORT arbb_error_t | arbb_acquire_ref (arbb_refcountable_t refcountable, arbb_error_details_t *details) |
Increments the reference count of refcountable . | |
ARBB_VM_EXPORT arbb_error_t | arbb_release_ref (arbb_refcountable_t refcountable, arbb_error_details_t *details) |
Decrements the reference count of refcountable . | |
ARBB_VM_EXPORT const char * | arbb_get_c_string (arbb_string_t string) |
Retrieves the C string associated with string . | |
ARBB_VM_EXPORT void | arbb_free_string (arbb_string_t string) |
Frees any resources associated with string . | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_scalar_type (arbb_context_t context, arbb_type_t *out_type, arbb_scalar_type_t scalar_type, arbb_error_details_t *details) |
Sets out_type to the arbb_type_t object corresponding to a scalar of type scalar_type . | |
ARBB_VM_EXPORT arbb_error_t | arbb_sizeof_type (arbb_context_t context, uint64_t *out_size, arbb_type_t type, arbb_error_details_t *details) |
ARBB_VM_EXPORT arbb_error_t | arbb_get_dense_type (arbb_context_t context, arbb_type_t *out_type, arbb_type_t element_type, unsigned int dimensionality, arbb_error_details_t *details) |
Sets out_type to the arbb_type_t object corresponding to a dense container with the specified element type and dimensionality. | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_nested_type (arbb_context_t context, arbb_type_t *out_type, arbb_type_t element_type, arbb_error_details_t *details) |
Sets *out_type to the arbb_type_t object corresponding to a nested container with the specified element type. | |
ARBB_VM_EXPORT arbb_error_t | arbb_create_constant (arbb_context_t context, arbb_global_variable_t *out_var, arbb_type_t type, void *data, void *debug_data_ptr, arbb_error_details_t *details) |
Creates a scalar constant of the given type. | |
ARBB_VM_EXPORT arbb_error_t | arbb_create_global (arbb_context_t context, arbb_global_variable_t *out_var, arbb_type_t type, const char *name, arbb_binding_t binding, void *debug_data_ptr, arbb_error_details_t *details) |
Creates a new global variable. | |
ARBB_VM_EXPORT arbb_error_t | arbb_get_variable_from_global (arbb_context_t context, arbb_variable_t *out_var, arbb_global_variable_t global_var, arbb_error_details_t *details) |
Sets out_var to the arbb_variable_t object wrapped by the given arbb_global_variable_t object. | |
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_create_local (arbb_function_t function, arbb_variable_t *out_var, arbb_type_t type, const char *name, arbb_error_details_t *details) |
Creates a new local variable within the given function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_op (arbb_function_t function, arbb_opcode_t opcode, const arbb_variable_t *outputs, const arbb_variable_t *inputs, void *debug_data_ptrs[], arbb_error_details_t *details) |
Adds a new instruction to the given function or executes the provided operation. | |
ARBB_VM_EXPORT arbb_error_t | arbb_op_dynamic (arbb_function_t function, arbb_opcode_t opcode, unsigned int num_outputs, const arbb_variable_t *outputs, unsigned int num_inputs, const arbb_variable_t *inputs, void *debug_data_ptrs[], arbb_error_details_t *details) |
Adds a new instruction to the given function or executes the provided operation. | |
ARBB_VM_EXPORT arbb_error_t | arbb_call_op (arbb_function_t caller, arbb_call_opcode_t opcode, arbb_function_t callee, const arbb_variable_t *outputs, const arbb_variable_t *inputs, arbb_error_details_t *details) |
Adds a new calling instruction to the given function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_if (arbb_function_t function, arbb_variable_t condition, arbb_error_details_t *details) |
Begins an if statement, the body of which is executed if the provided condition is met. | |
ARBB_VM_EXPORT arbb_error_t | arbb_else (arbb_function_t function, arbb_error_details_t *details) |
Adds an else part to the current if statement. | |
ARBB_VM_EXPORT arbb_error_t | arbb_end_if (arbb_function_t function, arbb_error_details_t *details) |
Ends the current if statement. | |
ARBB_VM_EXPORT arbb_error_t | arbb_begin_loop (arbb_function_t function, arbb_loop_type_t loop_type, arbb_error_details_t *details) |
Begins a structured loop of the provided type. | |
ARBB_VM_EXPORT arbb_error_t | arbb_begin_loop_block (arbb_function_t function, arbb_loop_block_t block_type, arbb_error_details_t *details) |
Begins a loop block within a given control flow statement, such as a condition block or a body block. | |
ARBB_VM_EXPORT arbb_error_t | arbb_loop_condition (arbb_function_t function, arbb_variable_t condition, arbb_error_details_t *details) |
Exits the structured loop currently being defined if the provided condition is true. | |
ARBB_VM_EXPORT arbb_error_t | arbb_end_loop (arbb_function_t function, arbb_error_details_t *details) |
Ends the structured loop currently being defined. | |
ARBB_VM_EXPORT arbb_error_t | arbb_break (arbb_function_t function, arbb_error_details_t *details) |
Inserts a break statement in the current function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_continue (arbb_function_t function, arbb_error_details_t *details) |
Inserts a continue statement in the current function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_read_scalar (arbb_context_t context, arbb_variable_t variable, void *out_data, arbb_error_details_t *details) |
Copies data out of the given global scalar to the host. | |
ARBB_VM_EXPORT arbb_error_t | arbb_write_scalar (arbb_context_t context, arbb_variable_t variable, const void *data, arbb_error_details_t *details) |
Copies data into the given global variable from the host. | |
ARBB_VM_EXPORT arbb_error_t | arbb_create_dense_binding (arbb_context_t context, arbb_binding_t *out_binding, void *user_data, unsigned int dimensionality, const uint64_t *sizes, const uint64_t *byte_pitches, arbb_error_details_t *details) |
Creates a binding suitable for a dense container with the specified parameters. | |
ARBB_VM_EXPORT arbb_error_t | arbb_free_binding (arbb_context_t context, arbb_binding_t binding, arbb_error_details_t *details) |
Releases all resources associated with the binding . | |
ARBB_VM_EXPORT arbb_error_t | arbb_map_to_host (arbb_context_t context, arbb_variable_t container, void **out_data, uint64_t *out_byte_pitch, arbb_range_access_mode_t mode, arbb_error_details_t *details) |
Maps the global container provided in container into the host address space. | |
ARBB_VM_EXPORT arbb_error_t | arbb_execute (arbb_function_t function, const arbb_variable_t *outputs, const arbb_variable_t *inputs, arbb_error_details_t *details) |
Executes the given function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_compile (arbb_function_t function, arbb_error_details_t *details) |
Compiles the given function. | |
ARBB_VM_EXPORT arbb_error_t | arbb_finish (arbb_error_details_t *details) |
Waits until any previously issued asynchronous operations have completed. | |
ARBB_VM_EXPORT arbb_error_t | arbb_push_map_coord (arbb_context_t context, uint64_t x, uint64_t y, uint64_t z, arbb_error_details_t *details) |
Pushes a new coordinate on the map stack with values [x, y, z] representing the coordinate along the first, second and third dimension, respectively. | |
ARBB_VM_EXPORT arbb_error_t | arbb_pop_map_coord (arbb_context_t context, arbb_error_details_t *details) |
Pops the current coordinate from the map coordinate stack. | |
ARBB_VM_EXPORT arbb_error_t | arbb_set_scalar_source_element (arbb_context_t context, arbb_variable_t scalar, arbb_variable_t source_container, arbb_error_details_t *details) |
Associates the global scalar variable scalar with the global container source_container . | |
ARBB_VM_EXPORT arbb_error_t | arbb_set_copy_scalar_source_element (arbb_context_t context, arbb_variable_t scalar, arbb_error_details_t *out_error_details) |
Sets flag to copy the source container of scalar the next time it is used as the input to arbb_op_copy in emulation mode. | |
ARBB_VM_EXPORT arbb_error_t | arbb_push_function (arbb_context_t context, arbb_function_t function, arbb_error_details_t *details) |
Pushes the given function onto the function stack. | |
ARBB_VM_EXPORT arbb_error_t | arbb_pop_function (arbb_context_t context, arbb_error_details_t *details) |
Pops the top function from the function stack. | |
ARBB_VM_EXPORT arbb_error_t | arbb_top_function (arbb_context_t context, arbb_function_t *out_function, arbb_error_details_t *details) |
Retrieves the top function from the function stack, placing it in *out_function . |
#define ARBB_VM_EXPORT |
Definition at line 31 of file arbb_vmapi.h.
Copyright © 2010, Intel Corporation. All rights reserved.