This is a preview of allocator support for target memory that depends on the
offload runtime API which allocates memory as described below.
llvm_omp_target_alloc_host(size_t size, int device_num);
- Returns non-migratable memory owned by host.
- Memory is accessible by host and device(s).
llvm_omp_target_alloc_shared(size_t size, int device_num);
- Returns migratable memory owned by host and device.
- Memory is accessible by host and device.
llvm_omp_target_alloc_device(size_t size, int device_num);
- Returns memory owned by device.
- Memory is only accessible by device.
New memory space and predefined allocator names are
- llvm_omp_target_host_mem_space
- llvm_omp_target_shared_mem_space
- llvm_omp_target_device_mem_space
- llvm_omp_target_host_mem_alloc
- llvm_omp_target_shared_mem_alloc
- llvm_omp_target_device_mem_alloc