Files
perfect/examples/cpu_cache.cpp
2019-09-19 16:56:57 -05:00

14 lines
326 B
C++

#include "perfect/cpu_cache.hpp"
int main(void) {
using namespace perfect;
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;
}