Skip to content

Commit

Permalink
fix: add NCNN_PLATFORM_API macro for VkAndroidHardwareBufferImageAllo…
Browse files Browse the repository at this point in the history
…cator
  • Loading branch information
Xyzhao1999 committed Jun 20, 2024
1 parent 8235cad commit 4d3d784
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/allocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1933,6 +1933,7 @@ void VkWeightStagingAllocator::fastFree(VkImageMemory* /*ptr*/)
{
}

#if NCNN_PLATFORM_API
#if __ANDROID_API__ >= 26
VkAndroidHardwareBufferImageAllocator::VkAndroidHardwareBufferImageAllocator(const VulkanDevice* _vkdev, AHardwareBuffer* _hb)
: VkAllocator(_vkdev), hb(_hb)
Expand Down Expand Up @@ -2171,6 +2172,7 @@ uint64_t VkAndroidHardwareBufferImageAllocator::external_format() const
return bufferFormatProperties.externalFormat;
}
#endif // __ANDROID_API__ >= 26
#endif // NCNN_PLATFORM_API

#endif // NCNN_VULKAN

Expand Down

0 comments on commit 4d3d784

Please sign in to comment.