initial commit
This commit is contained in:
11
examples/cpu_cache.cpp
Normal file
11
examples/cpu_cache.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "perfect/cpu_cache.hpp"
|
||||
|
||||
int main(void) {
|
||||
int *a = new int[1024];
|
||||
flush_all(a, 1024 * sizeof(int));
|
||||
|
||||
// do things with `a` flushed from cache into main memory
|
||||
// furthermore, all loads and stores before this function call are guaranteed to be complete
|
||||
|
||||
delete[] a;
|
||||
}
|
Reference in New Issue
Block a user