HipAllocatorBase Class Reference#
|
Reference API
|
gko::HipAllocatorBase Class Reference
#include <ginkgo/core/base/memory.hpp>
Inheritance diagram for gko::HipAllocatorBase:
Protected Member Functions | |
| virtual bool | check_environment (int device_id, CUstream_st *stream) const |
Friends | |
| class | HipExecutor |
Additional Inherited Members | |
Public Member Functions inherited from gko::Allocator | |
| virtual void * | allocate (size_type num_bytes)=0 |
| virtual void | deallocate (void *ptr)=0 |
Detailed Description
Implement this interface to provide an allocator for HipExecutor.
Member Function Documentation
◆ check_environment()
|
inlineprotectedvirtual |
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_id the device ID the allocator will be used in. stream the 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 in gko::HipAsyncAllocator, gko::HipUnifiedAllocator, and gko::HipHostAllocator.
The documentation for this class was generated from the following file:
- ginkgo/core/base/memory.hpp
Generated by
Public Member Functions inherited from