nmslib / hnswlib

Header-only C++/python library for fast approximate nearest neighbors
https://github.com/nmslib/hnswlib
Apache License 2.0
4.12k stars 609 forks source link

load successed on arm64-v8a,but faild on armeabi-v7a,why? #516

Closed WellWang-S closed 8 months ago

WellWang-S commented 8 months ago

abort_message: assertion “terminating with uncaught exception of type std::runtime_error: Index seems be corrupted or unsupported" failed

yurymalkov commented 8 months ago

Hi @WellWang-S ,

I think the main reason is that armeabi-v7a is 32-bit, so size_t is 4 bytes instead of the 8. I guess that can be hacked by changing the the types from size_t to long long or something in https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswalg.h#L22C7-L53

WellWang-S commented 8 months ago

Hi @WellWang-S ,

I think the main reason is that armeabi-v7a is 32-bit, so size_t is 4 bytes instead of the 8. I guess that can be hacked by changing the the types from size_t to long long or something in https://github.com/nmslib/hnswlib/blob/master/hnswlib/hnswalg.h#L22C7-L53

thanks