From 515cebf18f57fff3704738ad17af18ebf6bc5837 Mon Sep 17 00:00:00 2001
From: Nora Abi Akar <nora.abiakar@gmail.com>
Date: Mon, 30 Mar 2020 09:28:49 +0200
Subject: [PATCH] Fix warning (#992)
Fix warning generated when `delay` and `weight` were accidentally swapped in #984
Match `cell_connection` delay type to `connection` delay type
---
arbor/connection.hpp | 4 ++--
arbor/include/arbor/recipe.hpp | 4 ++--
python/recipe.cpp | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arbor/connection.hpp b/arbor/connection.hpp
index a114aa80..4a9fe0fc 100644
--- a/arbor/connection.hpp
+++ b/arbor/connection.hpp
@@ -13,7 +13,7 @@ public:
connection( cell_member_type src,
cell_member_type dest,
float w,
- time_type d,
+ float d,
cell_gid_type didx=cell_gid_type(-1)):
source_(src),
destination_(dest),
@@ -36,8 +36,8 @@ public:
private:
cell_member_type source_;
cell_member_type destination_;
- float delay_;
float weight_;
+ float delay_;
cell_size_type index_on_domain_;
};
diff --git a/arbor/include/arbor/recipe.hpp b/arbor/include/arbor/recipe.hpp
index fea78935..97544083 100644
--- a/arbor/include/arbor/recipe.hpp
+++ b/arbor/include/arbor/recipe.hpp
@@ -40,9 +40,9 @@ struct cell_connection {
cell_connection_endpoint dest;
float weight;
- time_type delay;
+ float delay;
- cell_connection(cell_connection_endpoint src, cell_connection_endpoint dst, float w, time_type d):
+ cell_connection(cell_connection_endpoint src, cell_connection_endpoint dst, float w, float d):
source(src), dest(dst), weight(w), delay(d)
{}
};
diff --git a/python/recipe.cpp b/python/recipe.cpp
index 1a4c0f7a..9d9e3423 100644
--- a/python/recipe.cpp
+++ b/python/recipe.cpp
@@ -97,7 +97,7 @@ void register_recipe(pybind11::module& m) {
"Describes a connection between two cells:\n"
" Defined by source and destination end points (that is pre-synaptic and post-synaptic respectively), a connection weight and a delay time.");
cell_connection
- .def(pybind11::init<arb::cell_member_type, arb::cell_member_type, float, arb::time_type>(),
+ .def(pybind11::init<arb::cell_member_type, arb::cell_member_type, float, float>(),
"source"_a, "dest"_a, "weight"_a, "delay"_a,
"Construct a connection with arguments:\n"
" source: The source end point of the connection.\n"
--
GitLab