diff --git a/Simulator/Utils/Global.cpp b/Simulator/Utils/Global.cpp index 9f6572a0d..8b6b0db96 100644 --- a/Simulator/Utils/Global.cpp +++ b/Simulator/Utils/Global.cpp @@ -53,21 +53,6 @@ string coordToString(int x, int y, int z) return ss.str(); } -// MODEL INDEPENDENT FUNCTION NMV-BEGIN { -string neuronTypeToString(vertexType t) -{ - switch (t) { - case vertexType::INH: - return "INH"; - case vertexType::EXC: - return "EXC"; - default: - cerr << "ERROR->neuronTypeToString() failed, unknown type: " << t << endl; - assert(false); - return nullptr; // Must return a value -- this will probably cascade to another failure - } -} -// } NMV-END #if defined(USE_GPU) //! CUDA device ID int g_deviceId = 0; diff --git a/Simulator/Utils/Global.h b/Simulator/Utils/Global.h index 38d5f83aa..cc1438e99 100644 --- a/Simulator/Utils/Global.h +++ b/Simulator/Utils/Global.h @@ -91,38 +91,6 @@ extern uint64_t g_simulationStep; const int g_nMaxChunkSize = 100; -// NETWORK MODEL VARIABLES NMV-BEGIN { -// Vertex types. -// NEURO: -// INH - Inhibitory neuron -// EXC - Excitory neuron -// NG911: -// CALR: Caller radii -// PSAP: PSAP nodes -// EMS, FIRE, LAW: Responder nodes -/* -// Moved to Utils/VertexType.h -enum class vertexType { - // Neuro - INH = 1, - EXC = 2, - // NG911 - CALR = 3, - PSAP = 4, - EMS = 5, - FIRE = 6, - LAW = 7, - // UNDEF - VTYPE_UNDEF = 0 -}; -// Custom streaming operator<< for the enum class vertexType -inline std::ostream &operator<<(std::ostream &os, vertexType vT) -{ - os << static_cast(vT); - return os; -} -*/ - // Edge types. // NEURO: // II - Synapse from inhibitory neuron to inhibitory neuron. @@ -195,8 +163,6 @@ string index2dToString(int i, int width, int height); string coordToString(int x, int y); // Converts a 3-d coordinate into a string. string coordToString(int x, int y, int z); -// Converts a vertexType into a string. -string neuronTypeToString(vertexType t); template ostream &operator<<(ostream &os, const vector &v) { diff --git a/Simulator/Vertices/AllVertices.cpp b/Simulator/Vertices/AllVertices.cpp index cd14ebda0..1c632cc9a 100644 --- a/Simulator/Vertices/AllVertices.cpp +++ b/Simulator/Vertices/AllVertices.cpp @@ -9,6 +9,23 @@ #include "AllVertices.h" #include "OperationManager.h" +// Utility function to convert a vertexType into a string. +// MODEL INDEPENDENT FUNCTION NMV-BEGIN { +string vertexTypeToString(vertexType t) +{ + switch (t) { + case vertexType::INH: + return "INH"; + case vertexType::EXC: + return "EXC"; + default: + cerr << "ERROR->vertexTypeToString() failed, unknown type: " << t << endl; + assert(false); + return nullptr; // Must return a value -- this will probably cascade to another failure + } +} +// } NMV-END + // Default constructor AllVertices::AllVertices() : size_(0) { diff --git a/Simulator/Vertices/AllVertices.h b/Simulator/Vertices/AllVertices.h index d005c689c..18b6a4ae8 100644 --- a/Simulator/Vertices/AllVertices.h +++ b/Simulator/Vertices/AllVertices.h @@ -33,6 +33,9 @@ using namespace std; // cereal #include "cereal/types/vector.hpp" +// Utility function to convert a vertexType into a string. +string vertexTypeToString(vertexType t); + class Layout; class AllEdges; struct AllVerticesDeviceProperties;