Go to the source code of this file.
|
| namespace | sham |
| | namespace for backends this one is named only sham since shambackends is too long to write
|
| |
◆ create_usm_ptr()
template<USMKindTarget target>
| USMPtrHolder< target > sham::details::create_usm_ptr |
( |
size_t |
size, |
|
|
std::shared_ptr< DeviceScheduler > |
dev_sched, |
|
|
std::optional< size_t > |
alignment = std::nullopt |
|
) |
| |
Create a USM pointer with at least the given size in bytes.
- Note
- The USM pointer may have a larger allocation than the required size.
- Todo:
- should be renamed to aquire_...
- Template Parameters
-
| target | The target of the USM pointer. |
- Parameters
-
| size | The size of the pointer in bytes. |
| dev_sched | Pointer to the device scheduler. |
| alignment | The alignment of the USM pointer (optional). |
- Returns
- USMPtrHolder<target> The newly created USM pointer.
Definition at line 30 of file memoryHandle.cpp.
◆ release_usm_ptr()
template<USMKindTarget target>
Release a USM pointer.
- Template Parameters
-
| target | The target of the USM pointer. |
- Parameters
-
| usm_ptr_hold | The USM pointer holder to release. |
| events | The event handler to wait for completion. |
Definition at line 47 of file memoryHandle.cpp.