MCPcopy Create free account
hub / github.com/alibaba/MNN / copyToGPUBuffer

Method copyToGPUBuffer

source/backend/vulkan/buffer/backend/VulkanBackend.cpp:428–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428void VulkanBackend::copyToGPUBuffer(const void* src, VkBuffer buffer, VkDeviceSize size, VkDeviceSize offset) const {
429 _requireHostBuffer(size);
430 ::memcpy(mHostBuffer->map(), src, size);
431 mHostBuffer->unmap();
432 copyGPUToGPUBuffer(mHostBuffer->buffer(), buffer, size, 0, offset);
433}
434void VulkanBackend::_requireHostBuffer(size_t size) const {
435 _finish();
436 if (nullptr == mHostBuffer || mHostBuffer->size() < size) {

Callers 8

VulkanLayernormMethod · 0.80
_prepareQuantBuffersGPUFunction · 0.80
makeResourceMethod · 0.80
resetPersistentStateMethod · 0.80
_prepareStaticBuffersGPUFunction · 0.80
createMethod · 0.80
_prepareQuantBuffersGPUFunction · 0.80
_initMethod · 0.80

Calls 3

mapMethod · 0.45
unmapMethod · 0.45
bufferMethod · 0.45

Tested by

no test coverage detected