Class ResourceManager¶
Defined in File resource_manager.hpp
Class Documentation¶
-
class ResourceManager¶
Public Functions
-
~ResourceManager() = default¶
-
ResourceManager(const ResourceManager&) = delete¶
-
ResourceManager(ResourceManager&&) = delete¶
-
ResourceManager &operator=(const ResourceManager&) = delete¶
-
ResourceManager &operator=(ResourceManager&&) = delete¶
-
inline std::string getAllocatorName(AMSResourceType resource) const¶
Return an owning copy of the allocator name.
-
inline std::shared_ptr<AMSAllocator> getAllocator(AMSResourceType resource) const¶
- template<typename TypeInValue> PERFFASPECT () TypeInValue *allocate(size_t nvalues
Allocates nvalues on the specified device.
- Template Parameters:
TypeInValue – The type of pointer to allocate.
- Parameters:
nvalues – [in] Number of elements to allocate.
dev – [in] Resource to allocate memory from.
- Returns:
Pointer to allocated elements.
Public Members
-
AMSResourceType dev¶
- AMSResourceType size_t alignment = sizeof(TypeInValue)){auto allocator = getAllocator(dev);return static_cast<TypeInValue*>(allocator->allocate(nvalues * sizeof(TypeInValue), alignment));}template <typename TypeInValue
Public Static Functions
-
static inline ResourceManager &getInstance()¶
-
~ResourceManager() = default¶