Simple GPU 1.0
Fortran GPU Computing Library with transparent CPU/GPU support
Loading...
Searching...
No Matches
gpu::gpu_allocate Interface Reference

Allocate GPU/CPU memory for arrays. More...

Detailed Description

Allocate GPU/CPU memory for arrays.

Polymorphic interface that automatically selects the correct implementation based on the array type and number of dimensions provided.

Supports:

  • 1D through 6D arrays
  • Single and double precision
  • 32-bit and 64-bit integer dimensions
Parameters
[out]arrGPU array to allocate (gpu_double1..6 or gpu_real1..6)
[in]n1Size of first dimension
[in]n2Size of second dimension (for 2D+)
[in]n3Size of third dimension (for 3D+)
[in]n4Size of fourth dimension (for 4D+)
[in]n5Size of fifth dimension (for 5D+)
[in]n6Size of sixth dimension (for 6D)
type(gpu_double1) :: x
type(gpu_double2) :: a
call gpu_allocate(x, 1000) ! 1D: 1000 elements
call gpu_allocate(a, 100, 200) ! 2d: 100x200 matrix
void gpu_allocate(void **ptr, const int64_t n)
Definition gpu_amd.c:50

Definition at line 371 of file simple_gpu.F90.


The documentation for this interface was generated from the following file: