mirror of
https://github.com/paboyle/Grid.git
synced 2025-12-22 13:44:29 +00:00
Compare commits
5 Commits
specflow
...
bb317aba8d
| Author | SHA1 | Date | |
|---|---|---|---|
| bb317aba8d | |||
| 644cc6647e | |||
| 72397ce23b | |||
|
|
d60a80c098 | ||
|
|
bb8b6d9d73 |
@@ -122,10 +122,10 @@ void GlobalSharedMemory::SharedMemoryZero(void *dest,size_t bytes)
|
|||||||
{
|
{
|
||||||
acceleratorMemSet(dest,0,bytes);
|
acceleratorMemSet(dest,0,bytes);
|
||||||
}
|
}
|
||||||
void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes)
|
//void GlobalSharedMemory::SharedMemoryCopy(void *dest,void *src,size_t bytes)
|
||||||
{
|
//{
|
||||||
acceleratorCopyToDevice(src,dest,bytes);
|
// acceleratorCopyToDevice(src,dest,bytes);
|
||||||
}
|
//}
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
// Global shared functionality finished
|
// Global shared functionality finished
|
||||||
// Now move to per communicator functionality
|
// Now move to per communicator functionality
|
||||||
|
|||||||
9167
Grid/json/json.hpp
9167
Grid/json/json.hpp
File diff suppressed because it is too large
Load Diff
@@ -236,7 +236,7 @@ public:
|
|||||||
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
|
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
|
||||||
vobj vtmp;
|
vobj vtmp;
|
||||||
vtmp = r;
|
vtmp = r;
|
||||||
#if 0
|
#if 1
|
||||||
deviceVector<vobj> vvtmp(1);
|
deviceVector<vobj> vvtmp(1);
|
||||||
acceleratorPut(vvtmp[0],vtmp);
|
acceleratorPut(vvtmp[0],vtmp);
|
||||||
vobj *vvtmp_p = & vvtmp[0];
|
vobj *vvtmp_p = & vvtmp[0];
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ inline void acceleratorCopyToDevice(const void *from,void *to,size_t bytes) { c
|
|||||||
inline void acceleratorCopyFromDevice(const void *from,void *to,size_t bytes){ cudaMemcpy(to,from,bytes, cudaMemcpyDeviceToHost);}
|
inline void acceleratorCopyFromDevice(const void *from,void *to,size_t bytes){ cudaMemcpy(to,from,bytes, cudaMemcpyDeviceToHost);}
|
||||||
inline void acceleratorMemSet(void *base,int value,size_t bytes) { cudaMemset(base,value,bytes);}
|
inline void acceleratorMemSet(void *base,int value,size_t bytes) { cudaMemset(base,value,bytes);}
|
||||||
inline acceleratorEvent_t acceleratorCopyToDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) {
|
inline acceleratorEvent_t acceleratorCopyToDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) {
|
||||||
acceleratorCopyToDevice(to,from,bytes, cudaMemcpyHostToDevice);
|
acceleratorCopyToDevice(from,to,bytes);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
inline acceleratorEvent_t acceleratorCopyFromDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) {
|
inline acceleratorEvent_t acceleratorCopyFromDeviceAsynch(void *from, void *to, size_t bytes, cudaStream_t stream = copyStream) {
|
||||||
@@ -337,7 +337,7 @@ accelerator_inline int acceleratorSIMTlane(int Nsimd) {
|
|||||||
cgh.parallel_for( \
|
cgh.parallel_for( \
|
||||||
sycl::nd_range<3>(global,local), \
|
sycl::nd_range<3>(global,local), \
|
||||||
[=] (sycl::nd_item<3> item) /*mutable*/ \
|
[=] (sycl::nd_item<3> item) /*mutable*/ \
|
||||||
[[intel::reqd_sub_group_size(16)]] \
|
[[sycl::reqd_sub_group_size(16)]] \
|
||||||
{ \
|
{ \
|
||||||
auto iter1 = item.get_global_id(0); \
|
auto iter1 = item.get_global_id(0); \
|
||||||
auto iter2 = item.get_global_id(1); \
|
auto iter2 = item.get_global_id(1); \
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ CXX=mpicxx ../../configure \
|
|||||||
--enable-unified=yes \
|
--enable-unified=yes \
|
||||||
--prefix /Users/peterboyle/QCD/vtk/Grid/install \
|
--prefix /Users/peterboyle/QCD/vtk/Grid/install \
|
||||||
--with-lime=$CLIME \
|
--with-lime=$CLIME \
|
||||||
--with-hdf5=$HDF5 \
|
|
||||||
--with-fftw=$FFTW \
|
|
||||||
--with-openssl=$OPENSSL \
|
--with-openssl=$OPENSSL \
|
||||||
--with-gmp=$GMP \
|
--with-gmp=$GMP \
|
||||||
--with-mpfr=$MPFR \
|
--with-mpfr=$MPFR \
|
||||||
|
|||||||
@@ -48,15 +48,14 @@ typedef vtkMarchingCubes isosurface;
|
|||||||
|
|
||||||
int mpeg = 0 ;
|
int mpeg = 0 ;
|
||||||
int xlate = 0 ;
|
int xlate = 0 ;
|
||||||
|
int framerate = 10;
|
||||||
|
|
||||||
template <class T> void readFile(T& out, std::string const fname){
|
template <class T> void readFile(T& out, std::string const fname){
|
||||||
#ifdef HAVE_LIME
|
|
||||||
Grid::emptyUserRecord record;
|
Grid::emptyUserRecord record;
|
||||||
Grid::ScidacReader RD;
|
Grid::ScidacReader RD;
|
||||||
RD.open(fname);
|
RD.open(fname);
|
||||||
RD.readScidacFieldRecord(out,record);
|
RD.readScidacFieldRecord(out,record);
|
||||||
RD.close();
|
RD.close();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
using namespace Grid;
|
using namespace Grid;
|
||||||
|
|
||||||
@@ -208,6 +207,10 @@ int main(int argc, char* argv[])
|
|||||||
xlate = 1;
|
xlate = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( GridCmdOptionExists(argv,argv+argc,"--fps") ){
|
||||||
|
arg=GridCmdOptionPayload(argv,argv+argc,"--fps");
|
||||||
|
GridCmdOptionInt(arg,framerate);
|
||||||
|
}
|
||||||
if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){
|
if( GridCmdOptionExists(argv,argv+argc,"--isosurface") ){
|
||||||
arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface");
|
arg=GridCmdOptionPayload(argv,argv+argc,"--isosurface");
|
||||||
GridCmdOptionFloat(arg,default_contour);
|
GridCmdOptionFloat(arg,default_contour);
|
||||||
@@ -420,7 +423,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New();
|
vtkFFMPEGWriter *writer = vtkFFMPEGWriter::New();
|
||||||
writer->SetFileName("movie.avi");
|
writer->SetFileName("movie.avi");
|
||||||
writer->SetRate(1);
|
writer->SetRate(framerate);
|
||||||
writer->SetInputConnection(imageFilter->GetOutputPort());
|
writer->SetInputConnection(imageFilter->GetOutputPort());
|
||||||
writer->Start();
|
writer->Start();
|
||||||
|
|
||||||
@@ -477,7 +480,7 @@ int main(int argc, char* argv[])
|
|||||||
slidercallback->fu_list = fu_list;
|
slidercallback->fu_list = fu_list;
|
||||||
sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback);
|
sliderWidget->AddObserver(vtkCommand::InteractionEvent, slidercallback);
|
||||||
|
|
||||||
int timerId = iren->CreateRepeatingTimer(300);
|
int timerId = iren->CreateRepeatingTimer(1000/framerate);
|
||||||
std::cout << "timerId: " << timerId << std::endl;
|
std::cout << "timerId: " << timerId << std::endl;
|
||||||
|
|
||||||
// Start the interaction and timer
|
// Start the interaction and timer
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ libs=`grid-config --libs`
|
|||||||
ldflags=`grid-config --ldflags`
|
ldflags=`grid-config --ldflags`
|
||||||
cxxflags=`grid-config --cxxflags`
|
cxxflags=`grid-config --cxxflags`
|
||||||
cxx=`grid-config --cxx`
|
cxx=`grid-config --cxx`
|
||||||
|
cc=clang
|
||||||
|
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
|
|
||||||
LDFLAGS="$ldflags $libs " cmake .. -DCMAKE_CXX_COMPILER=$cxx -DCMAKE_CXX_FLAGS=$cxxflags
|
LDFLAGS="$ldflags $libs " cmake .. -DCMAKE_C_COMPILER=$cc -DCMAKE_CXX_COMPILER=$cxx -DCMAKE_CXX_FLAGS=$cxxflags
|
||||||
|
|||||||
Reference in New Issue
Block a user