Functions

A built-in function is a coding extension to TPC-C and TPC-C++ that allows a programmer to use a syntax of TPC-C function calls and TPC-C variables to access the instruction set of the processor.

The following sections describe the available built-in functions for the TPC platform.

Program Management Special Functions

builtin name

Information

builtin definition

Input definition

get_index_space_offset

Returns the index space offset for the current invocation of the program.

int5 ()

get_index_space_size

Returns the index space size for the current invocation of the program

int5 ()

get_dim_stride

Tensor dimension stride, in elements.

unsigned int (int a, unsigned int dim)

tensor – [in] tensor handle. dim – [in] tensor dimension index to be queried.

get_dim_size

Tensor dimension size, in elements.

unsigned int (int tensor, unsigned int dim)

tesnor – [in] tensor handle. dim – [in] tensor dimension index to be queried.

set_dim_stride

Set a stride of specific tensor dimension

void (int tesnsor, unsigned int dim, unsigned int stride)

a – [in] tensor handle.**dim –** [in] tensor dimension index to set. stride – [in] stride to set.

get_pad_value_float

Tensor’s pad value.

float (int tensor)

tesnor – [in] tensor handle.

get_pad_value_short

Tensor’s pad value.

short (int tensor)

tesnor – [in] tensor handle.

get_pad_value_ushort

Tensor’s pad value.

unsigned short (int tensor)

tesnor – [in] tensor handle.

get_pad_value_char

Tensor’s pad value.

char (int tensor)

tesnor – [in] tensor handle.

get_pad_value_uchar

Tensor’s pad value.

unsigned char (int tensor)

tesnor – [in] tensor handle.

get_pad_value_uint

Tensor’s pad value.

uint (int tensor)

tesnor – [in] tensor handle.

get_pad_value_int

Tensor’s pad value.

int (int tensor)

tesnor – [in] tensor handle.

set_pad_value_uint

Set tensor’s pad value.

uint (int tensor)

tesnor – [in] tensor handle.

set_pad_value_int

Set tensor’s pad value.

int (int tensor)

tesnor – [in] tensor handle.

set_pad_value_float

Set tensor’s pad value.

float (int tensor)

tesnor – [in] tensor handle.

set_pad_value_short

Set tensor’s pad value.

short (int tensor)

tesnor – [in] tensor handle.

set_pad_value_ushort

Tensor’s pad value.

unsigned short (int tensor)

tesnor – [in] tensor handle.

set_pad_value_char

Tensor’s pad value.

char (int tensor)

tesnor – [in] tensor handle.

set_pad_value_uchar

Tensor’s pad value.

unsigned char (int tensor)

tesnor – [in] tensor handle.