Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
thrustcache.h
1#pragma once
2#include <cstddef>
3
4namespace tinker {
13{
14public:
15 using value_type = char;
17 value_type* allocate(ptrdiff_t);
18 void deallocate(value_type*, size_t);
19 void clear();
20
22 static void allocate();
23 static void deallocate();
24
25private:
26 value_type* ptr;
27 size_t nbytes;
28};
29}
void deallocate(value_type *, size_t)
Does not do anything.
static ThrustCache & instance()
Returns the reference to the singleton object.
void clear()
Deallocates the memory.
char value_type
Definition: thrustcache.h:15
value_type * allocate(ptrdiff_t)
Expands and returns the allocated memory upon request.
static void allocate()
Allocates the memory managed by the singleton object.
static void deallocate()
Deallocates the memory managed by the singleton object.
Device memory cache (allocator) for the Thrust Library.
Definition: thrustcache.h:13
Definition: testrt.h:9