Skip to content

Commit e43bbe3

Browse files
authored
Merge branch 'development' into issue-730-add-contributor
2 parents 0fcdc48 + 11b1737 commit e43bbe3

33 files changed

+1618
-423
lines changed

.github/pull_request_template.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!-- Link to the issue and use the appropriate closing keyword (e.g., Closes, Resolves) -->
2+
Closes #
3+
4+
<!-- Please provide a brief overview of the changes implemented -->
5+
#### Description
6+
7+
8+
<!-- Please check the boxes as applicable -->
9+
#### Checklist (Mandatory for new features)
10+
- [ ] Added Documentation
11+
- [ ] Added Unit Tests
12+
13+
<!-- Ensure all boxes are checked before submitting the PR -->
14+
#### Testing (Mandatory for all changes)
15+
- [ ] GPU Test: `test-medium-connected.xml` Passed
16+
- [ ] GPU Test: `test-large-long.xml` Passed
17+
18+
<!--
19+
PR Guidelines
20+
1. Ensure that your changes are merged into the `development` branch. Only merge into the `master` branch if explicitly instructed.
21+
- On GitHub, at the top of the PR page, change the base branch from `master` to `development`.
22+
2. Assign the PR to yourself and apply the appropriate labels.
23+
3. Only add a reviewer after submitting the PR and confirming that all GitHub Actions have passed.
24+
25+
Thank you for your contribution!
26+
-->

.github/workflows/plantUML.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
run: |
4444
echo ${{ steps.getfile.outputs.files }}
4545
- name: Generate SVG Diagrams
46-
uses: cloudbees/plantuml-github-action@master
46+
uses: UWB-Biocomputing/plantuml-github-action@main
4747
with:
4848
args: -o "diagrams" -v -tsvg ${{ steps.getfile.outputs.files }}
4949
- name: Generate PNG Diagrams
50-
uses: cloudbees/plantuml-github-action@master
50+
uses: UWB-Biocomputing/plantuml-github-action@main
5151
with:
5252
args: -o "diagrams" -v -tpng ${{ steps.getfile.outputs.files }}
5353
- name: Push Local Changes

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,16 @@ target_link_libraries(tests combinedLib)
402402
# # Link the combined library into the 'serialFileAccessTest' executable.
403403
# target_link_libraries(serialFileAccessTest combinedLib)
404404

405+
add_executable(serialFileAccessTest
406+
Testing/RunTests.cpp
407+
Testing/UnitTesting/SerializationFileAccessTest.cpp)
408+
409+
# Links the Googletest framework with the serialFileAccessTest executable
410+
target_link_libraries(serialFileAccessTest gtest gtest_main)
411+
412+
# Link the combined library into the 'serialFileAccessTest' executable.
413+
target_link_libraries(serialFileAccessTest combinedLib)
414+
405415
# Clear ENABLE_CUDA, PERFORMANCE_METRICS and GPROF from the cache so it's reset for subsequent builds
406416
unset(ENABLE_CUDA CACHE)
407417
unset(PERFORMANCE_METRICS CACHE)

Contributors.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ Natalie Gonzales
7272
## 2024
7373
Andrzej Dawiec
7474

75+
Jasleen Kaur Saini
76+
7577
ChengHao Hsu
7678

7779
Zaina Shaikh
@@ -114,6 +116,10 @@ Victoria Jo Salvatore
114116
Divya Kamath
115117

116118
## 2024
119+
Vanessa Arndorfer
120+
121+
Xiang Li
122+
117123
Jardi Martinez
118124

119125
Nicholas Posey

Simulator/Connections/Connections.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Connections {
7474
virtual bool updateConnections(AllVertices &vertices);
7575

7676
/// Cereal serialization method
77-
template <class Archive> void serialize(Archive &archive, std::uint32_t const version);
77+
template <class Archive> void serialize(Archive &archive);
7878

7979
#if defined(USE_GPU)
8080
public:
@@ -107,10 +107,8 @@ class Connections {
107107
log4cplus::Logger edgeLogger_;
108108
};
109109

110-
CEREAL_CLASS_VERSION(Connections, 1);
111-
112110
/// Cereal serialization method
113-
template <class Archive> void Connections::serialize(Archive &archive, std::uint32_t const version)
111+
template <class Archive> void Connections::serialize(Archive &archive)
114112
{
115113
archive(cereal::make_nvp("edges", edges_),
116114
cereal::make_nvp("synapseIndexMap", synapseIndexMap_));

Simulator/Core/Model.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Model {
8282
virtual void updateConnections() = 0;
8383

8484
/// Cereal serialization method
85-
template <class Archive> void serialize(Archive &archive);
85+
template <class Archive> void serialize(Archive &archive, std::uint32_t const version);
8686

8787
protected:
8888
// Note: This method was previously used for debugging, but it is now dead code left behind.
@@ -111,10 +111,10 @@ class Model {
111111
createAllVertices(); /// Populate an instance of AllVertices with an initial state for each vertex.
112112
};
113113

114-
CEREAL_REGISTER_TYPE(Model);
114+
CEREAL_CLASS_VERSION(Model, 1);
115115

116116
/// Cereal serialization method
117-
template <class Archive> void Model::serialize(Archive &archive)
117+
template <class Archive> void Model::serialize(Archive &archive, std::uint32_t const version)
118118
{
119119
archive(cereal::make_nvp("connections", connections_), cereal::make_nvp("layout", layout_));
120120
}

Simulator/Edges/AllEdges.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class AllEdges {
5959
virtual void createEdgeIndexMap(EdgeIndexMap &edgeIndexMap);
6060

6161
/// Cereal serialization method
62-
template <class Archive> void serialize(Archive &archive, std::uint32_t const version);
62+
template <class Archive> void serialize(Archive &archive);
6363

6464
protected:
6565
/// Setup the internal structure of the class (allocate memories and initialize them).
@@ -223,11 +223,9 @@ class AllEdges {
223223
int countVertices_;
224224
};
225225

226-
CEREAL_CLASS_VERSION(AllEdges, 1);
227-
228226
/// Cereal serialization method
229227
/// (Serializes edge weights, source vertices, and destination vertices)
230-
template <class Archive> void AllEdges::serialize(Archive &archive, std::uint32_t const version)
228+
template <class Archive> void AllEdges::serialize(Archive &archive)
231229
{
232230
// serialization
233231
archive(cereal::make_nvp("sourceVertexIndex", sourceVertexIndex_),

Simulator/Layouts/Layout.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Layout {
8585
BGSIZE numEndogenouslyActiveNeurons_; ///< Number of endogenously active neurons.
8686

8787
/// Cereal serialization method
88-
template <class Archive> void serialize(Archive &archive, std::uint32_t const version);
88+
template <class Archive> void serialize(Archive &archive);
8989

9090
protected:
9191
unique_ptr<AllVertices> vertices_;
@@ -95,10 +95,8 @@ class Layout {
9595
int numVertices_; ///< Total number of vertices in the graph.
9696
};
9797

98-
CEREAL_CLASS_VERSION(Layout, 1);
99-
10098
/// Cereal serialization method
101-
template <class Archive> void Layout::serialize(Archive &archive, std::uint32_t const version)
99+
template <class Archive> void Layout::serialize(Archive &archive)
102100
{
103101
archive(cereal::make_nvp("xloc", xloc_), cereal::make_nvp("yloc", yloc_),
104102
cereal::make_nvp("dist2", dist2_), cereal::make_nvp("dist", dist_),

Simulator/Layouts/NG911/Layout911.cpp

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,53 @@ void Layout911::registerGraphProperties()
2424
GraphManager &gm = GraphManager::getInstance();
2525
gm.registerProperty("objectID", &VertexProperty::objectID);
2626
gm.registerProperty("name", &VertexProperty::name);
27+
gm.registerProperty("type", &VertexProperty::type);
28+
gm.registerProperty("y", &VertexProperty::y);
29+
gm.registerProperty("x", &VertexProperty::x);
2730
gm.registerProperty("servers", &VertexProperty::servers);
2831
gm.registerProperty("trunks", &VertexProperty::trunks);
2932
gm.registerProperty("segments", &VertexProperty::segments);
3033
}
3134

35+
// Loads Layout911 member variables.
36+
void Layout911::loadParameters()
37+
{
38+
// Get the number of verticese from the GraphManager
39+
numVertices_ = GraphManager::getInstance().numVertices();
40+
}
41+
42+
// Setup the internal structure of the class.
43+
void Layout911::setup()
44+
{
45+
// Base class allocates memory for: xLoc_, yLoc, dist2_, and dist_
46+
// so we call its method first
47+
Layout::setup();
48+
49+
// Loop over all vertices and set their x and y locations
50+
GraphManager::VertexIterator vi, vi_end;
51+
GraphManager &gm = GraphManager::getInstance();
52+
for (boost::tie(vi, vi_end) = gm.vertices(); vi != vi_end; ++vi) {
53+
assert(*vi < numVertices_);
54+
xloc_[*vi] = gm[*vi].x;
55+
yloc_[*vi] = gm[*vi].y;
56+
}
57+
58+
// Now we cache the between each pair of vertices distances^2 into a matrix
59+
for (int n = 0; n < numVertices_ - 1; n++) {
60+
for (int n2 = n + 1; n2 < numVertices_; n2++) {
61+
// distance^2 between two points in point-slope form
62+
dist2_(n, n2) = (xloc_[n] - xloc_[n2]) * (xloc_[n] - xloc_[n2])
63+
+ (yloc_[n] - yloc_[n2]) * (yloc_[n] - yloc_[n2]);
64+
65+
// both points are equidistant from each other
66+
dist2_(n2, n) = dist2_(n, n2);
67+
}
68+
}
69+
70+
// Finally take the square root to get the distances
71+
dist_ = sqrt(dist2_);
72+
}
73+
3274
// Prints out all parameters to logging file.
3375
void Layout911::printParameters() const
3476
{

Simulator/Layouts/NG911/Layout911.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ class Layout911 : public Layout {
5252
/// Register vertex properties with the GraphManager
5353
virtual void registerGraphProperties() override;
5454

55+
/// Loads Layout911 member variables.
56+
/// Registered to OperationManager as Operation::loadParameters
57+
virtual void loadParameters() override;
58+
59+
/// Setup the internal structure of the class.
60+
/// Allocate memories to store all layout state.
61+
virtual void setup() override;
62+
5563
/// Prints out all parameters to logging file.
5664
/// Registered to OperationManager as Operation::printParameters
5765
virtual void printParameters() const override;

0 commit comments

Comments
 (0)