mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Use StackVec in Buffer::create instead of std::map
Related-To: NEO-4589 Change-Id: I9aa3a5de7e4e86b85c4589901a81a5b9633fc23f Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
1d74871f85
commit
0f31b5cc8b
@@ -17,7 +17,6 @@
|
||||
#include "memory_properties_flags.h"
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
|
||||
namespace NEO {
|
||||
class Device;
|
||||
@@ -69,6 +68,8 @@ struct AllocationInfo {
|
||||
};
|
||||
} // namespace CreateBuffer
|
||||
|
||||
using AllocationInfoType = StackVec<CreateBuffer::AllocationInfo, 1>;
|
||||
|
||||
class Buffer : public MemObj {
|
||||
public:
|
||||
constexpr static size_t maxBufferSizeForReadWriteOnCpu = 10 * MB;
|
||||
@@ -173,7 +174,7 @@ class Buffer : public MemObj {
|
||||
|
||||
bool isCompressed(uint32_t rootDeviceIndex) const;
|
||||
|
||||
static void cleanAllGraphicsAllocations(Context &context, MemoryManager &memoryManager, std::map<uint32_t, NEO::CreateBuffer::AllocationInfo> &allocationInfo);
|
||||
static void cleanAllGraphicsAllocations(Context &context, MemoryManager &memoryManager, AllocationInfoType &allocationInfo);
|
||||
|
||||
protected:
|
||||
Buffer(Context *context,
|
||||
|
||||
Reference in New Issue
Block a user