Skip to content

Commit

Permalink
修复无vulkan编辑条件下的编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiyuetribe committed Jul 31, 2024
1 parent f1db785 commit ae2f9f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,11 @@ void ncnn_net_register_custom_layer_by_typeindex(ncnn_net_t net, int typeindex,
#if NCNN_STRING
void ncnn_set_vulkan_device(ncnn_net_t net, int device_index)
{
return ((Net*)net->pthis)->set_vulkan_device(device_index);
#if NCNN_VULKAN
((Net*)net->pthis)->set_vulkan_device(device_index);
#else
(void)device_index;
#endif
}
int ncnn_net_load_param(ncnn_net_t net, const char* path)
{
Expand Down

0 comments on commit ae2f9f0

Please sign in to comment.