diff --git a/src/include/falconn/core/prefetchers.h b/src/include/falconn/core/prefetchers.h index 24daeeae..b8669050 100644 --- a/src/include/falconn/core/prefetchers.h +++ b/src/include/falconn/core/prefetchers.h @@ -33,7 +33,9 @@ class StdVectorPrefetcher< void prefetch(const std::vector& points, int_fast64_t prefetch_index) { +#ifndef _MSC_VER __builtin_prefetch((points[prefetch_index]).data(), 0, 1); +#endif } }; @@ -47,14 +49,20 @@ class StdVectorPrefetcher>> { void prefetch(const std::vector& points, int_fast64_t prefetch_index) { +#ifndef _MSC_VER __builtin_prefetch((points[prefetch_index]).data(), 0, 1); +#endif } }; template class PlainArrayPrefetcher { public: +#ifndef _MSC_VER void prefetch(const T* p) { __builtin_prefetch(p, 0, 1); } +#else + void prefetch(const T* p) { ; } +#endif }; } // namespace core