#pragma once #include "population.h" #include "propagation.h" #include namespace pattern { template class NONE { private: Cuboid _cuboid; T* _base; T* _f[population::q]; public: using value_t = T; NONE(Cuboid cuboid): _cuboid(cuboid) { const std::size_t pagesize = sysconf(_SC_PAGESIZE); const std::size_t padding = _cuboid.index(1,1,1); _base = static_cast( std::aligned_alloc(pagesize, population::q * (_cuboid.volume() + 2*padding) * sizeof(T))); for (unsigned iPop=0; iPop < population::q; ++iPop) { _f[iPop] = _base + iPop * (_cuboid.volume() + 2*padding) + padding; } } ~NONE() { delete [] _base; } T* get(unsigned iPop, stage::pre_collision) { return _f[iPop]; } T* get(unsigned iPop, stage::post_collision) { return _f[iPop]; } void stream() { } }; }