Commit 1e0015b3 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files
parents 6a705e50 1ded5c55
...@@ -63,8 +63,8 @@ typedef size_t aligned_size_t; ...@@ -63,8 +63,8 @@ typedef size_t aligned_size_t;
// C++11 features // C++11 features
// -------------- // --------------
#ifndef HAS_CXX11 #ifndef AMDIS_HAS_CXX11
#define HAS_CXX11 0 #define AMDIS_HAS_CXX11 0
#endif #endif
#ifndef HAS_VARIADIC_TEMPLATES #ifndef HAS_VARIADIC_TEMPLATES
......
...@@ -47,7 +47,7 @@ typedef size_t aligned_size_t __attribute__ ((aligned(CACHE_LINE))); ...@@ -47,7 +47,7 @@ typedef size_t aligned_size_t __attribute__ ((aligned(CACHE_LINE)));
// C++11 features // C++11 features
// -------------- // --------------
#if HAS_CXX11 #if AMDIS_HAS_CXX11
#if GCC_VERSION >= 40300 && !defined(HAS_VARIADIC_TEMPLATES) #if GCC_VERSION >= 40300 && !defined(HAS_VARIADIC_TEMPLATES)
#define HAS_VARIADIC_TEMPLATES 1 #define HAS_VARIADIC_TEMPLATES 1
......
...@@ -51,7 +51,7 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t; ...@@ -51,7 +51,7 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
// C++11 features // C++11 features
// -------------- // --------------
#if HAS_CXX11 #if AMDIS_HAS_CXX11
#if INTEL_VERSION >= 1201 && !defined(HAS_VARIADIC_TEMPLATES) #if INTEL_VERSION >= 1201 && !defined(HAS_VARIADIC_TEMPLATES)
#define HAS_VARIADIC_TEMPLATES 1 #define HAS_VARIADIC_TEMPLATES 1
......
...@@ -52,6 +52,19 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t; ...@@ -52,6 +52,19 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
#define ALWAYS_INLINE __forceinline #define ALWAYS_INLINE __forceinline
#define OPENMODE std::ios::open_mode #define OPENMODE std::ios::open_mode
#ifdef max
#undef max
#undef min
#endif
#ifdef NONE
#undef NONE
#endif
#ifdef THIS
#undef THIS
#endif
#if MSC_VERSION >= 1800 && !defined(HAS_VARIADIC_TEMPLATES) #if MSC_VERSION >= 1800 && !defined(HAS_VARIADIC_TEMPLATES)
#define HAS_VARIADIC_TEMPLATES 1 #define HAS_VARIADIC_TEMPLATES 1
#endif #endif
......
...@@ -233,7 +233,7 @@ namespace AMDiS ...@@ -233,7 +233,7 @@ namespace AMDiS
if (writeParaViewVectorFormat) { if (writeParaViewVectorFormat) {
io::VtkVectorWriter::Aux<T> vtkVectorWriter(&dataCollectors, writeAs3dVector); io::VtkVectorWriter::Aux<T> vtkVectorWriter(&dataCollectors, writeAs3dVector);
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
vtkVectorWriter.setCompression(compression); vtkVectorWriter.setCompression(compression);
#endif #endif
vtkVectorWriter.writeFile(fn + paraviewFileExt); vtkVectorWriter.writeFile(fn + paraviewFileExt);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp> #include <boost/iostreams/copy.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include <boost/iostreams/filter/zlib.hpp> #include <boost/iostreams/filter/zlib.hpp>
#endif #endif
...@@ -242,12 +242,12 @@ namespace AMDiS { namespace io { ...@@ -242,12 +242,12 @@ namespace AMDiS { namespace io {
if(minor >= 1) if(minor >= 1)
file.read(const_cast<char*>(cps.data()), 4); file.read(const_cast<char*>(cps.data()), 4);
#ifdef HAVE_COMPRESSION #if HAMDIS_HAS_COMPRESSION
TEST_EXIT(cps == "null" || cps == "zlib") TEST_EXIT(cps == "null" || cps == "zlib")
("Cannot read Arh2 file. Currently only support zlib compression.\n"); ("Cannot read Arh2 file. Currently only support zlib compression.\n");
#else #else
TEST_EXIT(cps == "null") TEST_EXIT(cps == "null")
("HAVE_COMPRESSION OFF. Cannot read compressed Arh2 file.\n"); ("AMDIS_HAS_COMPRESSION==OFF. Cannot read compressed Arh2 file.\n");
#endif #endif
TEST_EXIT(dow == (unsigned)mesh->getGeo(WORLD)) TEST_EXIT(dow == (unsigned)mesh->getGeo(WORLD))
...@@ -371,7 +371,7 @@ namespace AMDiS { namespace io { ...@@ -371,7 +371,7 @@ namespace AMDiS { namespace io {
file.read(buffer, size); file.read(buffer, size);
dataStream.write(buffer, size); dataStream.write(buffer, size);
delete[] buffer; delete[] buffer;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
if(cps == "zlib") { if(cps == "zlib") {
stringstream tmp(ios::out | ios::in); stringstream tmp(ios::out | ios::in);
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
...@@ -554,12 +554,12 @@ namespace AMDiS { namespace io { ...@@ -554,12 +554,12 @@ namespace AMDiS { namespace io {
if(minor > 0) if(minor > 0)
file.read(const_cast<char*>(cps.data()), 4); file.read(const_cast<char*>(cps.data()), 4);
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
TEST_EXIT(cps == "null" || cps == "zlib") TEST_EXIT(cps == "null" || cps == "zlib")
("Cannot read Arh2 file. Currently only support zlib compression.\n"); ("Cannot read Arh2 file. Currently only support zlib compression.\n");
#else #else
TEST_EXIT(cps == "null") TEST_EXIT(cps == "null")
("HAVE_COMPRESSION OFF. Cannot read compressed Arh2 file.\n"); ("AMDIS_HAS_COMPRESSION OFF. Cannot read compressed Arh2 file.\n");
#endif #endif
vector<int> macroElIndex(nMacroElements); vector<int> macroElIndex(nMacroElements);
...@@ -600,7 +600,7 @@ namespace AMDiS { namespace io { ...@@ -600,7 +600,7 @@ namespace AMDiS { namespace io {
dataStream.write(buffer, size); dataStream.write(buffer, size);
delete[] buffer; delete[] buffer;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
if(cps == "zlib") { if(cps == "zlib") {
stringstream tmp(ios::out | ios::in); stringstream tmp(ios::out | ios::in);
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp> #include <boost/iostreams/copy.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include <boost/iostreams/filter/zlib.hpp> #include <boost/iostreams/filter/zlib.hpp>
#endif #endif
...@@ -151,7 +151,7 @@ namespace AMDiS { namespace io { ...@@ -151,7 +151,7 @@ namespace AMDiS { namespace io {
namesLen + //value vector table namesLen + //value vector table
nValueVectors * 8; //also value vector table nValueVectors * 8; //also value vector table
string typeId = "arh2", cps("null"); string typeId = "arh2", cps("null");
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
cps = "zlib"; cps = "zlib";
#endif #endif
uint8_t *major = const_cast<uint8_t*>(&(AMDiS::io::Arh2Writer::MAJOR)); uint8_t *major = const_cast<uint8_t*>(&(AMDiS::io::Arh2Writer::MAJOR));
...@@ -426,7 +426,7 @@ namespace AMDiS { namespace io { ...@@ -426,7 +426,7 @@ namespace AMDiS { namespace io {
} }
stringstream tmp(ios::out | ios::in | ios::binary); stringstream tmp(ios::out | ios::in | ios::binary);
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
in.push(boost::iostreams::zlib_compressor()); in.push(boost::iostreams::zlib_compressor());
#endif #endif
in.push(dataStream); in.push(dataStream);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp> #include <boost/iostreams/copy.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include <boost/iostreams/filter/zlib.hpp> #include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filter/bzip2.hpp> #include <boost/iostreams/filter/bzip2.hpp>
#endif #endif
...@@ -251,14 +251,14 @@ namespace AMDiS { namespace io { ...@@ -251,14 +251,14 @@ namespace AMDiS { namespace io {
file.read(reinterpret_cast<char*>(&cpsflag), 4); file.read(reinterpret_cast<char*>(&cpsflag), 4);
cps = static_cast<Cpsformat::Value>(cpsflag); cps = static_cast<Cpsformat::Value>(cpsflag);
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
TEST_EXIT(cps == Cpsformat::ZLIB || TEST_EXIT(cps == Cpsformat::ZLIB ||
cps == Cpsformat::BZIP2 || cps == Cpsformat::BZIP2 ||
cps == Cpsformat::NONE) cps == Cpsformat::NONE)
("Cannot read Arh3 file. Currently only support zlib and bzip2 compression.\n"); ("Cannot read Arh3 file. Currently only support zlib and bzip2 compression.\n");
#else #else
TEST_EXIT(cps == Cpsformat::NONE) TEST_EXIT(cps == Cpsformat::NONE)
("HAVE_COMPRESSION OFF. Cannot read compressed Arh3 file.\n"); ("AMDIS_HAS_COMPRESSION OFF. Cannot read compressed Arh3 file.\n");
#endif #endif
TEST_EXIT(dow == (unsigned)mesh->getGeo(WORLD)) TEST_EXIT(dow == (unsigned)mesh->getGeo(WORLD))
...@@ -421,7 +421,7 @@ namespace AMDiS { namespace io { ...@@ -421,7 +421,7 @@ namespace AMDiS { namespace io {
file.read(buffer, size); file.read(buffer, size);
dataStream.write(buffer, size); dataStream.write(buffer, size);
delete[] buffer; delete[] buffer;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
stringstream tmp(ios::out | ios::in); stringstream tmp(ios::out | ios::in);
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
switch(cps) switch(cps)
...@@ -649,14 +649,14 @@ namespace AMDiS { namespace io { ...@@ -649,14 +649,14 @@ namespace AMDiS { namespace io {
file.read(reinterpret_cast<char*>(&cpsflag), 4); file.read(reinterpret_cast<char*>(&cpsflag), 4);
cps = static_cast<Cpsformat::Value>(cpsflag); cps = static_cast<Cpsformat::Value>(cpsflag);
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
TEST_EXIT(cps == Cpsformat::ZLIB || TEST_EXIT(cps == Cpsformat::ZLIB ||
cps == Cpsformat::BZIP2 || cps == Cpsformat::BZIP2 ||
cps == Cpsformat::NONE) cps == Cpsformat::NONE)
("Cannot read Arh3 file. Currently only support zlib and bzip2 compression.\n"); ("Cannot read Arh3 file. Currently only support zlib and bzip2 compression.\n");
#else #else
TEST_EXIT(cps == Cpsformat::NONE) TEST_EXIT(cps == Cpsformat::NONE)
("HAVE_COMPRESSION OFF. Cannot read compressed Arh3 file.\n"); ("AMDIS_HAS_COMPRESSION OFF. Cannot read compressed Arh3 file.\n");
#endif #endif
vector<int> macroElIndex(nMacroElements); vector<int> macroElIndex(nMacroElements);
...@@ -715,7 +715,7 @@ namespace AMDiS { namespace io { ...@@ -715,7 +715,7 @@ namespace AMDiS { namespace io {
dataStream.write(buffer, size); dataStream.write(buffer, size);
delete[] buffer; delete[] buffer;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
stringstream tmp(ios::out | ios::in); stringstream tmp(ios::out | ios::in);
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
switch(cps) switch(cps)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/device/file_descriptor.hpp> #include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/copy.hpp> #include <boost/iostreams/copy.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include <boost/iostreams/filter/zlib.hpp> #include <boost/iostreams/filter/zlib.hpp>
#include <boost/iostreams/filter/bzip2.hpp> #include <boost/iostreams/filter/bzip2.hpp>
#endif #endif
...@@ -140,7 +140,7 @@ namespace AMDiS { namespace io { ...@@ -140,7 +140,7 @@ namespace AMDiS { namespace io {
macroFilename + ';' + perFilename; macroFilename + ';' + perFilename;
macroFile_nl = macroFile.length(); macroFile_nl = macroFile.length();
} else if (writeMacro == Macroformat::THIS) { } else if (writeMacro == Macroformat::SELF) {
macroFile_nl = 13; macroFile_nl = 13;
readFileToString(macroFilename, macroData); readFileToString(macroFilename, macroData);
...@@ -163,7 +163,7 @@ namespace AMDiS { namespace io { ...@@ -163,7 +163,7 @@ namespace AMDiS { namespace io {
} }
// write macro and periodic file // write macro and periodic file
if (writeMacro == Macroformat::THIS && macroFilename.length()) { if (writeMacro == Macroformat::SELF && macroFilename.length()) {
file.seekp(0, ios_base::end); file.seekp(0, ios_base::end);
long macroPos = file.tellp(), perPos = 0; long macroPos = file.tellp(), perPos = 0;
file.write(macroData.c_str(), macroData.length()); file.write(macroData.c_str(), macroData.length());
...@@ -354,7 +354,7 @@ namespace AMDiS { namespace io { ...@@ -354,7 +354,7 @@ namespace AMDiS { namespace io {
macroFilename + ';' + perFilename; macroFilename + ';' + perFilename;
macroFile_nl = macroFile.length(); macroFile_nl = macroFile.length();
} else if (writeMacro == Macroformat::THIS) { } else if (writeMacro == Macroformat::SELF) {
macroFile_nl = perFilename.length() ? 27 : 13; macroFile_nl = perFilename.length() ? 27 : 13;
macroFile.resize(macroFile_nl, ' '); macroFile.resize(macroFile_nl, ' ');
} }
...@@ -371,7 +371,7 @@ namespace AMDiS { namespace io { ...@@ -371,7 +371,7 @@ namespace AMDiS { namespace io {
4 + //macroFile_nl 4 + //macroFile_nl
macroFile_nl; //macroFile macroFile_nl; //macroFile
string typeId = "sarh"; string typeId = "sarh";
#ifndef HAVE_COMPRESSION #if !AMDIS_HAS_COMPRESSION
cps = Cpsformat::NONE; cps = Cpsformat::NONE;
#endif #endif
uint8_t *major = const_cast<uint8_t*>(&(AMDiS::io::Arh3Reader::MAJOR)); uint8_t *major = const_cast<uint8_t*>(&(AMDiS::io::Arh3Reader::MAJOR));
...@@ -604,7 +604,7 @@ namespace AMDiS { namespace io { ...@@ -604,7 +604,7 @@ namespace AMDiS { namespace io {
//reset the macro positions in file //reset the macro positions in file
setMacrosPos(file, headerLen, macroSize); setMacrosPos(file, headerLen, macroSize);
if (writeMacro == Macroformat::THIS) if (writeMacro == Macroformat::SELF)
setMacroFile(file, headerLen, mesh, writeMacro); setMacroFile(file, headerLen, mesh, writeMacro);
file.close(); file.close();
...@@ -634,8 +634,8 @@ namespace AMDiS { namespace io { ...@@ -634,8 +634,8 @@ namespace AMDiS { namespace io {
{ {
FUNCNAME("setMacroFile()"); FUNCNAME("setMacroFile()");
TEST_EXIT(writeMacro == Macroformat::THIS) TEST_EXIT(writeMacro == Macroformat::SELF)
("This function should only be called under Macroformat::THIS.\n"); ("This function should only be called under Macroformat::SELF.\n");
string macroFilename = "", perFilename = ""; string macroFilename = "", perFilename = "";
string macroData = "", periodicData = ""; string macroData = "", periodicData = "";
...@@ -716,7 +716,7 @@ namespace AMDiS { namespace io { ...@@ -716,7 +716,7 @@ namespace AMDiS { namespace io {
} }
stringstream tmp(ios::out | ios::in | ios::binary); stringstream tmp(ios::out | ios::in | ios::binary);
boost::iostreams::filtering_streambuf<boost::iostreams::input> in; boost::iostreams::filtering_streambuf<boost::iostreams::input> in;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
switch(cps) switch(cps)
{ {
case Cpsformat::ZLIB: case Cpsformat::ZLIB:
......
...@@ -27,7 +27,7 @@ namespace AMDiS { namespace io { ...@@ -27,7 +27,7 @@ namespace AMDiS { namespace io {
typedef enum{ typedef enum{
NONE = 0, // no macro NONE = 0, // no macro
PT_MACROFILE = 1, // pointer to macro file PT_MACROFILE = 1, // pointer to macro file
THIS = 2 // pointer to this file, at the end of this file SELF = 2 // pointer to this file, at the end of this file
} Value; } Value;
}; };
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include <boost/archive/iterators/transform_width.hpp> #include <boost/archive/iterators/transform_width.hpp>
#include <boost/iostreams/filtering_streambuf.hpp> #include <boost/iostreams/filtering_streambuf.hpp>
#include <boost/iostreams/copy.hpp> #include <boost/iostreams/copy.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include <boost/iostreams/filter/zlib.hpp> #include <boost/iostreams/filter/zlib.hpp>
#endif #endif
#include "DOFVector.h" #include "DOFVector.h"
...@@ -95,7 +95,7 @@ namespace AMDiS ...@@ -95,7 +95,7 @@ namespace AMDiS
return result; return result;
} }
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
inline std::string decompress(std::string text) inline std::string decompress(std::string text)
{ {
std::stringstream tmp1, tmp2; std::stringstream tmp1, tmp2;
...@@ -120,7 +120,7 @@ namespace AMDiS ...@@ -120,7 +120,7 @@ namespace AMDiS
string header = "", body = "", data = ""; string header = "", body = "", data = "";
if(zlib) { if(zlib) {
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
string s = input.substr(0, 8); string s = input.substr(0, 8);
if (base64) if (base64)
s = detail::base64ToStr(s); s = detail::base64ToStr(s);
...@@ -151,7 +151,7 @@ namespace AMDiS ...@@ -151,7 +151,7 @@ namespace AMDiS
offset += *ptr; offset += *ptr;
} }
#else #else
ERROR_EXIT("HAVE_COMPRESSION OFF. VtkReader cannot read APPENDED_COMPRESSED vtu files.\n"); ERROR_EXIT("AMDIS_HAS_COMPRESSION OFF. VtkReader cannot read APPENDED_COMPRESSED vtu files.\n");
#endif #endif
} else { } else {
header = (base64) ? detail::base64ToStr(input) : input; header = (base64) ? detail::base64ToStr(input) : input;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "io/DataCollector.h" #include "io/DataCollector.h"
#include "SystemVector.h" #include "SystemVector.h"
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include "io/FileCompression.h" #include "io/FileCompression.h"
#endif #endif
...@@ -43,7 +43,7 @@ namespace AMDiS ...@@ -43,7 +43,7 @@ namespace AMDiS
struct Aux { struct Aux {
Aux(std::vector<DataCollector<S>*> *dc, bool writeAs3dVector_=false) Aux(std::vector<DataCollector<S>*> *dc, bool writeAs3dVector_=false)
: dataCollector(dc) : dataCollector(dc)
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
, compress(NONE) , compress(NONE)
#endif #endif
, writeAs3dVector(writeAs3dVector_) , writeAs3dVector(writeAs3dVector_)
...@@ -61,7 +61,7 @@ namespace AMDiS ...@@ -61,7 +61,7 @@ namespace AMDiS
std::string fnPrefix, std::string fnPostfix); std::string fnPrefix, std::string fnPostfix);
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
/// Set a compressing method for file output. /// Set a compressing method for file output.
void setCompression(FileCompression c) void setCompression(FileCompression c)
{ {
...@@ -154,7 +154,7 @@ namespace AMDiS ...@@ -154,7 +154,7 @@ namespace AMDiS
/// List of DataCollectors, for each component of the problem one. /// List of DataCollectors, for each component of the problem one.
std::vector<DataCollector<S>*> *dataCollector; std::vector<DataCollector<S>*> *dataCollector;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
/** \brief /** \brief
* Defines if the file has to be compressed for ouput, and with which * Defines if the file has to be compressed for ouput, and with which
* kind of compress method. * kind of compress method.
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include <boost/iostreams/device/file_descriptor.hpp> #include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
// #include <boost/iostreams/filter/gzip.hpp> // #include <boost/iostreams/filter/gzip.hpp>
// #include <boost/iostreams/filter/bzip2.hpp> // #include <boost/iostreams/filter/bzip2.hpp>
#endif #endif
...@@ -67,7 +67,7 @@ namespace AMDiS ...@@ -67,7 +67,7 @@ namespace AMDiS
FUNCNAME("Aux<S>::writeFile()"); FUNCNAME("Aux<S>::writeFile()");
boost::iostreams::filtering_ostream file; boost::iostreams::filtering_ostream file;
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
// switch (compress) { // switch (compress) {
// case GZIP: // case GZIP:
// file.push(boost::iostreams::gzip_compressor()); // file.push(boost::iostreams::gzip_compressor());
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <boost/iostreams/filtering_stream.hpp> #include <boost/iostreams/filtering_stream.hpp>
#include <boost/iostreams/device/file_descriptor.hpp> #include <boost/iostreams/device/file_descriptor.hpp>
#include <boost/iostreams/copy.hpp> #include <boost/iostreams/copy.hpp>
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
#include <boost/iostreams/filter/zlib.hpp> #include <boost/iostreams/filter/zlib.hpp>
#endif #endif
#include "AdaptInfo.h" #include "AdaptInfo.h"
...@@ -86,7 +86,7 @@ namespace AMDiS { namespace io { ...@@ -86,7 +86,7 @@ namespace AMDiS { namespace io {
break; break;
} }
case APPENDED_COMPRESSED: { case APPENDED_COMPRESSED: {
#ifdef HAVE_COMPRESSION #ifdef AMDIS_HAS_COMPRESSION
BinaryStream hstream; BinaryStream hstream;
int nBlocks = bstream.getSize() / AMDIS_ZLIB_BLOCK_SIZE + 1; int nBlocks = bstream.getSize() / AMDIS_ZLIB_BLOCK_SIZE + 1;
int finalsize = bstream.getSize() % AMDIS_ZLIB_BLOCK_SIZE; int finalsize = bstream.getSize() % AMDIS_ZLIB_BLOCK_SIZE;
...@@ -232,7 +232,7 @@ namespace AMDiS { namespace io { ...@@ -232,7 +232,7 @@ namespace AMDiS { namespace io {
FUNCNAME("writeParallelFile()"); FUNCNAME("writeParallelFile()");
using boost::lexical_cast; using boost::lexical_cast;
#ifndef HAVE_COMPRESSION #ifndef AMDIS_HAS_COMPRESSION
if(format == APPENDED_COMPRESSED) if(format == APPENDED_COMPRESSED)
format = APPENDED; format = APPENDED;
#endif #endif
......
...@@ -119,11 +119,11 @@ namespace AMDiS { namespace io { ...@@ -119,11 +119,11 @@ namespace AMDiS { namespace io {
bstream(hp), bstream(hp),
writeAsVector(writeAsVector_) writeAsVector(writeAsVector_)
{ {
#ifndef HAVE_COMPRESSION