Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alvarez, Gonzalo
PsimagLite
Commits
493f3cb4
Commit
493f3cb4
authored
Oct 28, 2020
by
Alvarez, Gonzalo
Browse files
BoostSerializationHeaders deleted
parent
1ad11ba8
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/BoostSerializationHeaders.h
deleted
100644 → 0
View file @
1ad11ba8
#ifndef PSI_BOOST_SER_H_H
#define PSI_BOOST_SER_H_H
#include <exception>
#ifdef USE_BOOST
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/serialization/utility.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/serialization/split_free.hpp>
#else
#include <string>
#include <stdexcept>
namespace
boost
{
inline
void
noboost
(
std
::
string
msg
)
{
std
::
string
str
(
"ERROR: Please compile with -DUSE_BOOST for "
);
str
+=
msg
+
" to work
\n
"
;
throw
std
::
runtime_error
(
str
);
}
namespace
serialization
{
template
<
typename
T
>
class
base_object
{
};
}
// namespace serialization
namespace
archive
{
class
text_iarchive
{
public:
text_iarchive
(
std
::
ifstream
&
)
{
boost
::
noboost
(
"text_oarchive"
);
}
};
template
<
typename
T
>
text_iarchive
&
operator
>>
(
text_iarchive
&
ia
,
const
T
&
)
{
boost
::
noboost
(
"operator>> text_iarchive"
);
return
ia
;
}
class
text_oarchive
{
public:
text_oarchive
(
std
::
ofstream
&
)
{
boost
::
noboost
(
"text_oarchive"
);
}
};
template
<
typename
T
>
text_oarchive
&
operator
<<
(
text_oarchive
&
oa
,
const
T
&
)
{
boost
::
noboost
(
"operator<< text_oarchive"
);
return
oa
;
}
}
// namespace archive
}
// namespace boost
#endif
#endif
src/Geometry/Geometry.h
View file @
493f3cb4
...
...
@@ -80,7 +80,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#include "GeometryTerm.h"
#include "GeometryEx.h"
#include "BoostSerializationHeaders.h"
#include "Io/IoSerializerStub.h"
namespace
PsimagLite
{
...
...
@@ -127,13 +126,6 @@ public:
}
}
Geometry
(
String
filename
)
{
std
::
ifstream
ifs
(
filename
.
c_str
());
boost
::
archive
::
text_iarchive
ia
(
ifs
);
ia
>>
(
*
this
);
}
~
Geometry
()
{
for
(
SizeType
i
=
0
;
i
<
terms_
.
size
();
i
++
)
...
...
src/Geometry/GeometryDirection.h
View file @
493f3cb4
...
...
@@ -78,7 +78,6 @@ DISCLOSED WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.
#ifndef GEOMETRY_DIR_H
#define GEOMETRY_DIR_H
#include <cassert>
#include "BoostSerializationHeaders.h"
#include "Io/IoSerializerStub.h"
#include "Matrix.h"
...
...
src/Geometry/GeometryEx.h
View file @
493f3cb4
...
...
@@ -2,7 +2,6 @@
#define GEOMETRY_EX_H
#include "Vector.h"
#include "BoostSerializationHeaders.h"
#ifndef USE_MS_GEOMETRY
...
...
src/Geometry/Ladder.h
View file @
493f3cb4
...
...
@@ -125,15 +125,6 @@ public:
throw
RuntimeError
(
"Ladder: leg must divide number of sites
\n
"
);
}
template
<
class
Archive
>
void
write
(
Archive
&
ar
,
const
unsigned
int
)
{
ar
&
boost
::
serialization
::
base_object
<
GeometryBase
<
ComplexOrRealType
,
InputType
>
>
(
*
this
);
ar
&
linSize_
;
ar
&
leg_
;
ar
&
isPeriodicY_
;
}
virtual
SizeType
maxConnections
()
const
{
return
(
isPeriodicX_
)
?
linSize_
:
leg_
+
1
;
}
virtual
SizeType
dirs
()
const
{
return
2
;
}
...
...
src/Geometry/LadderBath.h
View file @
493f3cb4
...
...
@@ -111,16 +111,6 @@ public:
if
(
ladder_
)
delete
ladder_
;
}
template
<
class
Archive
>
void
write
(
Archive
&
ar
,
const
unsigned
int
)
{
ar
&
boost
::
serialization
::
base_object
<
GeometryBase
<
ComplexOrRealType
,
InputType
>
>
(
*
this
);
ar
&
linSize_
;
ar
&
bathSitesPerSite_
;
ar
&
clusterSize_
;
ar
&
ladder_
;
}
virtual
SizeType
dirs
()
const
{
return
3
;
}
virtual
SizeType
length
(
SizeType
)
const
...
...
src/Geometry/Star.h
View file @
493f3cb4
...
...
@@ -96,13 +96,6 @@ public:
:
linSize_
(
linSize
)
{}
template
<
class
Archive
>
void
write
(
Archive
&
ar
,
const
unsigned
int
)
{
ar
&
boost
::
serialization
::
base_object
<
GeometryBase
<
ComplexOrRealType
,
InputType
>
>
(
*
this
);
ar
&
linSize_
;
}
virtual
SizeType
maxConnections
()
const
{
return
linSize_
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment