 // during algorithms such as thrust::sort. The idea will be to create a simple
 // cache of allocations to search when temporary storage is requested. If a hit
 // is found in the cache, we quickly return the cached allocation instead of
-// resorting to the more expensive thrust::device_malloc.
+// resorting to the more expensive thrust::system::cuda::malloc.
 //
 // Note: this implementation cached_allocator is not thread-safe. If multiple
 // (host) threads use the same cached_allocator then they should gain exclusive

cached_allocator g_allocator;


// create a tag derived from device_system_tag for distinguishing
// our overloads of get_temporary_buffer and return_temporary_buffer
struct my_tag : thrust::device_system_tag {};


// overload get_temporary_buffer on my_tag

#include <thrust/system/cuda/vector.h>
#include <thrust/host_vector.h>
#include <thrust/generate.h>
#include <thrust/sort.h>
#include <thrust/pair.h>
