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 (#5521)
  • Loading branch information
Xyzhao1999 authored Jun 20, 2024
1 parent 8235cad commit fbd6690
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 fbd6690

Please sign in to comment.