Home
last modified time | relevance | path

Searched refs:SharedMemory (Results 1 – 25 of 42) sorted by relevance

12

/packages/services/Car/cpp/car_binder_lib/largeParcelable/tests/
DMappedFileSharedMemoryTest.cpp31 using ::android::automotive::car_binder_lib::SharedMemory;
39 SharedMemory sm(std::move(fd)); in TEST()
47 SharedMemory sm(std::move(fd)); in TEST()
54 SharedMemory sm(std::move(fd)); in TEST()
59 void testSharedMemoryMapRead(const SharedMemory& sm) { in testSharedMemoryMapRead()
69 SharedMemory sm(std::move(fd)); in TEST()
78 SharedMemory sm(TEST_SIZE); in TEST()
86 void testSharedMemoryMapWriteAndRead(const SharedMemory& sm) { in testSharedMemoryMapWriteAndRead()
113 SharedMemory sm(std::move(fd)); in TEST()
122 SharedMemory sm(TEST_SIZE); in TEST()
[all …]
/packages/services/Car/car-lib/src/com/android/car/internal/
DLargeParcelableBase.java27 import android.os.SharedMemory;
65 private @Nullable SharedMemory mSharedMemory;
106 SharedMemory memory = SharedMemory.CREATOR.createFromParcel(in); in LargeParcelableBase()
120 SharedMemory sharedMemory; in writeToParcel()
176 private void writeSharedMemoryCompatibleToParcel(Parcel dest, SharedMemory memory, int flags) { in writeSharedMemoryCompatibleToParcel()
207 SharedMemory sharedMemory = null; in close()
217 protected static SharedMemory serializeParcelToSharedMemory(Parcel p) { in serializeParcelToSharedMemory()
218 SharedMemory memory = null; in serializeParcelToSharedMemory()
222 memory = SharedMemory.create(LargeParcelableBase.class.getSimpleName(), size); in serializeParcelToSharedMemory()
255 SharedMemory.unmap(buffer); in serializeParcelToSharedMemory()
[all …]
DLargeParcelable.java25 import android.os.SharedMemory;
207 SharedMemory memory = LargeParcelableBase.serializeParcelToSharedMemory(dataParcel); in toLargeParcelable()
283 SharedMemory memory = SharedMemory.fromFileDescriptor(sharedMemoryFd.dup()); in reconstructStableAIDLParcelable()
/packages/modules/NeuralNetworks/common/types/include/nnapi/
DSharedMemory.h43 GeneralResult<SharedMemory> finish();
57 GeneralResult<SharedMemory> finish();
85 GeneralResult<SharedMemory> createSharedMemory(size_t size);
89 GeneralResult<SharedMemory> createSharedMemoryFromFd(size_t size, int prot, int fd, size_t offset);
93 GeneralResult<SharedMemory> createSharedMemoryFromAHWB(AHardwareBuffer* ahwb, bool takeOwnership);
97 size_t getSize(const SharedMemory& memory);
102 bool isAhwbBlob(const SharedMemory& memory);
110 GeneralResult<Mapping> map(const SharedMemory& memory);
147 std::vector<RelocationInfoType> relocationInfos, SharedMemory memory) { in create()
153 RelocationTracker(std::vector<RelocationInfoType> relocationInfos, SharedMemory memory, in RelocationTracker()
[all …]
DIBuffer.h48 virtual GeneralResult<void> copyTo(const SharedMemory& dst) const = 0;
61 virtual GeneralResult<void> copyFrom(const SharedMemory& src,
DTypes.h84 using SharedMemory = std::shared_ptr<const Memory>; variable
792 std::vector<SharedMemory> pools;
922 using MemoryPool = std::variant<SharedMemory, MemoryDomainToken, SharedBuffer>;
/packages/services/Car/cpp/car_binder_lib/largeParcelable/
DLargeParcelableBase.cpp116 std::unique_ptr<SharedMemory> sharedMemory = in prepareSharedMemory()
139 const SharedMemory* sharedMemory = mSharedMemory.get(); in writeToParcel()
159 SharedMemory sharedMemory(std::move(memoryFd)); in deserializeSharedMemoryAndClose()
184 binder_status_t LargeParcelableBase::copyFromSharedMemory(const SharedMemory& sharedMemory, in copyFromSharedMemory()
233 const SharedMemory* sharedMemory, AParcel* dest) { in writeSharedMemoryCompatibleToParcel()
244 std::unique_ptr<SharedMemory> LargeParcelableBase::serializeParcelToSharedMemory( in serializeParcelToSharedMemory()
246 std::unique_ptr<SharedMemory> memory(new SharedMemory(size)); in serializeParcelToSharedMemory()
250 return std::unique_ptr<SharedMemory>(nullptr); in serializeParcelToSharedMemory()
258 return std::unique_ptr<SharedMemory>(nullptr); in serializeParcelToSharedMemory()
265 return std::unique_ptr<SharedMemory>(nullptr); in serializeParcelToSharedMemory()
[all …]
DSharedMemory.cpp43 SharedMemory::SharedMemory(unique_fd fd) : mBorrowedFd(-1), mOwned(true) { in SharedMemory() function in android::automotive::car_binder_lib::SharedMemory
60 SharedMemory::SharedMemory(borrowed_fd fd) : mBorrowedFd(-1), mOwned(false) { in SharedMemory() function in android::automotive::car_binder_lib::SharedMemory
76 SharedMemory::SharedMemory(size_t size) : mBorrowedFd(-1), mOwned(true) { in SharedMemory() function in android::automotive::car_binder_lib::SharedMemory
87 status_t SharedMemory::lock() { in lock()
/packages/modules/NeuralNetworks/runtime/
DMemory.h162 int copyIBufferToMemory(const SharedBuffer& src, const SharedMemory& dst);
164 int copyMemoryToIBuffer(const SharedMemory& src, const SharedBuffer& dst,
176 const SharedMemory& getMemory() const { return kMemory; } in getMemory()
198 explicit RuntimeMemory(SharedMemory memory);
199 RuntimeMemory(SharedMemory memory, std::unique_ptr<MemoryValidatorBase> validator);
204 const SharedMemory kMemory = std::make_shared<const Memory>();
285 MemoryAshmem(SharedMemory memory, Mapping mapped);
302 explicit MemoryFd(SharedMemory memory);
315 MemoryAHWB(SharedMemory memory, std::unique_ptr<MemoryValidatorBase> validator) in MemoryAHWB()
339 MemoryRuntimeAHWB(SharedMemory memory, Mapping mapping);
DMemory.cpp187 RuntimeMemory::RuntimeMemory(SharedMemory memory) : kMemory(std::move(memory)) { in RuntimeMemory()
192 RuntimeMemory::RuntimeMemory(SharedMemory memory, std::unique_ptr<MemoryValidatorBase> validator) in RuntimeMemory()
239 int copyIBufferToMemory(const SharedBuffer& src, const SharedMemory& dst) { in copyIBufferToMemory()
248 int copyMemoryToIBuffer(const SharedMemory& src, const SharedBuffer& dst, in copyMemoryToIBuffer()
266 const SharedMemory& memory = runtimeMemory->getMemory(); in copyIBuffers()
539 MemoryAshmem::MemoryAshmem(SharedMemory memory, Mapping mapping) in MemoryAshmem()
552 MemoryFd::MemoryFd(SharedMemory memory) : RuntimeMemory(std::move(memory)) {} in MemoryFd()
623 MemoryRuntimeAHWB::MemoryRuntimeAHWB(SharedMemory memory, Mapping mapping) in MemoryRuntimeAHWB()
/packages/services/Car/car-lib/src/android/car/vms/
DVmsClient.java31 import android.os.SharedMemory;
264 try (SharedMemory largePacket = packetToSharedMemory(packet)) { in publishPacket()
354 public void onLargePacketReceived(int providerId, VmsLayer layer, SharedMemory packet) { in onLargePacketReceived()
361 try (SharedMemory autoClosedPacket = packet) { in onLargePacketReceived()
387 private static SharedMemory packetToSharedMemory(byte[] packet) { in packetToSharedMemory()
388 SharedMemory shm; in packetToSharedMemory()
390 shm = SharedMemory.create("VmsClient", packet.length); in packetToSharedMemory()
404 SharedMemory.unmap(buffer); in packetToSharedMemory()
416 private static byte[] sharedMemoryToPacket(SharedMemory shm) { in sharedMemoryToPacket()
429 SharedMemory.unmap(buffer); in sharedMemoryToPacket()
DIVmsClientCallback.aidl22 import android.os.SharedMemory;
44 in SharedMemory packet) = 3; in onLargePacketReceived()
DIVmsBrokerService.aidl25 import android.os.SharedMemory;
77 in SharedMemory packet) = 8; in publishLargePacket()
/packages/modules/NeuralNetworks/common/types/src/
DSharedMemoryAndroid.cpp51 GeneralResult<SharedMemory> createSharedMemoryFromUniqueFd(size_t size, int prot, in createSharedMemoryFromUniqueFd()
64 GeneralResult<SharedMemory> allocateSharedMemory(size_t size) { in allocateSharedMemory()
101 GeneralResult<SharedMemory> allocateSharedMemory(size_t size) { in allocateSharedMemory()
235 GeneralResult<SharedMemory> createSharedMemory(size_t size) { in createSharedMemory()
239 GeneralResult<SharedMemory> createSharedMemoryFromFd(size_t size, int prot, int fd, size_t offset) { in createSharedMemoryFromFd()
244 GeneralResult<SharedMemory> createSharedMemoryFromAHWB(AHardwareBuffer* ahwb, bool takeOwnership) { in createSharedMemoryFromAHWB()
252 size_t getSize(const SharedMemory& memory) { in getSize()
271 bool isAhwbBlob(const SharedMemory& memory) { in isAhwbBlob()
279 GeneralResult<Mapping> map(const SharedMemory& memory) { in map()
DSharedMemory.cpp106 GeneralResult<SharedMemory> MutableMemoryBuilder::finish() { in finish()
123 GeneralResult<SharedMemory> ConstantMemoryBuilder::finish() { in finish()
/packages/services/Car/cpp/car_binder_lib/largeParcelable/include/
DSharedMemory.h39 class SharedMemory {
44 explicit SharedMemory(unique_fd fd);
47 explicit SharedMemory(borrowed_fd fd);
51 explicit SharedMemory(size_t size);
DLargeParcelableBase.h168 static std::unique_ptr<SharedMemory> serializeParcelToSharedMemory(const AParcel& p,
172 static binder_status_t copyFromSharedMemory(const SharedMemory& sharedMemory, AParcel* parcel);
189 mutable std::unique_ptr<SharedMemory> mSharedMemory;
195 static binder_status_t writeSharedMemoryCompatibleToParcel(const SharedMemory* sharedMemory,
213 const SharedMemory* sharedMemory) const;
/packages/modules/NeuralNetworks/driver/sample/
DCanonicalBuffer.cpp39 GeneralResult<void> copyFromInternal(const SharedMemory& src, const Dimensions& dimensions, in copyFromInternal()
70 GeneralResult<void> Buffer::copyTo(const SharedMemory& dst) const { in copyTo()
88 GeneralResult<void> Buffer::copyFrom(const SharedMemory& src, const Dimensions& dimensions) const { in copyFrom()
DCanonicalBuffer.h36 GeneralResult<void> copyTo(const SharedMemory& dst) const override;
37 GeneralResult<void> copyFrom(const SharedMemory& src,
/packages/services/Car/car-builtin-lib/src/android/car/builtin/os/
DSharedMemoryHelper.java24 import android.os.SharedMemory;
43 @NonNull SharedMemory memory) throws IOException { in createParcelFileDescriptor()
/packages/modules/NeuralNetworks/common/include/
DCpuExecutor.h108 static std::optional<RunTimePoolInfo> createFromMemory(const SharedMemory& memory);
113 const SharedMemory& getMemory() const;
124 const std::vector<SharedMemory>& pools);
DLegacyHalUtils.h344 SharedMemory uncheckedConvert(const hardware::hidl_memory& memory);
362 std::vector<SharedMemory> uncheckedConvert(
373 hardware::hidl_memory convertToV1_0(const SharedMemory& memory);
374 hardware::hidl_vec<hardware::hidl_memory> convertToV1_0(const std::vector<SharedMemory>& memories);
/packages/modules/NeuralNetworks/common/types/
DAndroid.bp57 "src/SharedMemory.cpp",
111 "src/SharedMemory.cpp",
/packages/services/Car/service/src/com/android/car/vms/
DVmsBrokerService.java40 import android.os.SharedMemory;
222 SharedMemory packet) { in publishLargePacket()
223 try (SharedMemory largePacket = packet) { in publishLargePacket()
/packages/modules/NeuralNetworks/common/
DCpuExecutor.cpp289 RunTimePoolInfoImpl(SharedMemory memory, Mapping mapping);
296 const SharedMemory& getMemory() const { return mMemory; } in getMemory()
299 const SharedMemory mMemory;
303 RunTimePoolInfo::RunTimePoolInfoImpl::RunTimePoolInfoImpl(SharedMemory memory, Mapping mapping) in RunTimePoolInfoImpl()
328 std::optional<RunTimePoolInfo> RunTimePoolInfo::createFromMemory(const SharedMemory& memory) { in createFromMemory()
361 const SharedMemory& RunTimePoolInfo::getMemory() const { in getMemory()
366 const std::vector<SharedMemory>& pools) { in setRunTimePoolInfosFromCanonicalMemories()
388 if (!std::holds_alternative<SharedMemory>(pool)) { in setRunTimePoolInfosFromMemoryPools()
394 RunTimePoolInfo::createFromMemory(std::get<SharedMemory>(pool))) { in setRunTimePoolInfosFromMemoryPools()

12