DPC++ Runtime
Runtime libraries for oneAPI DPC++
_pi_platform Struct Reference

A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devices since initialization is done when devices are used. More...

#include <cuda/pi_cuda.hpp>

Collaboration diagram for _pi_platform:

Public Member Functions

 _pi_platform ()=default
 
pi_result populateDeviceCacheIfNeeded ()
 

Public Attributes

std::vector< std::unique_ptr< _pi_device > > devices_
 
std::unique_ptr< _pi_devicePiDeviceCache
 
std::mutex PiDeviceCacheMutex
 
bool DeviceCachePopulated = false
 
std::string CmEmuVersion
 

Static Public Attributes

static hipEvent_t evBase_ {nullptr}
 

Detailed Description

A PI platform stores all known PI devices, in the CUDA plugin this is just a vector of available devices since initialization is done when devices are used.

A PI platform stores all known PI devices, in the HIP plugin this is just a vector of available devices since initialization is done when devices are used.

Definition at line 74 of file pi_cuda.hpp.

Constructor & Destructor Documentation

◆ _pi_platform()

_pi_platform::_pi_platform ( )
default

Member Function Documentation

◆ populateDeviceCacheIfNeeded()

pi_result _pi_platform::populateDeviceCacheIfNeeded ( )

Definition at line 549 of file pi_esimd_emulator.cpp.

References Device, DeviceCachePopulated, PiDeviceCache, PiDeviceCacheMutex, and PiTrace().

Referenced by piDevicesGet().

Member Data Documentation

◆ CmEmuVersion

std::string _pi_platform::CmEmuVersion

Definition at line 78 of file pi_esimd_emulator.hpp.

Referenced by piPlatformGetInfo(), and piPlatformsGet().

◆ DeviceCachePopulated

bool _pi_platform::DeviceCachePopulated = false

Definition at line 72 of file pi_esimd_emulator.hpp.

Referenced by populateDeviceCacheIfNeeded().

◆ devices_

std::vector< std::unique_ptr< _pi_device > > _pi_platform::devices_

Definition at line 75 of file pi_cuda.hpp.

◆ evBase_

hipEvent_t _pi_platform::evBase_ {nullptr}
static

Definition at line 68 of file pi_hip.hpp.

Referenced by hip_piContextCreate(), and hip_piGetDeviceAndHostTimer().

◆ PiDeviceCache

std::unique_ptr<_pi_device> _pi_platform::PiDeviceCache

Definition at line 70 of file pi_esimd_emulator.hpp.

Referenced by piDevicesGet(), and populateDeviceCacheIfNeeded().

◆ PiDeviceCacheMutex

std::mutex _pi_platform::PiDeviceCacheMutex

Definition at line 71 of file pi_esimd_emulator.hpp.

Referenced by populateDeviceCacheIfNeeded().


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