DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::detail::OSUtil Class Reference

Groups the OS-dependent services. More...

#include <sycl/detail/os_util.hpp>

Collaboration diagram for sycl::_V1::detail::OSUtil:

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 = "/"
 

Detailed Description

Groups the OS-dependent services.

Definition at line 44 of file os_util.hpp.

Member Function Documentation

◆ alignedAlloc()

void * sycl::_V1::detail::OSUtil::alignedAlloc ( size_t  Alignment,
size_t  NumBytes 
)
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().

◆ alignedFree()

void sycl::_V1::detail::OSUtil::alignedFree ( void *  Ptr)
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().

◆ getCurrentDSODir()

static std::string sycl::_V1::detail::OSUtil::getCurrentDSODir ( )
static

Returns an absolute path to a directory where the object was found.

Referenced by sycl::_V1::detail::loadDeviceLib().

◆ getDirName()

static std::string sycl::_V1::detail::OSUtil::getDirName ( const char *  Path)
static

Returns a directory component of a path.

◆ getOSMemSize()

size_t sycl::_V1::detail::OSUtil::getOSMemSize ( )
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 >().

◆ isPathPresent()

static bool sycl::_V1::detail::OSUtil::isPathPresent ( const std::string &  Path)
inlinestatic

◆ makeDir()

int sycl::_V1::detail::OSUtil::makeDir ( const char *  Dir)
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().

Member Data Documentation

◆ DirSep

constexpr const char* sycl::_V1::detail::OSUtil::DirSep = "/"
staticconstexpr

Definition at line 55 of file os_util.hpp.

Referenced by sycl::_V1::detail::loadDeviceLib().


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