Hex: src/clarrays.h File Reference

| Hex 2.2 Hydrogen-electron collision solver

Data Structures | Macros
clarrays.h File Reference
`#include <CL/cl.h>`
`#include "hex-arrays.h"`
Include dependency graph for clarrays.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

class | clArrayView< T >
| OpenCL array wrapper. More...
class | clArray< T, Alloc >

## Macros

#define | CL_ALIGNMENT 4096
| OpenCL array wrapper. More...

## Macro Definition Documentation

## ◆ CL_ALIGNMENT

#define CL_ALIGNMENT 4096

This class combines NumberArray<T> and clArrayView<T>. It is a self-standing array of memory-aligned elements. The alignment is large by default so that the class can be used as the host-type memory within OpenCL. However, the aimed usage is this:

- Create the array.
- Fill the array with initial data.
- Connect to the computing device (GPU) and upload the data.
- Run computation on the compute device.
- Download the resulting data back to RAM.
- Disconnect from compute device.
- Destruct the class.