3 ms·
Not exactly what you're asking, since C/C++ doesn't expose this functionality, but ISPC (a C-derived language that exposes a CUDA-like SPMD model over the vecto
by daniel-thompson 4y ago
Not exactly what you're asking, since C/C++ doesn't expose this functionality, but ISPC (a C-derived language that exposes a CUDA-like SPMD model over the vector lanes in your CPU) has some standard library functions to prefetch data into L1 cache; see https://ispc.github.io/ispc.html#prefetches https://ispc.github.io/ispc.html#prefetches for more details. If you're worried about this in your application, you may find it useful to investigate writing your compute kernel in ISPC (it uses C linkage and can be called from C code with no overhead).