HOME
| OPENMP API Specification: Version 5.1 November 2020

5.4.4  Data Format Conversion: ompd_callback_device_host_fn_t

Summary The ompd_callback_device_host_fn_t type is the type signature of the callback that the third-party tool provides to convert data between the formats that the third-party tool and the OMPD library use and that the OpenMP program uses.

Format

SVG-Viewer needed.

 

 
typedef ompd_rc_t (*ompd_callback_device_host_fn_t) ( 
  ompd_address_space_context_t *address_space_context, 
  const void *input, 
  ompd_size_t unit_size, 
  ompd_size_t count, 
  void *output 
);  

SVG-Viewer needed.

Description The architecture on which the third-party tool and the OMPD library execute may be different from the architecture on which the OpenMP program that is being examined executes. Thus, the conventions for representing data may differ. The callback interface includes operations to convert between the conventions, such as the byte order (endianness), that the third-party tool and OMPD library use and the ones that the OpenMP program use. The callback with the ompd_callback_device_host_fn_t type signature converts data between the formats.

Description of Arguments The address_space_context argument specifies the OpenMP address space that is associated with the data. The input argument is the source buffer and the output argument is the destination buffer. The unit_size argument is the size of each of the elements to be converted. The count argument is the number of elements to be transformed.

The OMPD library allocates and owns the input and output buffers. It must ensure that the buffers have the correct size and are eventually deallocated when they are no longer needed.

Description of Return Codes Routines that use the ompd_callback_device_host_fn_t type may return the general return codes listed at the beginning of Section 5.4.

Cross References