Groups the OS-dependent services. More...
#include <CL/sycl/detail/os_util.hpp>
Static Public Member Functions | |
static OSModuleHandle | getOSModuleHandle (const void *VirtAddr) |
Returns a module enclosing given address or nullptr. More... | |
static std::string | getCurrentDSODir () |
Returns an absolute path to a directory where the object was found. More... | |
static std::string | getDirName (const char *Path) |
Returns a directory component of a path. More... | |
static size_t | getOSMemSize () |
Returns the amount of RAM available for the operating system. More... | |
static void * | alignedAlloc (size_t Alignment, size_t NumBytes) |
Allocates NumBytes bytes of uninitialized storage whose alignment is specified by Alignment . More... | |
static void | alignedFree (void *Ptr) |
Deallocates the memory referenced by Ptr . More... | |
static int | makeDir (const char *Dir) |
Make directory recursively and returns zero code on success. More... | |
static bool | isPathPresent (const std::string &Path) |
Checks if specified path is present. More... | |
Static Public Attributes | |
static constexpr OSModuleHandle | ExeModuleHandle = -1 |
Module handle for the executable module - it is assumed there is always single one at most. More... | |
static constexpr OSModuleHandle | DummyModuleHandle = -2 |
Dummy module handle to designate non-existing module for a device binary image loaded from file e.g. More... | |
static constexpr const char * | DirSep = "/" |
Groups the OS-dependent services.
Definition at line 51 of file os_util.hpp.
|
static |
Allocates NumBytes
bytes of uninitialized storage whose alignment is specified by Alignment
.
Definition at line 255 of file os_util.cpp.
References cl::sycl::aligned_alloc().
|
static |
Deallocates the memory referenced by Ptr
.
Definition at line 268 of file os_util.cpp.
References cl::sycl::detail::usm::free().
|
static |
Returns an absolute path to a directory where the object was found.
|
static |
Returns a directory component of a path.
|
static |
Returns the amount of RAM available for the operating system.
Definition at line 238 of file os_util.cpp.
|
static |
Returns a module enclosing given address or nullptr.
|
inlinestatic |
Checks if specified path is present.
Definition at line 90 of file os_util.hpp.
Referenced by cl::sycl::detail::PersistentDeviceCodeCache::getItemFromDisc(), and cl::sycl::detail::PersistentDeviceCodeCache::putItemToDisc().
|
static |
Make directory recursively and returns zero code on success.
Definition at line 280 of file os_util.cpp.
Referenced by cl::sycl::detail::PersistentDeviceCodeCache::putItemToDisc().
|
staticconstexpr |
Definition at line 73 of file os_util.hpp.
|
staticconstexpr |
Dummy module handle to designate non-existing module for a device binary image loaded from file e.g.
via SYCL_USE_KERNEL_SPV env var.
Definition at line 68 of file os_util.hpp.
|
staticconstexpr |
Module handle for the executable module - it is assumed there is always single one at most.
Definition at line 64 of file os_util.hpp.