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
9b4284dc
Commit
9b4284dc
authored
7 years ago
by
Podhorszki, Norbert
Browse files
Options
Downloads
Patches
Plain Diff
Reorg Read() and ScheduleRead()
parent
408e9b87
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!102
Variables3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/adios2/core/Engine.cpp
+11
-2
11 additions, 2 deletions
source/adios2/core/Engine.cpp
source/adios2/core/Engine.h
+28
-23
28 additions, 23 deletions
source/adios2/core/Engine.h
with
39 additions
and
25 deletions
source/adios2/core/Engine.cpp
+
11
−
2
View file @
9b4284dc
...
...
@@ -280,14 +280,23 @@ VariableCompound *Engine::InquireVariableCompound(const std::string & /*name*/,
return
nullptr
;
}
void
Engine
::
Read
(
Variable
<
double
>
&
/*variable*/
,
const
double
*
/*values*/
)
{}
void
Engine
::
ScheduleRead
(
Variable
<
unsigned
int
>
&
/*variable*/
,
unsigned
int
*
/*values*/
)
{
}
void
Engine
::
ScheduleRead
(
Variable
<
double
>
&
/*variable*/
,
double
*
/*values*/
)
{
}
void
Engine
::
ScheduleRead
(
const
std
::
string
/*variableName*/
,
void
Engine
::
ScheduleRead
(
const
std
::
string
&
/*variableName*/
,
unsigned
int
*
/*values*/
)
{
}
void
Engine
::
ScheduleRead
(
const
std
::
string
&
/*variableName*/
,
double
*
/*values*/
)
{
}
void
Engine
::
ScheduleRead
(
const
std
::
string
&
/*variableName*/
)
{}
void
Engine
::
ScheduleRead
()
{}
void
Engine
::
Release
()
{}
void
Engine
::
PerformReads
(
PerformReadMode
/*mode*/
){};
...
...
This diff is collapsed.
Click to expand it.
source/adios2/core/Engine.h
+
28
−
23
View file @
9b4284dc
...
...
@@ -242,9 +242,10 @@ public:
* must use Read(variable) instead intentionally
*/
template
<
class
T
>
void
Read
(
Variable
<
T
>
&
variable
,
const
T
*
values
)
void
Read
(
Variable
<
T
>
&
variable
,
T
*
values
)
{
Read
(
variable
,
values
);
ScheduleRead
(
variable
,
values
);
PerformReads
(
PerformReadMode
::
BLOCKINGREAD
);
}
/**
...
...
@@ -253,9 +254,10 @@ public:
* @param values
*/
template
<
class
T
>
void
Read
(
const
std
::
string
variableName
,
const
T
*
values
)
void
Read
(
const
std
::
string
&
variableName
,
T
*
values
)
{
Read
(
variableName
,
values
);
ScheduleRead
(
variableName
,
values
);
PerformReads
(
PerformReadMode
::
BLOCKINGREAD
);
}
/**
...
...
@@ -264,9 +266,10 @@ public:
* @param values
*/
template
<
class
T
>
void
Read
(
Variable
<
T
>
&
variable
,
const
T
&
values
)
void
Read
(
Variable
<
T
>
&
variable
,
T
&
values
)
{
Read
(
variable
,
&
values
);
ScheduleRead
(
variable
,
&
values
);
PerformReads
(
PerformReadMode
::
BLOCKINGREAD
);
}
/**
...
...
@@ -275,9 +278,10 @@ public:
* @param values
*/
template
<
class
T
>
void
Read
(
const
std
::
string
variableName
,
const
T
&
values
)
void
Read
(
const
std
::
string
&
variableName
,
T
&
values
)
{
Read
(
variableName
,
&
values
);
ScheduleRead
(
variableName
,
&
values
);
PerformReads
(
PerformReadMode
::
BLOCKINGREAD
);
}
/**
...
...
@@ -287,7 +291,8 @@ public:
template
<
class
T
>
void
Read
(
Variable
<
T
>
&
variable
)
{
Read
(
variable
,
nullptr
);
ScheduleRead
(
variable
);
PerformReads
(
PerformReadMode
::
BLOCKINGREAD
);
}
/**
...
...
@@ -295,13 +300,12 @@ public:
* @param variableName
*/
template
<
class
T
>
void
Read
(
const
std
::
string
variableName
)
void
Read
(
const
std
::
string
&
variableName
)
{
Read
(
variableName
,
nullptr
);
ScheduleRead
(
variableName
);
PerformReads
(
PerformReadMode
::
BLOCKINGREAD
);
}
virtual
void
Read
(
Variable
<
double
>
&
variable
,
const
double
*
values
);
/**
* Read function that adds static checking on the variable to be passed by
* values
...
...
@@ -322,7 +326,7 @@ public:
* @param values
*/
template
<
class
T
>
void
ScheduleRead
(
const
std
::
string
variableName
,
T
*
values
)
void
ScheduleRead
(
const
std
::
string
&
variableName
,
T
*
values
)
{
ScheduleRead
(
variableName
,
values
);
}
...
...
@@ -344,7 +348,7 @@ public:
* @param values
*/
template
<
class
T
>
void
ScheduleRead
(
const
std
::
string
variableName
,
T
&
values
)
void
ScheduleRead
(
const
std
::
string
&
variableName
,
T
&
values
)
{
ScheduleRead
(
variableName
,
&
values
);
}
...
...
@@ -353,19 +357,13 @@ public:
* Unallocated version, ADIOS will allocate space for incoming data
* @param variableName
*/
void
ScheduleRead
(
const
std
::
string
variableName
)
{
ScheduleRead
(
variableName
,
nullptr
);
}
virtual
void
ScheduleRead
(
const
std
::
string
&
variableName
);
/**
* Unallocated unspecified version, ADIOS will receive any variable and will
* allocate space for incoming data
*/
void
ScheduleRead
()
{
ScheduleRead
(
nullptr
,
nullptr
);
}
virtual
void
ScheduleRead
(
Variable
<
double
>
&
variable
,
double
*
values
);
virtual
void
ScheduleRead
(
const
std
::
string
variableName
,
double
*
values
);
virtual
void
ScheduleRead
();
/**
* Perform all scheduled reads, either blocking until all reads completed,
...
...
@@ -536,6 +534,13 @@ protected:
* @param transportIndex must be in the range [ -1 , m_Transports.size()-1 ]
*/
void
CheckTransportIndex
(
const
int
transportIndex
);
virtual
void
ScheduleRead
(
Variable
<
unsigned
int
>
&
variable
,
unsigned
int
*
values
);
virtual
void
ScheduleRead
(
Variable
<
double
>
&
variable
,
double
*
values
);
virtual
void
ScheduleRead
(
const
std
::
string
&
variableName
,
unsigned
int
*
values
);
virtual
void
ScheduleRead
(
const
std
::
string
&
variableName
,
double
*
values
);
};
}
// end namespace
...
...
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