StarPU Handbook

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Macros | Functions
Multiformat Data Interface

## Data Structures
struct | starpu_multiformat_data_interface_ops
struct | starpu_multiformat_interface

## Macros
#define | STARPU_MULTIFORMAT_GET_CPU_PTR(interface)
#define | STARPU_MULTIFORMAT_GET_CUDA_PTR(interface)
#define | STARPU_MULTIFORMAT_GET_OPENCL_PTR(interface)
#define | STARPU_MULTIFORMAT_GET_NX(interface)

## Functions
void | starpu_multiformat_data_register (starpu_data_handle_t *handle, unsigned home_node, void *ptr, uint32_t nobjects, struct starpu_multiformat_data_interface_ops *format_ops)

## Detailed Description

## Data Structure Documentation

struct starpu_multiformat_data_interface_ops

The different fields are:

Data Fields
size_t | cpu_elemsize | the size of each element on CPUs
size_t | opencl_elemsize | the size of each element on OpenCL devices
struct starpu_codelet * | cpu_to_opencl_cl | pointer to a codelet which converts from CPU to OpenCL
struct starpu_codelet * | opencl_to_cpu_cl | pointer to a codelet which converts from OpenCL to CPU
size_t | cuda_elemsize | the size of each element on CUDA devices
struct starpu_codelet * | cpu_to_cuda_cl | pointer to a codelet which converts from CPU to CUDA
struct starpu_codelet * | cuda_to_cpu_cl | pointer to a codelet which converts from CUDA to CPU

struct starpu_multiformat_interface

todo

Data Fields
void * | cpu_ptr |
void * | cuda_ptr |
void * | opencl_ptr |
uint32_t | nx |
struct starpu_multiformat_data_interface_ops * | ops |

## Macro Definition Documentation

#define STARPU_MULTIFORMAT_GET_CPU_PTR | ( |  | interface | ) |

returns the local pointer to the data with CPU format.

#define STARPU_MULTIFORMAT_GET_CUDA_PTR | ( |  | interface | ) |

returns the local pointer to the data with CUDA format.

#define STARPU_MULTIFORMAT_GET_OPENCL_PTR | ( |  | interface | ) |

returns the local pointer to the data with OpenCL format.

#define STARPU_MULTIFORMAT_GET_NX | ( |  | interface | ) |

returns the number of elements in the data.

## Function Documentation

void starpu_multiformat_data_register | ( | starpu_data_handle_t * | handle,
|  | unsigned | home_node,
|  | void * | ptr,
|  | uint32_t | nobjects,
|  | struct starpu_multiformat_data_interface_ops * | format_ops
| ) |  |

Register a piece of data that can be represented in different ways, depending upon the processing unit that manipulates it. It allows the programmer, for instance, to use an array of structures when working on a CPU, and a structure of arrays when working on a GPU. `nobjects` is the number of elements in the data. `format_ops` describes the format.