Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_io
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_io
Commits
a6bd0b79
Commit
a6bd0b79
authored
May 02, 2017
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving Gboxes to IO
parent
354eba80
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
184 deletions
+8
-184
src/CSVWriter/CSVWriter.hpp
src/CSVWriter/CSVWriter.hpp
+1
-1
src/GraphMLWriter/GraphMLWriter_unit_tests.hpp
src/GraphMLWriter/GraphMLWriter_unit_tests.hpp
+1
-1
src/HDF5_wr/HDF5_reader.hpp
src/HDF5_wr/HDF5_reader.hpp
+1
-0
src/HDF5_wr/HDF5_wr.hpp
src/HDF5_wr/HDF5_wr.hpp
+1
-0
src/HDF5_wr/HDF5_writer.hpp
src/HDF5_wr/HDF5_writer.hpp
+2
-1
src/Makefile.am
src/Makefile.am
+1
-1
src/VTKWriter/VTKWriter_vector_box.hpp
src/VTKWriter/VTKWriter_vector_box.hpp
+1
-1
src/util.hpp
src/util.hpp
+0
-179
No files found.
src/CSVWriter/CSVWriter.hpp
View file @
a6bd0b79
...
...
@@ -16,7 +16,7 @@
#include <boost/mpl/range_c.hpp>
#include <boost/mpl/for_each.hpp>
#include "csv_multiarray.hpp"
#include "util.hpp"
#include "util
/util
.hpp"
#include "is_csv_writable.hpp"
#define CSV_WRITER 0x30000
...
...
src/GraphMLWriter/GraphMLWriter_unit_tests.hpp
View file @
a6bd0b79
...
...
@@ -12,7 +12,7 @@
#include "GraphMLWriter.hpp"
#include "Graph/CartesianGraphFactory.hpp"
#include "util.hpp"
#include "util
/util
.hpp"
BOOST_AUTO_TEST_SUITE
(
graphml_writer_test
)
...
...
src/HDF5_wr/HDF5_reader.hpp
View file @
a6bd0b79
...
...
@@ -20,5 +20,6 @@ class HDF5_reader
};
#include "HDF5_reader_vd.hpp"
#include "HDF5_reader_gd.hpp"
#endif
/* OPENFPM_IO_SRC_HDF5_WR_HDF5_READER_HPP_ */
src/HDF5_wr/HDF5_wr.hpp
View file @
a6bd0b79
...
...
@@ -10,6 +10,7 @@
#define VECTOR_DIST 1
#define GRID_DIST 2
#include "HDF5_writer.hpp"
#include "HDF5_reader.hpp"
...
...
src/HDF5_wr/HDF5_writer.hpp
View file @
a6bd0b79
...
...
@@ -23,6 +23,7 @@ class HDF5_writer
};
#include "../HDF5_wr/HDF5_writer_vd.hpp"
#include "HDF5_writer_vd.hpp"
#include "HDF5_writer_gd.hpp"
#endif
/* OPENFPM_IO_SRC_HDF5_WR_HDF5_WRITER_HPP_ */
src/Makefile.am
View file @
a6bd0b79
...
...
@@ -8,7 +8,7 @@ io_CFLAGS = $(CUDA_CFLAGS)
io_LDADD
=
$(LINKLIBS)
nobase_include_HEADERS
=
RawReader/RawReader.hpp RawReader/RawReader_unit_tests.hpp CSVWriter/csv_multiarray.hpp CSVWriter/CSVWriter.hpp CSVWriter/is_csv_writable.hpp
\
GraphMLWriter/GraphMLWriter.hpp util.hpp
\
GraphMLWriter/GraphMLWriter.hpp util
/util
.hpp
\
VTKWriter/VTKWriter.hpp VTKWriter/byteswap_portable.hpp VTKWriter/VTKWriter_dist_graph.hpp VTKWriter/VTKWriter_graph.hpp VTKWriter/VTKWriter_point_set.hpp VTKWriter/VTKWriter_grids.hpp VTKWriter/VTKWriter_grids_st.hpp VTKWriter/VTKWriter_grids_util.hpp VTKWriter/VTKWriter_vector_box.hpp VTKWriter/is_vtk_writable.hpp HDF5_wr/HDF5_writer.hpp HDF5_wr/HDF5_writer_vd.hpp HDF5_wr/HDF5_reader.hpp HDF5_wr/HDF5_reader_vd.hpp
\
Plot/GoogleChart.hpp Plot/util.hpp
...
...
src/VTKWriter/VTKWriter_vector_box.hpp
View file @
a6bd0b79
...
...
@@ -11,7 +11,7 @@
#include <boost/math/special_functions/pow.hpp>
#include "Space/Shape/HyperCube.hpp"
#include <random>
#include "util.hpp"
#include "util
/util
.hpp"
template
<
typename
vector
>
class
v_box
...
...
src/util.hpp
deleted
100644 → 0
View file @
354eba80
/*
* util.hpp
*
* Created on: May 7, 2015
* Author: Pietro Incardona
*/
#include "config.h"
#include "util/SimpleRNG.hpp"
#ifndef UTIL_HPP_
#define UTIL_HPP_
#include <boost/iostreams/device/mapped_file.hpp>
/*! \brief Compare two files, return true if they match
*
* \param file1 path1
* \param file2 path2
*
* \return true if they match
*
*/
static
inline
bool
compare
(
std
::
string
file1
,
std
::
string
file2
)
{
boost
::
iostreams
::
mapped_file_source
f1
(
file1
);
boost
::
iostreams
::
mapped_file_source
f2
(
file2
);
if
(
f1
.
size
()
==
f2
.
size
()
&&
std
::
equal
(
f1
.
data
(),
f1
.
data
()
+
f1
.
size
(),
f2
.
data
())
)
return
true
;
else
return
false
;
}
//! RGB color struct
struct
RGB
{
//! Red
float
R
;
//! Green
float
G
;
//! Blue
float
B
;
//! Return the color as string
std
::
string
toString
()
{
return
std
::
to_string
(
R
)
+
" "
+
std
::
to_string
(
G
)
+
" "
+
std
::
to_string
(
B
);
}
};
/*! \brief Return the color sampled from one group
*
* groups:
*
* 0: Red
* 1: Green
* 2: Blue
* 3: Yellow
* 4: Cyan
* 5: Magenta
* 6: Orange
* 7: Chartreuse-Green
* 8: Spring Green
* 9: Azure
* 10: Violet
* 11: Rose
*
* \param group
*
*/
static
inline
struct
RGB
getColor
(
int
group
,
SimpleRNG
&
d
)
{
struct
RGB
col
;
float
s
=
(
float
)
d
.
GetUniform
();
group
=
group
%
12
;
#ifdef ON_IO_UNIT_TESTS
s
=
0.5
;
#endif
if
(
group
==
0
)
{
col
.
R
=
s
/
2
+
0.5
;
col
.
G
=
0.0
;
col
.
B
=
0.0
;
}
else
if
(
group
==
1
)
{
col
.
R
=
0.0
;
col
.
G
=
s
/
2
+
0.5
;
col
.
B
=
0.0
;
}
else
if
(
group
==
2
)
{
col
.
R
=
0.0
;
col
.
G
=
0.0
;
col
.
B
=
s
;
}
else
if
(
group
==
3
)
{
col
.
R
=
s
/
2
+
0.5
;
col
.
G
=
s
/
2
+
0.5
;
col
.
B
=
0.0
;
}
else
if
(
group
==
4
)
{
col
.
R
=
s
/
2
+
0.5
;
col
.
G
=
0.0
;
col
.
B
=
s
/
2
+
0.5
;
}
else
if
(
group
==
5
)
{
col
.
R
=
0.0
;
col
.
G
=
s
/
2
+
0.5
;
col
.
B
=
s
/
2
+
0.5
;
}
else
if
(
group
==
6
)
{
col
.
R
=
s
/
2
+
0.5
;
col
.
G
=
s
/
4
+
0.5
;
col
.
B
=
0.0
;
}
else
if
(
group
==
7
)
{
col
.
R
=
s
/
4
+
0.5
;
col
.
G
=
s
/
2
+
0.5
;
col
.
B
=
0.0
;
}
else
if
(
group
==
8
)
{
col
.
R
=
0.0
;
col
.
G
=
s
/
2
+
0.5
;
col
.
B
=
s
/
4
+
0.5
;
}
else
if
(
group
==
9
)
{
col
.
R
=
0.0
;
col
.
G
=
s
/
4
+
0.5
;
col
.
B
=
s
/
2
+
0.5
;
}
else
if
(
group
==
10
)
{
col
.
R
=
s
/
4
+
0.5
;
col
.
G
=
0.0
;
col
.
B
=
s
/
2
+
0.5
;
}
else
{
col
.
R
=
s
/
2
+
0.5
;
col
.
G
=
0.0
;
col
.
B
=
s
/
4
+
0.5
;
}
return
col
;
}
/*! \brief Check if one string end with a particular string
*
* \param fullString string to check
* \param ending ending string to check
*
*/
static
inline
bool
hasEnding
(
std
::
string
const
&
fullString
,
std
::
string
const
&
ending
)
{
if
(
fullString
.
length
()
>=
ending
.
length
())
{
return
(
0
==
fullString
.
compare
(
fullString
.
length
()
-
ending
.
length
(),
ending
.
length
(),
ending
));}
else
{
return
false
;}
}
#endif
/* UTIL_HPP_ */
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