mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-10 22:20:45 +01:00
FOrmatting
This commit is contained in:
parent
7f6bffe5ad
commit
5e48b701ec
@ -1,4 +1,4 @@
|
||||
/*************************************************************************************
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
@ -24,8 +24,8 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/GridCore.h>
|
||||
#include <algorithm>
|
||||
|
||||
@ -138,9 +138,9 @@ void LebesgueOrder::IterateI(int ND,
|
||||
} else {
|
||||
for(int d=0;d<ND;d++){
|
||||
x[d]=xi[d]+xo[d];
|
||||
// std::cout << x[d]<<" ";
|
||||
// std::cout << x[d]<<" ";
|
||||
}
|
||||
// std::cout << "\n";
|
||||
// std::cout << "\n";
|
||||
IndexInteger index;
|
||||
Lexicographic::IndexFromCoor(x,index,grid->_rdimensions);
|
||||
_LebesgueReorder.push_back(index);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*************************************************************************************
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
@ -24,8 +24,8 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#ifndef GRID_LEBESGUE_H
|
||||
#define GRID_LEBESGUE_H
|
||||
|
||||
@ -34,15 +34,15 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
||||
// Lebesgue, Morton, Z-graph ordering assistance
|
||||
NAMESPACE_BEGIN(Grid);
|
||||
|
||||
class LebesgueOrder {
|
||||
public:
|
||||
class LebesgueOrder {
|
||||
public:
|
||||
|
||||
typedef int32_t IndexInteger;
|
||||
|
||||
static int UseLebesgueOrder;
|
||||
GridBase *grid;
|
||||
|
||||
public:
|
||||
public:
|
||||
LebesgueOrder(GridBase *_grid);
|
||||
|
||||
inline IndexInteger Reorder(IndexInteger ss) {
|
||||
@ -72,10 +72,10 @@ NAMESPACE_BEGIN(Grid);
|
||||
|
||||
void ThreadInterleave(void);
|
||||
|
||||
private:
|
||||
private:
|
||||
std::vector<IndexInteger> _LebesgueReorder;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
NAMESPACE_END(Grid);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*************************************************************************************
|
||||
/*************************************************************************************
|
||||
|
||||
Grid physics library, www.github.com/paboyle/Grid
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/GridCore.h>
|
||||
|
||||
NAMESPACE_BEGIN(Grid);
|
||||
|
@ -23,30 +23,30 @@
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
See the full license in the file "LICENSE" in the top level distribution directory
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#ifndef GRID_STENCIL_H
|
||||
#define GRID_STENCIL_H
|
||||
|
||||
#include <Grid/stencil/SimpleCompressor.h> // subdir aggregate
|
||||
#include <Grid/stencil/Lebesgue.h> // subdir aggregate
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Must not lose sight that goal is to be able to construct really efficient
|
||||
// gather to a point stencil code. CSHIFT is not the best way, so need
|
||||
// additional stencil support.
|
||||
//
|
||||
// Stencil based code will exchange haloes and use a table lookup for neighbours.
|
||||
// This will be done with generality to allow easier efficient implementations.
|
||||
// Overlap of comms and compute is enabled by tabulating off-node connected,
|
||||
//
|
||||
// Generic services
|
||||
// 0) Prebuild neighbour tables
|
||||
// 1) Compute sizes of all haloes/comms buffers; allocate them.
|
||||
// 2) Gather all faces, and communicate.
|
||||
// 3) Loop over result sites, giving nbr index/offnode info for each
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Must not lose sight that goal is to be able to construct really efficient
|
||||
// gather to a point stencil code. CSHIFT is not the best way, so need
|
||||
// additional stencil support.
|
||||
//
|
||||
// Stencil based code will exchange haloes and use a table lookup for neighbours.
|
||||
// This will be done with generality to allow easier efficient implementations.
|
||||
// Overlap of comms and compute is enabled by tabulating off-node connected,
|
||||
//
|
||||
// Generic services
|
||||
// 0) Prebuild neighbour tables
|
||||
// 1) Compute sizes of all haloes/comms buffers; allocate them.
|
||||
// 2) Gather all faces, and communicate.
|
||||
// 3) Loop over result sites, giving nbr index/offnode info for each
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NAMESPACE_BEGIN(Grid);
|
||||
|
||||
@ -89,21 +89,21 @@ void Gather_plane_exchange_table(std::vector<std::pair<int,int> >& table,const L
|
||||
}
|
||||
}
|
||||
|
||||
struct StencilEntry {
|
||||
struct StencilEntry {
|
||||
uint64_t _offset;
|
||||
uint64_t _byte_offset;
|
||||
uint16_t _is_local;
|
||||
uint16_t _permute;
|
||||
uint16_t _around_the_world; //256 bits, 32 bytes, 1/2 cacheline
|
||||
uint16_t _pad;
|
||||
};
|
||||
};
|
||||
|
||||
////////////////////////////////////////
|
||||
// The Stencil Class itself
|
||||
////////////////////////////////////////
|
||||
template<class vobj,class cobj>
|
||||
class CartesianStencil { // Stencil runs along coordinate axes only; NO diagonal fill in.
|
||||
public:
|
||||
public:
|
||||
|
||||
typedef typename cobj::vector_type vector_type;
|
||||
typedef typename cobj::scalar_type scalar_type;
|
||||
|
Loading…
x
Reference in New Issue
Block a user