File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -415,14 +415,14 @@ void start_logger(const std::string& fname) { Logger::start(fname); }
415415
416416#ifdef NO_PREFETCH
417417
418- void prefetch (void *) {}
418+ void prefetch (const void *) {}
419419
420420#else
421421
422- void prefetch (void * addr) {
422+ void prefetch (const void * addr) {
423423
424424 #if defined(_MSC_VER)
425- _mm_prefetch ((char *) addr, _MM_HINT_T0);
425+ _mm_prefetch ((char const *) addr, _MM_HINT_T0);
426426 #else
427427 __builtin_prefetch (addr);
428428 #endif
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ std::string compiler_info();
4040// Preloads the given address in L1/L2 cache. This is a non-blocking
4141// function that doesn't stall the CPU waiting for data to be loaded from memory,
4242// which can be quite slow.
43- void prefetch (void * addr);
43+ void prefetch (const void * addr);
4444
4545void start_logger (const std::string& fname);
4646void * std_aligned_alloc (size_t alignment, size_t size);
You can’t perform that action at this time.
0 commit comments