#include <detail/kernel_program_cache.hpp>
Classes | |
struct | BuildError |
Denotes build error data. More... | |
struct | BuildResult |
Denotes pointer to some entity with its general state and build error. More... | |
Public Types | |
using | PiProgramT = std::remove_pointer< RT::PiProgram >::type |
using | PiProgramPtrT = std::atomic< PiProgramT * > |
using | ProgramWithBuildStateT = BuildResult< PiProgramT > |
using | ProgramCacheKeyT = std::pair< std::pair< SerializedObj, std::uintptr_t >, std::pair< RT::PiDevice, std::string > > |
using | ProgramCacheT = std::map< ProgramCacheKeyT, ProgramWithBuildStateT > |
using | ContextPtr = context_impl * |
using | PiKernelT = std::remove_pointer< RT::PiKernel >::type |
using | PiKernelPtrT = std::atomic< PiKernelT * > |
using | KernelWithBuildStateT = BuildResult< PiKernelT > |
using | KernelByNameT = std::map< std::string, KernelWithBuildStateT > |
using | KernelCacheT = std::map< RT::PiProgram, KernelByNameT > |
using | KernelFastCacheKeyT = std::tuple< SerializedObj, OSModuleHandle, RT::PiDevice, std::string, std::string > |
using | KernelFastCacheValT = std::tuple< RT::PiKernel, std::mutex *, RT::PiProgram > |
using | KernelFastCacheT = std::map< KernelFastCacheKeyT, KernelFastCacheValT > |
Public Member Functions | |
~KernelProgramCache () | |
void | setContextPtr (const ContextPtr &AContext) |
Locked< ProgramCacheT > | acquireCachedPrograms () |
Locked< KernelCacheT > | acquireKernelsPerProgramCache () |
template<typename T , class Predicate > | |
void | waitUntilBuilt (BuildResult< T > &BR, Predicate Pred) const |
template<typename T > | |
void | notifyAllBuild (BuildResult< T > &BR) const |
template<typename KeyT > | |
KernelFastCacheValT | tryToGetKernelFast (KeyT &&CacheKey) |
template<typename KeyT , typename ValT > | |
void | saveKernel (KeyT &&CacheKey, ValT &&CacheVal) |
void | reset () |
Clears cache state. More... | |
Friends | |
class | ::MockKernelProgramCache |
Definition at line 31 of file kernel_program_cache.hpp.
Definition at line 74 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::KernelByNameT = std::map<std::string, KernelWithBuildStateT> |
Definition at line 80 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::KernelCacheT = std::map<RT::PiProgram, KernelByNameT> |
Definition at line 81 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::KernelFastCacheKeyT = std::tuple<SerializedObj, OSModuleHandle, RT::PiDevice, std::string, std::string> |
Definition at line 83 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::KernelFastCacheT = std::map<KernelFastCacheKeyT, KernelFastCacheValT> |
Definition at line 88 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::KernelFastCacheValT = std::tuple<RT::PiKernel, std::mutex *, RT::PiProgram> |
Definition at line 86 of file kernel_program_cache.hpp.
Definition at line 79 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::PiKernelPtrT = std::atomic<PiKernelT *> |
Definition at line 78 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::PiKernelT = std::remove_pointer<RT::PiKernel>::type |
Definition at line 76 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::PiProgramPtrT = std::atomic<PiProgramT *> |
Definition at line 69 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::PiProgramT = std::remove_pointer<RT::PiProgram>::type |
Definition at line 68 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::ProgramCacheKeyT = std::pair<std::pair<SerializedObj, std::uintptr_t>, std::pair<RT::PiDevice, std::string> > |
Definition at line 71 of file kernel_program_cache.hpp.
using sycl::_V1::detail::KernelProgramCache::ProgramCacheT = std::map<ProgramCacheKeyT, ProgramWithBuildStateT> |
Definition at line 73 of file kernel_program_cache.hpp.
Definition at line 70 of file kernel_program_cache.hpp.
sycl::_V1::detail::KernelProgramCache::~KernelProgramCache | ( | ) |
Definition at line 16 of file kernel_program_cache.cpp.
References sycl::_V1::detail::plugin::call(), piKernelRelease(), piProgramRelease(), and sycl::_V1::detail::KernelProgramCache::BuildResult< T >::Ptr.
|
inline |
Definition at line 94 of file kernel_program_cache.hpp.
Referenced by sycl::_V1::detail::ProgramManager::build(), and sycl::_V1::detail::ProgramManager::getBuiltPIProgram().
|
inline |
Definition at line 98 of file kernel_program_cache.hpp.
Referenced by sycl::_V1::detail::ProgramManager::getOrCreateKernel().
|
inline |
Definition at line 109 of file kernel_program_cache.hpp.
Referenced by sycl::_V1::detail::getOrBuild().
|
inline |
Clears cache state.
This member function should only be used in unit tests.
Definition at line 134 of file kernel_program_cache.hpp.
|
inline |
Definition at line 124 of file kernel_program_cache.hpp.
Referenced by sycl::_V1::detail::ProgramManager::getOrCreateKernel().
|
inline |
Definition at line 92 of file kernel_program_cache.hpp.
Referenced by sycl::_V1::detail::context_impl::context_impl().
|
inline |
Definition at line 114 of file kernel_program_cache.hpp.
References sycl::_V1::detail::make_tuple().
Referenced by sycl::_V1::detail::ProgramManager::getOrCreateKernel().
|
inline |
Definition at line 103 of file kernel_program_cache.hpp.
Referenced by sycl::_V1::detail::waitUntilBuilt().
|
friend |
Definition at line 150 of file kernel_program_cache.hpp.