Home
last modified time | relevance | path

Searched refs:Memory (Results 1 – 25 of 134) sorted by relevance

123456

/hardware/interfaces/neuralnetworks/aidl/utils/src/
DUtils.cpp63 nn::GeneralResult<Memory> clone(const Memory& memory) { in clone()
65 case Memory::Tag::ashmem: { in clone()
66 const auto& ashmem = memory.get<Memory::Tag::ashmem>(); in clone()
72 return Memory::make<Memory::Tag::ashmem>(std::move(handle)); in clone()
74 case Memory::Tag::mappableFile: { in clone()
75 const auto& memFd = memory.get<Memory::Tag::mappableFile>(); in clone()
83 return Memory::make<Memory::Tag::mappableFile>(std::move(handle)); in clone()
85 case Memory::Tag::hardwareBuffer: { in clone()
86 const auto& hardwareBuffer = memory.get<Memory::Tag::hardwareBuffer>(); in clone()
92 return Memory::make<Memory::Tag::hardwareBuffer>(std::move(ahwbHandle)); in clone()
[all …]
DConversions.cpp364 GeneralResult<SharedMemory> unvalidatedConvert(const aidl_hal::Memory& memory) { in unvalidatedConvert()
365 using Tag = aidl_hal::Memory::Tag; in unvalidatedConvert()
375 auto handle = Memory::Ashmem{ in unvalidatedConvert()
379 return std::make_shared<const Memory>(Memory{.handle = std::move(handle)}); in unvalidatedConvert()
561 GeneralResult<SharedMemory> convert(const aidl_hal::Memory& operand) { in convert()
597 GeneralResult<std::vector<SharedMemory>> convert(const std::vector<aidl_hal::Memory>& memories) { in convert()
660 nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::Ashmem& memory) { in unvalidatedConvert()
667 operator nn::GeneralResult<Memory>(); in unvalidatedConvert()
676 return Memory::make<Memory::Tag::ashmem>(std::move(handle)); in unvalidatedConvert()
679 nn::GeneralResult<Memory> unvalidatedConvert(const nn::Memory::Fd& memory) { in unvalidatedConvert()
[all …]
/hardware/google/gfxstream/guest/vulkan_enc/
DCommandBufferStagingStream.h41 struct Memory { struct
45 bool operator==(const Memory& rhs) const { argument
53 using Alloc = std::function<Memory(size_t)>;
56 using Free = std::function<void(const Memory&)>;
89 Memory m_mem;
105 using Realloc = std::function<Memory(const Memory&, size_t)>;
DCommandBufferStagingStream.cpp38 m_alloc = [](size_t size) -> Memory { in CommandBufferStagingStream()
44 m_free = [](const Memory& mem) { free(mem.ptr); }; in CommandBufferStagingStream()
45 m_realloc = [](const Memory& mem, size_t size) -> Memory { in CommandBufferStagingStream()
58 m_alloc = [&allocFn](size_t size) -> Memory { in CommandBufferStagingStream()
68 Memory memory; in CommandBufferStagingStream()
88 m_free = [&freeFn](const Memory& mem) { in CommandBufferStagingStream()
98 m_realloc = [this](const Memory& mem, size_t size) -> Memory { in CommandBufferStagingStream()
130 Memory newMemory = m_alloc(size); in CommandBufferStagingStream()
/hardware/interfaces/tests/memory/1.0/default/
DMemoryTest.cpp38 Return<void> Memory::haveSomeMemory(const hidl_memory& mem, haveSomeMemory_cb _hidl_cb) { in haveSomeMemory()
43 Return<void> Memory::fillMemory(const hidl_memory& memory_in, uint8_t filler) { in fillMemory()
64 Return<void> Memory::haveSomeMemoryBlock(const MemoryBlock& blk, haveSomeMemoryBlock_cb _hidl_cb) { in haveSomeMemoryBlock()
69 Return<void> Memory::set(const hidl_memory& mem) { in set()
77 Return<sp<IMemoryToken>> Memory::get() { in get()
82 return new Memory(); in HIDL_FETCH_IMemoryTest()
/hardware/interfaces/neuralnetworks/aidl/android/hardware/neuralnetworks/
DIBuffer.aidl19 import android.hardware.neuralnetworks.Memory;
41 void copyFrom(in Memory src, in int[] dimensions); in copyFrom()
56 void copyTo(in Memory dst); in copyTo()
DRequestMemoryPool.aidl19 import android.hardware.neuralnetworks.Memory;
29 Memory pool;
DModel.aidl20 import android.hardware.neuralnetworks.Memory;
57 Memory[] pools;
/hardware/interfaces/neuralnetworks/utils/adapter/aidl/src/
DBuffer.cpp48 nn::GeneralResult<void> copyTo(const nn::IBuffer& buffer, const Memory& dst) { in copyTo()
53 nn::GeneralResult<void> copyFrom(const nn::IBuffer& buffer, const Memory& src, in copyFrom()
66 ndk::ScopedAStatus Buffer::copyTo(const Memory& dst) { in copyTo()
77 ndk::ScopedAStatus Buffer::copyFrom(const Memory& src, const std::vector<int32_t>& dimensions) { in copyFrom()
/hardware/interfaces/neuralnetworks/aidl/aidl_api/android.hardware.neuralnetworks/4/android/hardware/neuralnetworks/
DIBuffer.aidl37 void copyFrom(in android.hardware.neuralnetworks.Memory src, in int[] dimensions); in copyFrom()
38 void copyTo(in android.hardware.neuralnetworks.Memory dst); in copyTo()
DRequestMemoryPool.aidl37 android.hardware.neuralnetworks.Memory pool;
/hardware/interfaces/neuralnetworks/aidl/aidl_api/android.hardware.neuralnetworks/current/android/hardware/neuralnetworks/
DIBuffer.aidl37 void copyFrom(in android.hardware.neuralnetworks.Memory src, in int[] dimensions); in copyFrom()
38 void copyTo(in android.hardware.neuralnetworks.Memory dst); in copyTo()
DRequestMemoryPool.aidl37 android.hardware.neuralnetworks.Memory pool;
/hardware/interfaces/neuralnetworks/aidl/aidl_api/android.hardware.neuralnetworks/1/android/hardware/neuralnetworks/
DIBuffer.aidl37 void copyFrom(in android.hardware.neuralnetworks.Memory src, in int[] dimensions); in copyFrom()
38 void copyTo(in android.hardware.neuralnetworks.Memory dst); in copyTo()
DRequestMemoryPool.aidl37 android.hardware.neuralnetworks.Memory pool;
/hardware/interfaces/neuralnetworks/aidl/aidl_api/android.hardware.neuralnetworks/2/android/hardware/neuralnetworks/
DIBuffer.aidl37 void copyFrom(in android.hardware.neuralnetworks.Memory src, in int[] dimensions); in copyFrom()
38 void copyTo(in android.hardware.neuralnetworks.Memory dst); in copyTo()
DRequestMemoryPool.aidl37 android.hardware.neuralnetworks.Memory pool;
/hardware/interfaces/neuralnetworks/aidl/aidl_api/android.hardware.neuralnetworks/3/android/hardware/neuralnetworks/
DIBuffer.aidl37 void copyFrom(in android.hardware.neuralnetworks.Memory src, in int[] dimensions); in copyFrom()
38 void copyTo(in android.hardware.neuralnetworks.Memory dst); in copyTo()
DRequestMemoryPool.aidl37 android.hardware.neuralnetworks.Memory pool;
/hardware/google/gfxstream/guest/vulkan_enc_unit_tests/
DCommandBufferStagingStream_test.cpp207 using MockAlloc = MockFunction<CommandBufferStagingStream::Memory(size_t)>;
208 using MockFree = MockFunction<void(const CommandBufferStagingStream::Memory&)>;
210 static std::function<void(const CommandBufferStagingStream::Memory&)> EmptyFree =
211 [](const CommandBufferStagingStream::Memory&) {}; in __anon4e1dd5670102() argument
221 CommandBufferStagingStream::Memory memory{ in TEST()
249 CommandBufferStagingStream::Memory memory{ in TEST()
281 CommandBufferStagingStream::Memory memory{.deviceMemory = deviceMemPtr, in TEST()
334 CommandBufferStagingStream::Memory memory{ in TEST()
338 CommandBufferStagingStream::Memory reallocatedMemory{ in TEST()
401 CommandBufferStagingStream::Memory memory{ in TEST()
[all …]
/hardware/interfaces/neuralnetworks/utils/common/test/
DResilientBufferTest.cpp118 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
132 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
147 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
164 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
178 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
192 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
207 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
224 const nn::SharedMemory memory = std::make_shared<const nn::Memory>(); in TEST()
/hardware/interfaces/neuralnetworks/utils/adapter/aidl/include/nnapi/hal/aidl/
DBuffer.h38 ndk::ScopedAStatus copyFrom(const Memory& src, const std::vector<int32_t>& dimensions) override;
39 ndk::ScopedAStatus copyTo(const Memory& dst) override;
/hardware/interfaces/neuralnetworks/aidl/utils/test/
DMockBuffer.h31 MOCK_METHOD(ndk::ScopedAStatus, copyTo, (const Memory& dst), (override));
33 (const Memory& src, const std::vector<int32_t>& dimensions), (override));
/hardware/interfaces/neuralnetworks/aidl/vts/functional/
DMemoryDomainTests.cpp693 size_t getSize(const Memory& memory) { in getSize()
695 case Memory::Tag::ashmem: in getSize()
696 return memory.get<Memory::Tag::ashmem>().size; in getSize()
697 case Memory::Tag::mappableFile: in getSize()
698 return memory.get<Memory::Tag::mappableFile>().length; in getSize()
699 case Memory::Tag::hardwareBuffer: { in getSize()
700 const auto& hardwareBuffer = memory.get<Memory::Tag::hardwareBuffer>(); in getSize()
709 Memory allocateSharedMemory(uint32_t size) { in allocateSharedMemory()
716 void testCopyFrom(const std::shared_ptr<IBuffer>& buffer, const Memory& memory, in testCopyFrom()
727 void testCopyTo(const std::shared_ptr<IBuffer>& buffer, const Memory& memory, in testCopyTo()
[all …]
/hardware/interfaces/neuralnetworks/1.0/utils/src/
DConversions.cpp83 nn::GeneralResult<nn::Memory::Unknown::Handle> unknownHandleFromNativeHandle( in unknownHandleFromNativeHandle()
95 return nn::Memory::Unknown::Handle{.fds = std::move(fds), .ints = std::move(ints)}; in unknownHandleFromNativeHandle()
114 auto handle = nn::Memory::Ashmem{ in createSharedMemoryFromHidlMemory()
118 return std::make_shared<const nn::Memory>(nn::Memory{.handle = std::move(handle)}); in createSharedMemoryFromHidlMemory()
142 auto unknown = nn::Memory::Unknown{ in createSharedMemoryFromHidlMemory()
147 return std::make_shared<const nn::Memory>(nn::Memory{.handle = std::move(unknown)}); in createSharedMemoryFromHidlMemory()
436 nn::GeneralResult<hidl_handle> createNativeHandleFrom(const nn::Memory::Unknown::Handle& handle) { in createNativeHandleFrom()
441 nn::GeneralResult<hidl_memory> createHidlMemoryFrom(const nn::Memory::Ashmem& memory) { in createHidlMemoryFrom()
447 nn::GeneralResult<hidl_memory> createHidlMemoryFrom(const nn::Memory::Fd& memory) { in createHidlMemoryFrom()
457 nn::GeneralResult<hidl_memory> createHidlMemoryFrom(const nn::Memory::HardwareBuffer& memory) { in createHidlMemoryFrom()
[all …]

123456