Groups the OS-dependent services. More...
#include <sycl/detail/os_util.hpp>
Static Public Member Functions | |
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 all directories on the path, throws on error. More... | |
static bool | isPathPresent (const std::string &Path) |
Checks if specified path is present. More... | |
Static Public Attributes | |
static constexpr const char * | DirSep = "/" |
Groups the OS-dependent services.
Definition at line 44 of file os_util.hpp.
|
static |
Allocates NumBytes
bytes of uninitialized storage whose alignment is specified by Alignment
.
Definition at line 220 of file os_util.cpp.
References sycl::_V1::aligned_alloc(), and sycl::_V1::ext::oneapi::experimental::detail::Alignment.
Referenced by sycl::_V1::detail::aligned_allocator< T >::allocate().
|
static |
Deallocates the memory referenced by Ptr
.
Definition at line 233 of file os_util.cpp.
References sycl::_V1::free().
Referenced by sycl::_V1::detail::aligned_allocator< T >::deallocate(), and sycl::_V1::detail::usm::freeInternal().
|
static |
Returns an absolute path to a directory where the object was found.
Referenced by sycl::_V1::detail::loadDeviceLib().
|
static |
Returns a directory component of a path.
|
static |
Returns the amount of RAM available for the operating system.
Definition at line 203 of file os_util.cpp.
Referenced by sycl::_V1::detail::get_device_info_host< info::device::global_mem_size >().
|
inlinestatic |
Checks if specified path is present.
Definition at line 72 of file os_util.hpp.
Referenced by sycl::_V1::detail::PersistentDeviceCodeCache::getItemFromDisc(), sycl::_V1::detail::LockCacheItem::isLocked(), makeDir(), and sycl::_V1::detail::PersistentDeviceCodeCache::putItemToDisc().
|
static |
Make all directories on the path, throws on error.
Definition at line 242 of file os_util.cpp.
References isPathPresent().
Referenced by sycl::_V1::detail::PersistentDeviceCodeCache::putItemToDisc().
|
staticconstexpr |
Definition at line 55 of file os_util.hpp.
Referenced by sycl::_V1::detail::loadDeviceLib().