Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADIOS2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Podhorszki, Norbert
ADIOS2
Commits
34dcdc22
Commit
34dcdc22
authored
7 years ago
by
Atkins, Charles Vernon
Browse files
Options
Downloads
Patches
Plain Diff
Add additional "all type" short hand macros
parent
bb12ae54
No related branches found
No related tags found
1 merge request
!215
Add plugin engine
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
source/adios2/ADIOSMacros.h
+57
-0
57 additions, 0 deletions
source/adios2/ADIOSMacros.h
source/adios2/core/Engine.cpp
+8
-81
8 additions, 81 deletions
source/adios2/core/Engine.cpp
source/adios2/core/Engine.h
+5
-34
5 additions, 34 deletions
source/adios2/core/Engine.h
with
70 additions
and
115 deletions
source/adios2/ADIOSMacros.h
+
57
−
0
View file @
34dcdc22
...
@@ -84,4 +84,61 @@
...
@@ -84,4 +84,61 @@
MACRO(double) \
MACRO(double) \
MACRO(long double)
MACRO(long double)
// The ADIOS_FOREACH_TYPE_2ARGS macro assumes the given argument is a macro
// which takes two arguments, the first being a type, and the second being a
// label for that type, i.e. std::complex<float> and CFloat.
//
// An example of this might be to define a virtual method for each known
// type, and since the method is virtual then it cannot be a template.
// For example:
//
// #define declare_foo(T,L) virtual const T& foo ## L (std::string bar);
// ADIOS_FOREACH_TYPE_2ARGS(declare_foo)
// #undef declare_foo
//
// is equivalent to:
//
// virtual char& foo_Char(std::string bar);
// virtual unsigned char& foo_UChar(std::string bar);
// virtual short& foo_Short(std::string bar);
// virtual unsigned short& foo_UShort(std::string bar);
// ...
// virtual std::complex<long double>& foo_CLDouble(std::string bar);
//
#define ADIOS2_FOREACH_TYPE_2ARGS(MACRO) \
MACRO(char, Char) \
MACRO(unsigned char, UChar) \
MACRO(short, Short) \
MACRO(unsigned short, UShort) \
MACRO(int, Int) \
MACRO(unsigned int, UInt) \
MACRO(long int, LInt) \
MACRO(long long int, LLInt) \
MACRO(unsigned long int, ULInt) \
MACRO(unsigned long long int, ULLInt) \
MACRO(float, Float) \
MACRO(double, Double) \
MACRO(long double, LDouble) \
MACRO(std::complex<float>, CFloat) \
MACRO(std::complex<double>, CDouble) \
MACRO(std::complex<long double>, CLDouble)
#define ADIOS2_FOREACH_PRIMITIVE_TYPE_2ARGS(MACRO) \
MACRO(char, Char) \
MACRO(unsigned char, UChar) \
MACRO(short, Short) \
MACRO(unsigned short, UShort) \
MACRO(int, Int) \
MACRO(unsigned int, UInt) \
MACRO(long int, LInt) \
MACRO(long long int, LLInt) \
MACRO(unsigned long int, ULInt) \
MACRO(unsigned long long int, ULLInt) \
MACRO(float, Float) \
MACRO(double, Double)
#define ADIOS2_FOREACH_COMPLEX_TYPE_2ARGS(MACRO) \
MACRO(std::complex<float>, CFloat) \
MACRO(std::complex<double>, CDouble)
#endif
/* ADIOS2_ADIOSMACROS_H */
#endif
/* ADIOS2_ADIOSMACROS_H */
This diff is collapsed.
Click to expand it.
source/adios2/core/Engine.cpp
+
8
−
81
View file @
34dcdc22
...
@@ -128,88 +128,15 @@ VariableBase *Engine::InquireVariableUnknown(const std::string &name,
...
@@ -128,88 +128,15 @@ VariableBase *Engine::InquireVariableUnknown(const std::string &name,
{
{
return
nullptr
;
return
nullptr
;
}
}
Variable
<
char
>
*
Engine
::
InquireVariableChar
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
unsigned
char
>
*
Engine
::
InquireVariableUChar
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
short
>
*
Engine
::
InquireVariableShort
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
unsigned
short
>
*
Engine
::
InquireVariableUShort
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
int
>
*
Engine
::
InquireVariableInt
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
unsigned
int
>
*
Engine
::
InquireVariableUInt
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
long
int
>
*
Engine
::
InquireVariableLInt
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
unsigned
long
int
>
*
Engine
::
InquireVariableULInt
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
long
long
int
>
*
Engine
::
InquireVariableLLInt
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
unsigned
long
long
int
>
*
Engine
::
InquireVariableULLInt
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
float
>
*
Engine
::
InquireVariableFloat
(
const
std
::
string
&
name
,
#define define(T, L) \
const
bool
readIn
)
Variable<T> *Engine::InquireVariable##L(const std::string &name, \
{
const bool readIn) \
return
nullptr
;
{ \
}
return nullptr; \
Variable
<
double
>
*
Engine
::
InquireVariableDouble
(
const
std
::
string
&
name
,
}
const
bool
readIn
)
ADIOS2_FOREACH_TYPE_2ARGS
(
define
)
{
#undef define
return
nullptr
;
}
Variable
<
long
double
>
*
Engine
::
InquireVariableLDouble
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
cfloat
>
*
Engine
::
InquireVariableCFloat
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
cdouble
>
*
Engine
::
InquireVariableCDouble
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
Variable
<
cldouble
>
*
Engine
::
InquireVariableCLDouble
(
const
std
::
string
&
name
,
const
bool
readIn
)
{
return
nullptr
;
}
#define declare_type(T) \
#define declare_type(T) \
void Engine::DoScheduleRead(Variable<T> &variable, const T *values) \
void Engine::DoScheduleRead(Variable<T> &variable, const T *values) \
...
...
This diff is collapsed.
Click to expand it.
source/adios2/core/Engine.h
+
5
−
34
View file @
34dcdc22
...
@@ -356,40 +356,11 @@ protected:
...
@@ -356,40 +356,11 @@ protected:
// READ
// READ
virtual
VariableBase
*
InquireVariableUnknown
(
const
std
::
string
&
name
,
virtual
VariableBase
*
InquireVariableUnknown
(
const
std
::
string
&
name
,
const
bool
readIn
);
const
bool
readIn
);
virtual
Variable
<
char
>
*
InquireVariableChar
(
const
std
::
string
&
name
,
#define declare(T, L) \
const
bool
readIn
);
virtual Variable<T> *InquireVariable##L(const std::string &name, \
virtual
Variable
<
unsigned
char
>
*
const bool readIn);
InquireVariableUChar
(
const
std
::
string
&
name
,
const
bool
readIn
);
ADIOS2_FOREACH_TYPE_2ARGS
(
declare
)
virtual
Variable
<
short
>
*
InquireVariableShort
(
const
std
::
string
&
name
,
#undef declare
const
bool
readIn
);
virtual
Variable
<
unsigned
short
>
*
InquireVariableUShort
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
int
>
*
InquireVariableInt
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
unsigned
int
>
*
InquireVariableUInt
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
long
int
>
*
InquireVariableLInt
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
unsigned
long
int
>
*
InquireVariableULInt
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
long
long
int
>
*
InquireVariableLLInt
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
unsigned
long
long
int
>
*
InquireVariableULLInt
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
float
>
*
InquireVariableFloat
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
double
>
*
InquireVariableDouble
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
long
double
>
*
InquireVariableLDouble
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
cfloat
>
*
InquireVariableCFloat
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
cdouble
>
*
InquireVariableCDouble
(
const
std
::
string
&
name
,
const
bool
readIn
);
virtual
Variable
<
cldouble
>
*
InquireVariableCLDouble
(
const
std
::
string
&
name
,
const
bool
readIn
);
// Known-type
// Known-type
#define declare_type(T) \
#define declare_type(T) \
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment