From 3a4e397e727b571f6cdde8f3ce17a0a734411869 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 1 Jan 2019 15:04:33 +0000 Subject: [PATCH] Deprecating JSON, too hard to support under NVCC --- Grid/serialisation/JSON_IO.cc | 2 ++ Grid/serialisation/Serialisation.h | 2 +- Grid/serialisation/TextIO.h | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Grid/serialisation/JSON_IO.cc b/Grid/serialisation/JSON_IO.cc index 2ca6a499..aca8bab3 100644 --- a/Grid/serialisation/JSON_IO.cc +++ b/Grid/serialisation/JSON_IO.cc @@ -26,6 +26,7 @@ *************************************************************************************/ /* END LEGAL */ #include +#ifndef __NVCC__ NAMESPACE_BEGIN(Grid); @@ -168,3 +169,4 @@ void JSONReader::readDefault(const std::string &s, std::string &output) } } NAMESPACE_END(Grid); +#endif diff --git a/Grid/serialisation/Serialisation.h b/Grid/serialisation/Serialisation.h index b2dceb1b..e601963a 100644 --- a/Grid/serialisation/Serialisation.h +++ b/Grid/serialisation/Serialisation.h @@ -36,7 +36,7 @@ Author: Peter Boyle #include "BinaryIO.h" #include "TextIO.h" #include "XmlIO.h" -#include "JSON_IO.h" +//#include "JSON_IO.h" #ifdef HAVE_HDF5 #include "Hdf5IO.h" diff --git a/Grid/serialisation/TextIO.h b/Grid/serialisation/TextIO.h index ada1aaf6..bf6e9135 100644 --- a/Grid/serialisation/TextIO.h +++ b/Grid/serialisation/TextIO.h @@ -97,6 +97,9 @@ namespace Grid } // Reader template implementation //////////////////////////////////////////// + template <> + void TextReader::readDefault(const std::string &s, std::string &output); + template void TextReader::readDefault(const std::string &s, U &output) { @@ -106,9 +109,6 @@ namespace Grid fromString(output, buf); } - template <> - void TextReader::readDefault(const std::string &s, std::string &output); - template void TextReader::readDefault(const std::string &s, std::vector &output) { @@ -121,6 +121,9 @@ namespace Grid read("", output[i]); } } + + + } #endif