1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 09:15:38 +01:00

Use either sub-blocking or lebesgue

This commit is contained in:
paboyle 2015-11-04 03:18:51 -08:00
parent 63a2993827
commit 1a8bf938b3

View File

@ -9,17 +9,37 @@ namespace Grid {
class LebesgueOrder {
public:
typedef int32_t IndexInteger;
static int UseLebesgueOrder;
GridBase *grid;
typedef uint32_t IndexInteger;
public:
LebesgueOrder(GridBase *_grid);
inline IndexInteger Reorder(IndexInteger ss) {
return UseLebesgueOrder ? _LebesgueReorder[ss] : ss;
return _LebesgueReorder[ss] ;
};
////////////////////////////
// Space filling fractal for cache oblivious
////////////////////////////
void ZGraph(void);
IndexInteger alignup(IndexInteger n);
LebesgueOrder(GridBase *grid);
/////////////////////////////////
// Cartesian stencil blocking strategy
/////////////////////////////////
static std::vector<int> Block;
void CartesianBlocking(void);
void IterateO(int ND,int dim,
std::vector<IndexInteger> & xo,
std::vector<IndexInteger> & xi,
std::vector<IndexInteger> &dims);
void IterateI(int ND,int dim,
std::vector<IndexInteger> & xo,
std::vector<IndexInteger> & xi,
std::vector<IndexInteger> &dims);
private:
std::vector<IndexInteger> _LebesgueReorder;