Ginkgo: gko::CudaAsyncAllocator Class Reference

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
gko::CudaAsyncAllocator Class Reference
Inheritance diagram for gko::CudaAsyncAllocator:
[legend]
Collaboration diagram for gko::CudaAsyncAllocator:
[legend]

## Public Member Functions
void * | allocate (size_type num_bytes) override
void | deallocate (void *ptr) override
| CudaAsyncAllocator (CUstream_st *stream)
bool | check_environment (int device_id, CUstream_st *stream) const override
| Checks if the allocator can be used safely with the provided device ID and stream.

## Member Function Documentation

## ◆ allocate()

void * gko::CudaAsyncAllocator::allocate | ( | size_type | num_bytes | ) |
| overridevirtual

Implements gko::Allocator.

## ◆ check_environment()

bool gko::CudaAsyncAllocator::check_environment | ( | int | device_id,
|  | CUstream_st * | stream ) const
| overridevirtual

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 CudaExecutor in the given environment.

Reimplemented from gko::CudaAllocatorBase.

## ◆ deallocate()

void gko::CudaAsyncAllocator::deallocate | ( | void * | ptr | ) |
| overridevirtual

Implements gko::Allocator.

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

- ginkgo/core/base/memory.hpp