mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
Merge pull request #404 from rrhodgson/feature/json_nvcc
Feature/json nvcc
This commit is contained in:
commit
a9c2e1df03
24165
Grid/json/json.hpp
24165
Grid/json/json.hpp
File diff suppressed because it is too large
Load Diff
@ -26,7 +26,7 @@
|
||||
*************************************************************************************/
|
||||
/* END LEGAL */
|
||||
#include <Grid/Grid.h>
|
||||
#if (!defined(GRID_CUDA)) && (!defined(GRID_HIP))
|
||||
#ifndef GRID_HIP
|
||||
|
||||
NAMESPACE_BEGIN(Grid);
|
||||
|
||||
@ -82,7 +82,7 @@ void JSONWriter::writeDefault(const std::string &s, const std::string &x)
|
||||
if (s.size())
|
||||
ss_ << "\""<< s << "\" : \"" << os.str() << "\" ," ;
|
||||
else
|
||||
ss_ << os.str() << " ," ;
|
||||
ss_ << "\""<< os.str() << "\" ," ;
|
||||
}
|
||||
|
||||
// Reader implementation ///////////////////////////////////////////////////////
|
||||
|
@ -54,7 +54,7 @@ namespace Grid
|
||||
void pop(void);
|
||||
template <typename U>
|
||||
void writeDefault(const std::string &s, const U &x);
|
||||
#ifdef __NVCC__
|
||||
#if defined(GRID_CUDA) || defined(GRID_HIP)
|
||||
void writeDefault(const std::string &s, const Grid::ComplexD &x)
|
||||
{
|
||||
std::complex<double> z(real(x),imag(x));
|
||||
@ -101,7 +101,7 @@ namespace Grid
|
||||
void readDefault(const std::string &s, std::vector<U> &output);
|
||||
template <typename U, typename P>
|
||||
void readDefault(const std::string &s, std::pair<U,P> &output);
|
||||
#ifdef __NVCC__
|
||||
#if defined(GRID_CUDA) || defined(GRID_HIP)
|
||||
void readDefault(const std::string &s, ComplexD &output)
|
||||
{
|
||||
std::complex<double> z;
|
||||
|
@ -36,7 +36,7 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
||||
#include "BinaryIO.h"
|
||||
#include "TextIO.h"
|
||||
#include "XmlIO.h"
|
||||
#if (!defined(GRID_CUDA)) && (!defined(GRID_HIP))
|
||||
#ifndef GRID_HIP
|
||||
#include "JSON_IO.h"
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user