HipUnifiedAllocator Class Reference

HipUnifiedAllocator Class Reference#

Reference API: gko::HipUnifiedAllocator Class Reference
Reference API
gko::HipUnifiedAllocator Class Reference
Inheritance diagram for gko::HipUnifiedAllocator:
[legend]

Public Member Functions

void * allocate (size_type num_bytes) override
 
void deallocate (void *ptr) override
 
 HipUnifiedAllocator (int device_id)
 
 HipUnifiedAllocator (int device_id, unsigned int flags)
 

Protected Member Functions

bool check_environment (int device_id, CUstream_st *stream) const override
 

Member Function Documentation

◆ allocate()

void * gko::HipUnifiedAllocator::allocate ( size_type  num_bytes)
overridevirtual

Implements gko::Allocator.

◆ check_environment()

bool gko::HipUnifiedAllocator::check_environment ( int  device_id,
CUstream_st *  stream 
) const
overrideprotectedvirtual

Checks if the allocator can be used safely with the provided device ID and stream. The check is necessary to ensure safe usage of stream-ordered allocators and unified shared memory allocators.

Parameters
device_idthe device ID the allocator will be used in.
streamthe stream the allocator will be used with.
Returns
true if and only if the allocator can be used by HipExecutor in the given environment.

Reimplemented from gko::HipAllocatorBase.

◆ deallocate()

void gko::HipUnifiedAllocator::deallocate ( void *  ptr)
overridevirtual

Implements gko::Allocator.


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