|
SpECTRE
2021.08.02
|
#include <CachedTempBuffer.hpp>
Public Types | |
| using | tags_list = tmpl::list< Tags... > |
Public Member Functions | |
| CachedTempBuffer (const size_t size, Computer computer) noexcept | |
Construct the buffer with the given computer. size is passed to the underlying TempBuffer constructor. | |
| template<typename Tag > | |
| const Tag::type & | get_var (Tag) noexcept |
| Obtain a value from the buffer, computing it if necessary. | |
A temporary buffer with contents computed on demand.
When an entry in the buffer is first requested, it is computed by the Computer class. Subsequent requests just return the cached value. The computer can itself request data from the cache to use in its computations.
For the cache
the function used to compute Tags::Scalar2<DataType> is