Home
last modified time | relevance | path

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

12

/packages/modules/NeuralNetworks/common/
DSharedMemoryAndroid.cpp53 auto handle = Memory::Fd{ in createSharedMemoryFromUniqueFd()
59 return std::make_shared<const Memory>(Memory{.handle = std::move(handle)}); in createSharedMemoryFromUniqueFd()
109 auto handle = Memory::Ashmem{ in allocateSharedMemory()
113 return std::make_shared<const Memory>(Memory{.handle = std::move(handle)}); in allocateSharedMemory()
116 GeneralResult<Mapping> map(const Memory::Ashmem& memory) { in map()
163 GeneralResult<Mapping> map(const Memory::Ashmem& /*memory*/) { in map()
169 size_t getSize(const Memory::Ashmem& memory) { in getSize()
173 size_t getSize(const Memory::Fd& memory) { in getSize()
177 size_t getSize(const Memory::HardwareBuffer& memory) { in getSize()
183 size_t getSize(const Memory::Unknown& memory) { in getSize()
[all …]
DTypeUtils.cpp734 static std::ostream& operator<<(std::ostream& os, const Memory::Ashmem& memory) { in operator <<()
739 static std::ostream& operator<<(std::ostream& os, const Memory::Fd& memory) { in operator <<()
745 static std::ostream& operator<<(std::ostream& os, const Memory::HardwareBuffer& memory) { in operator <<()
752 static std::ostream& operator<<(std::ostream& os, const Memory::Unknown& memory) { in operator <<()
757 std::ostream& operator<<(std::ostream& os, const Memory& memory) { in operator <<()
/packages/modules/NeuralNetworks/runtime/include/
DNeuralNetworksWrapper.h184 class Memory {
188 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemory* memory) in Memory() function
191 Memory(const NnApiSupportLibrary* nnapi, size_t size, int protect, int fd, size_t offset) function
194 Memory(size_t size, int protect, int fd, size_t offset) {
201 Memory(const NnApiSupportLibrary* nnapi, AHardwareBuffer* buffer) : mNnApi(nnapi) { function
203 Memory(AHardwareBuffer* buffer) {
209 ~Memory() {
218 Memory(const Memory&) = delete;
219 Memory& operator=(const Memory&) = delete;
224 Memory(Memory&& other) { *this = std::move(other); } function
[all …]
/packages/modules/NeuralNetworks/runtime/test/
DTestNeuralNetworksWrapper.h55 class Memory {
58 Memory(ANeuralNetworksMemory* memory) : mMemory(memory) {} in Memory() function
60 Memory(size_t size, int protect, int fd, size_t offset) { in Memory() function
65 Memory(AHardwareBuffer* buffer) { in Memory() function
70 virtual ~Memory() { ANeuralNetworksMemory_free(mMemory); } in ~Memory()
75 Memory(const Memory&) = delete;
76 Memory& operator=(const Memory&) = delete;
81 Memory(Memory&& other) { *this = std::move(other); } in Memory() function
82 Memory& operator=(Memory&& other) {
194 void setOperandValueFromMemory(uint32_t index, const Memory* memory, uint32_t offset, in setOperandValueFromMemory()
[all …]
DTestUtils.h36 test_wrapper::Memory memory) in TestAshmem()
58 test_wrapper::Memory memory(length, PROT_READ | PROT_WRITE, fd, 0); in createFrom()
67 test_wrapper::Memory* get() { return &mMemory; } in get()
77 test_wrapper::Memory mMemory;
DSupportLibraryTestUtils.h35 sl_wrapper::Memory memory) in TestAshmem()
59 sl_wrapper::Memory memory(nnapi, length, PROT_READ | PROT_WRITE, fd, 0); in createFrom()
68 sl_wrapper::Memory* get() { return &mMemory; } in get()
78 sl_wrapper::Memory mMemory;
DGeneratedTestUtils.h76 void setConstantReferenceMemory(std::unique_ptr<test_wrapper::Memory> memory) { in setConstantReferenceMemory()
82 std::unique_ptr<test_wrapper::Memory> mConstantReferenceMemory;
DGeneratedTestUtils.cpp56 class MemoryAHWB : public Memory {
97 : Memory(nnapi, ahwb, false, {}), mAhwb(ahwb), mBuffer(buffer) {} in create()
99 MemoryAHWB(AHardwareBuffer* ahwb, void* buffer) : Memory(ahwb), mAhwb(ahwb), mBuffer(buffer) {} in create()
DTestGenerated.cpp180 std::vector<Memory>* inputMemories, in createRequestWithDeviceMemories()
181 std::vector<Memory>* outputMemories) { in createRequestWithDeviceMemories()
220 const std::vector<Memory>& outputMemories, in copyResultsFromDeviceMemories()
252 std::vector<Memory> inputMemories, outputMemories; in executeInternal()
DTestMemoryDomain.cpp220 std::pair<int, test_wrapper::Memory> allocateDeviceMemory( in allocateDeviceMemory()
239 return {n, test_wrapper::Memory(memory)}; in allocateDeviceMemory()
286 return memory != nullptr && std::holds_alternative<Memory::Ashmem>(memory->handle); in isAshmem()
DTestUnspecifiedDimensions.cpp112 memory = std::make_shared<Memory>(kLength, PROT_READ | PROT_WRITE, fd, 0); in initialize()
115 const Memory* getMemory() const { return memory.get(); } in getMemory()
120 std::shared_ptr<Memory> memory;
/packages/modules/NeuralNetworks/shim_and_sl/include/
DSupportLibraryWrapper.h48 class Memory {
51 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemory* memory) in Memory() function
55 Memory(const NnApiSupportLibrary* nnapi, size_t size, int protect, int fd, size_t offset,
63 Memory(const NnApiSupportLibrary* nnapi, AHardwareBuffer* buffer, bool ownAHWB, size_t size) in Memory() function
70 Memory(const NnApiSupportLibrary* nnapi, ANeuralNetworksMemoryDesc* desc, size_t size) in Memory() function
76 virtual ~Memory() { in ~Memory()
91 Memory(const Memory&) = delete;
92 Memory& operator=(const Memory&) = delete;
97 Memory(Memory&& other) { *this = std::move(other); } in Memory() function
98 Memory& operator=(Memory&& other) {
[all …]
DShimConverter.h33 std::vector<std::unique_ptr<::android::nn::sl_wrapper::Memory>> memory;
55 std::unique_ptr<::android::nn::sl_wrapper::Memory> convertFromHAL(
56 const NnApiSupportLibrary* nnapi, const neuralnetworks::Memory& pool);
DShimBufferTracker.h69 std::unique_ptr<Token> add(std::shared_ptr<::android::nn::sl_wrapper::Memory> buffer);
70 std::shared_ptr<::android::nn::sl_wrapper::Memory> get(uint32_t token) const;
81 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>> mTokenToBuffers
DShimPreparedModel.h37 std::vector<std::unique_ptr<::android::nn::sl_wrapper::Memory>> memoryPools, in ShimPreparedModel()
67 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>>* requestMemoryPools);
74 std::vector<std::unique_ptr<::android::nn::sl_wrapper::Memory>> mMemoryPools;
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/
DMemoryTest.java34 new Memory(); in testConstructor()
40 Memory.pokeInt(buf, 0, expected, ByteOrder.BIG_ENDIAN); in testBigEndian()
41 final int actual = Memory.peekInt(buf, 0, ByteOrder.BIG_ENDIAN); in testBigEndian()
48 Memory.pokeInt(buf, 0, expected, ByteOrder.LITTLE_ENDIAN); in testLittleEndian()
49 final int actual = Memory.peekInt(buf, 0, ByteOrder.LITTLE_ENDIAN); in testLittleEndian()
/packages/modules/NeuralNetworks/shim_and_sl/
DShimConverter.cpp48 const std::vector<std::unique_ptr<::android::nn::sl_wrapper::Memory>>& memoryPools, in convertSubgraphFromHAL()
372 std::vector<std::unique_ptr<::android::nn::sl_wrapper::Memory>> memoryPools; in convertFromHAL()
375 std::unique_ptr<::android::nn::sl_wrapper::Memory> memory = convertFromHAL(nnapi, pool); in convertFromHAL()
414 std::unique_ptr<::android::nn::sl_wrapper::Memory> convertFromHAL( in convertFromHAL()
415 const NnApiSupportLibrary* nnapi, const neuralnetworks::Memory& pool) { in convertFromHAL()
416 using Tag = neuralnetworks::Memory::Tag; in convertFromHAL()
423 auto memory = std::make_unique<::android::nn::sl_wrapper::Memory>( in convertFromHAL()
437 auto memory = std::make_unique<::android::nn::sl_wrapper::Memory>( in convertFromHAL()
484 std::make_unique<::android::nn::sl_wrapper::Memory>(nnapi, ahwb, in convertFromHAL()
DShimPreparedModel.cpp47 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>>* requestMemoryPools) { in parseInputs()
52 std::shared_ptr<::android::nn::sl_wrapper::Memory> mem = in parseInputs()
152 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>> memoryPools, in ShimFencedExecutionCallback()
207 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>> mMemoryPools;
224 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>> requestMemoryPools; in executeFenced()
278 std::vector<std::shared_ptr<::android::nn::sl_wrapper::Memory>> requestMemoryPools; in executeSynchronously()
DShimBufferTracker.cpp35 std::shared_ptr<::android::nn::sl_wrapper::Memory> buffer) { in add()
52 std::shared_ptr<::android::nn::sl_wrapper::Memory> ShimBufferTracker::get(uint32_t token) const { in get()
DShimDevice.cpp196 std::shared_ptr<::android::nn::sl_wrapper::Memory> memory, in ShimBuffer()
249 ndk::ScopedAStatus copyFrom(const aidl::android::hardware::neuralnetworks::Memory& src, in copyFrom()
285 ndk::ScopedAStatus copyTo(const Memory& dst) override { in copyTo()
314 std::shared_ptr<::android::nn::sl_wrapper::Memory> mMemory;
438 std::make_shared<::android::nn::sl_wrapper::Memory>(mNnapi.get(), slDesc, *typeSize); in allocate()
/packages/modules/NeuralNetworks/common/include/nnapi/
DTypes.h51 struct Memory;
84 using SharedMemory = std::shared_ptr<const Memory>;
631 struct Memory { struct
/packages/modules/NeuralNetworks/tools/api/
DTypes.t53 struct Memory;
77 using SharedMemory = std::shared_ptr<const Memory>;
157 struct Memory {
/packages/modules/NeuralNetworks/driver/sample_aidl/
DSampleDriver.h45 ndk::ScopedAStatus copyFrom(const aidl_hal::Memory& src,
47 ndk::ScopedAStatus copyTo(const aidl_hal::Memory& dst) override;
/packages/modules/NeuralNetworks/runtime/
DAndroid.bp92 "Memory.cpp",
213 "Memory.cpp",
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DIsoInterface.java114 Memory.pokeInt(buf, 0, type, ByteOrder.BIG_ENDIAN); in typeToString()
122 return Memory.peekInt(buf, 0, ByteOrder.BIG_ENDIAN); in readInt()

12