Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
9e22f238
Commit
9e22f238
authored
8 years ago
by
w.klijn
Browse files
Options
Downloads
Patches
Plain Diff
Remove the do_nothing function, and use Sam, fancy thingy
parent
b251a45f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
miniapp/miniapp.cpp
+7
-5
7 additions, 5 deletions
miniapp/miniapp.cpp
src/io/exporter.hpp
+0
-4
0 additions, 4 deletions
src/io/exporter.hpp
with
7 additions
and
9 deletions
miniapp/miniapp.cpp
+
7
−
5
View file @
9e22f238
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include
<profiling/profiler.hpp>
#include
<profiling/profiler.hpp>
#include
<threading/threading.hpp>
#include
<threading/threading.hpp>
#include
<util/ioutil.hpp>
#include
<util/ioutil.hpp>
#include
<util/nop.hpp>
#include
<util/optional.hpp>
#include
<util/optional.hpp>
#include
"io.hpp"
#include
"io.hpp"
...
@@ -70,10 +71,11 @@ int main(int argc, char** argv) {
...
@@ -70,10 +71,11 @@ int main(int argc, char** argv) {
// File output is depending on the input arguments
// File output is depending on the input arguments
std
::
unique_ptr
<
file_export_type
>
file_exporter
;
std
::
unique_ptr
<
file_export_type
>
file_exporter
;
std
::
function
<
void
(
const
std
::
vector
<
spike_type
>&
)
>
do_nothing
{
util
::
nop_function
};
if
(
!
options
.
spike_file_output
)
{
if
(
!
options
.
spike_file_output
)
{
// TODO: use the no_function if PR:77
m
.
set_global_spike_callback
(
do_nothing
);
m
.
set_global_spike_callback
(
file_export_type
::
do_nothing
);
m
.
set_local_spike_callback
(
do_nothing
);
m
.
set_local_spike_callback
(
file_export_type
::
do_nothing
);
}
}
else
{
else
{
// The exporter is the same for both global and local output
// The exporter is the same for both global and local output
...
@@ -84,7 +86,7 @@ int main(int argc, char** argv) {
...
@@ -84,7 +86,7 @@ int main(int argc, char** argv) {
options
.
file_extention
,
options
.
over_write
);
options
.
file_extention
,
options
.
over_write
);
if
(
options
.
single_file_per_rank
)
{
if
(
options
.
single_file_per_rank
)
{
m
.
set_global_spike_callback
(
file_export_type
::
do_nothing
);
m
.
set_global_spike_callback
(
do_nothing
);
m
.
set_local_spike_callback
(
m
.
set_local_spike_callback
(
[
&
](
const
std
::
vector
<
spike_type
>&
spikes
)
{
[
&
](
const
std
::
vector
<
spike_type
>&
spikes
)
{
file_exporter
->
output
(
spikes
);
file_exporter
->
output
(
spikes
);
...
@@ -95,7 +97,7 @@ int main(int argc, char** argv) {
...
@@ -95,7 +97,7 @@ int main(int argc, char** argv) {
[
&
](
const
std
::
vector
<
spike_type
>&
spikes
)
{
[
&
](
const
std
::
vector
<
spike_type
>&
spikes
)
{
file_exporter
->
output
(
spikes
);
file_exporter
->
output
(
spikes
);
});
});
m
.
set_local_spike_callback
(
file_export_type
::
do_nothing
);
m
.
set_local_spike_callback
(
do_nothing
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/io/exporter.hpp
+
0
−
4
View file @
9e22f238
...
@@ -26,10 +26,6 @@ public:
...
@@ -26,10 +26,6 @@ public:
// Returns the status of the exporter
// Returns the status of the exporter
virtual
bool
good
()
const
=
0
;
virtual
bool
good
()
const
=
0
;
// Static version of the do_export function for NOP callbacks
static
void
do_nothing
(
const
std
::
vector
<
spike_type
>&
)
{}
};
};
}
//communication
}
//communication
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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