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
a066e50d
Commit
a066e50d
authored
8 years ago
by
w.klijn
Browse files
Options
Downloads
Patches
Plain Diff
Use a define for spike_export_function
parent
e6dc1c7a
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
src/io/exporter_spike_file.hpp
+1
-1
1 addition, 1 deletion
src/io/exporter_spike_file.hpp
src/model.hpp
+7
-10
7 additions, 10 deletions
src/model.hpp
with
8 additions
and
11 deletions
src/io/exporter_spike_file.hpp
+
1
−
1
View file @
a066e50d
...
...
@@ -56,7 +56,7 @@ public:
for
(
auto
spike
:
spikes
)
{
char
linebuf
[
45
];
auto
n
=
std
::
snprintf
(
linebuf
,
sizeof
(
linebuf
),
"%u %.4f
\n
"
,
unsigned
{
spike
.
source
.
gid
},
float
{
spike
.
time
}
);
unsigned
{
spike
.
source
.
gid
},
float
(
spike
.
time
)
);
file_handle_
.
write
(
linebuf
,
n
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/model.hpp
+
7
−
10
View file @
a066e50d
...
...
@@ -28,6 +28,7 @@ public:
using
communicator_type
=
communication
::
communicator
<
time_type
,
communication
::
global_policy
>
;
using
sampler_function
=
typename
cell_group_type
::
sampler_function
;
using
spike_type
=
typename
communicator_type
::
spike_type
;
using
spike_export_function
=
std
::
function
<
void
(
const
std
::
vector
<
spike_type
>&
)
>
;
struct
probe_record
{
cell_member_type
id
;
...
...
@@ -180,22 +181,18 @@ public:
// register a callback that will perform a export of the global
// spike vector
void
set_global_spike_callback
(
std
::
function
<
void
(
const
std
::
vector
<
spike_type
>&
)
>
global_export_callback
)
void
set_global_spike_callback
(
spike_export_function
export_callback
)
{
global_export_callback_
=
global_
export_callback
;
global_export_callback_
=
export_callback
;
}
// register a callback that will perform a export of the rank local
// spike vector
void
set_local_spike_callback
(
std
::
function
<
void
(
const
std
::
vector
<
spike_type
>&
)
>
local_export_callback
)
void
set_local_spike_callback
(
spike_export_function
export_callback
)
{
local_export_callback_
=
local_
export_callback
;
local_export_callback_
=
export_callback
;
}
private
:
cell_gid_type
cell_from_
;
cell_gid_type
cell_to_
;
...
...
@@ -211,8 +208,8 @@ private:
using
local_spike_store_type
=
thread_private_spike_store
<
time_type
>
;
util
::
double_buffer
<
local_spike_store_type
>
local_spikes_
;
s
td
::
function
<
void
(
const
std
::
vector
<
spike_type
>&
)
>
global_export_callback_
;
s
td
::
function
<
void
(
const
std
::
vector
<
spike_type
>&
)
>
local_export_callback_
;
s
pike_export_function
global_export_callback_
;
s
pike_export_function
local_export_callback_
;
// Convenience functions that map the spike buffers and event queues onto
// the appropriate integration interval.
//
...
...
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