(untested.._) caching of samples in shared memory for cuda