LLVM OpenMP 22.0.0git
kmp_tgt_memspace_list_t Class Reference

Maintain a list of target memory spaces that are identified with the requested information. More...

Public Member Functions

void init ()
 Initialize memory space list.
void fini ()
 Release resources for the memory space list.
omp_memspace_handle_t get_memspace (int num_devices, const int *devices, int host_access, omp_memspace_handle_t memspace)
 Return memory space for the provided input.
omp_memspace_handle_t get_memspace (int num_resources, const int *resources, omp_memspace_handle_t parent)
 Return sub memory space from the parent memory space.

Detailed Description

Maintain a list of target memory spaces that are identified with the requested information.

There will be only one unique memory space object that matches the input.

Definition at line 1346 of file kmp_alloc.cpp.

Member Function Documentation

◆ fini()

void kmp_tgt_memspace_list_t::fini ( )
inline

Release resources for the memory space list.

Definition at line 1397 of file kmp_alloc.cpp.

References __kmp_destroy_lock(), __kmp_free, kmp_memspace_t::next, and kmp_memspace_t::resources.

◆ get_memspace() [1/2]

omp_memspace_handle_t kmp_tgt_memspace_list_t::get_memspace ( int num_devices,
const int * devices,
int host_access,
omp_memspace_handle_t memspace )
inline

Return memory space for the provided input.

Definition at line 1409 of file kmp_alloc.cpp.

References __kmp_allocate, __kmp_free, __kmp_tgt_allocator, i, omp_get_num_devices(), and omp_null_mem_space.

◆ get_memspace() [2/2]

omp_memspace_handle_t kmp_tgt_memspace_list_t::get_memspace ( int num_resources,
const int * resources,
omp_memspace_handle_t parent )
inline

Return sub memory space from the parent memory space.

Definition at line 1445 of file kmp_alloc.cpp.

References kmp_memspace_t::memspace, and parent.

◆ init()

void kmp_tgt_memspace_list_t::init ( )
inline

Initialize memory space list.

Definition at line 1395 of file kmp_alloc.cpp.

References __kmp_init_lock().


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