Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow refactoring #270

Merged
merged 40 commits into from
Dec 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0766929
Excise JMultithreading
nathanwbrei Oct 24, 2023
74eb7b1
Move backoff strategy from JArrow to JWorker
nathanwbrei Nov 10, 2023
cdab575
Fix JArrowPerfSummary table output
nathanwbrei Nov 11, 2023
5b13c65
Generalize JEventPool
nathanwbrei Nov 13, 2023
2a5e9cb
Queues and pools pass around pointers instead of values
nathanwbrei Nov 13, 2023
7cda493
Add JPipelineArrow
nathanwbrei Nov 13, 2023
ba9a491
Add Arrow test cases
nathanwbrei Nov 13, 2023
04e2610
Update block and subevent arrows
nathanwbrei Nov 29, 2023
e62eb61
Tests pass again
nathanwbrei Nov 30, 2023
3919f82
JEventProcessorArrow delegates to JPipelineArrow
nathanwbrei Dec 2, 2023
234bccd
JEventSourceArrow delegates to JPipelineArrow
nathanwbrei Dec 2, 2023
d25c25e
JPipelineArrow: Separate 'status' from 'success'
nathanwbrei Dec 4, 2023
235bda5
Excise redundant PerformanceTest
nathanwbrei Dec 4, 2023
dce0de1
Migrate SourceArrow, SinkArrow to JPipelineArrow
nathanwbrei Dec 4, 2023
002ad85
Excise SourceArrow, SinkArrow
nathanwbrei Dec 4, 2023
f813e23
JBlockSourceArrow delegates to JPipelineArrow
nathanwbrei Dec 4, 2023
87bee0c
Rough cut of JunctionArrow
nathanwbrei Dec 5, 2023
ea211ba
Add test case for JJunctionArrow
nathanwbrei Dec 6, 2023
888072d
Rough cut of JOmniArrow
nathanwbrei Dec 7, 2023
d6365c9
JMailbox: Add try_push() and pop() to match
nathanwbrei Dec 7, 2023
a2a9e95
Create JQueue base class
nathanwbrei Dec 7, 2023
78dc4b0
Update QueueTests
nathanwbrei Dec 7, 2023
e863436
Flesh out reserve semantics in PipelineArrow
nathanwbrei Dec 7, 2023
bf1be32
Improve naming inside JMailbox
nathanwbrei Dec 7, 2023
be29ee7
Base class for JPools
nathanwbrei Dec 7, 2023
d0c3b90
Fix PipelineArrow unreserve logic
nathanwbrei Dec 7, 2023
a24cd8f
Excise JArrowTopology::sources
nathanwbrei Dec 7, 2023
e6115bb
Excise JArrowTopology::sinks
nathanwbrei Dec 7, 2023
90d4fd1
Replace JArrow::NodeType with is_source, is_sink
nathanwbrei Dec 7, 2023
7a33cf0
Bugfix: JMailbox reserved_count logic
nathanwbrei Dec 7, 2023
50b7ab4
Move Data, PlaceRef into JArrow
nathanwbrei Dec 7, 2023
0205b1d
PlaceRef now registers itself with JArrow
nathanwbrei Dec 7, 2023
4447bf6
Generic JArrow::get_pending()
nathanwbrei Dec 7, 2023
3836c18
JPipelineArrow uses PlaceRef's
nathanwbrei Dec 7, 2023
0499f39
Slow progress towards JOmniArrow
nathanwbrei Dec 11, 2023
51248b0
Excise SubeventMailbox
nathanwbrei Dec 11, 2023
6c4a681
Add missing include
nathanwbrei Dec 27, 2023
3b77b2d
Fix BlockExample
nathanwbrei Dec 27, 2023
0edfcf8
Fix JMergeArrow
nathanwbrei Dec 28, 2023
560727c
Excise JOmniArrow
nathanwbrei Dec 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Excise SubeventMailbox
  • Loading branch information
nathanwbrei committed Dec 27, 2023
commit 51248b035a572b3b66df75594498b38bf261c586
1 change: 0 additions & 1 deletion src/examples/SubeventExample/SubeventExample.cc
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@

#include <JANA/JApplication.h>
#include <JANA/JObject.h>
#include <JANA/Engine/JSubeventMailbox.h>
#include <JANA/Engine/JSubeventArrow.h>
#include <JANA/JEventSource.h>
#include <JANA/JEventProcessor.h>
17 changes: 16 additions & 1 deletion src/libraries/JANA/Engine/JSubeventArrow.h
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
#include "JArrow.h"
#include <JANA/JEvent.h>

/// SubtaskProcessor offers sub-event-level parallelism. The idea is to split parent
/// SubeventProcessor offers sub-event-level parallelism. The idea is to split parent
/// event S into independent subtasks T, and automatically bundling them with
/// bookkeeping information X onto a Queue<pair<T,X>. process :: T -> U handles the stateless,
/// parallel parts; its Arrow pushes messages on to a Queue<pair<U,X>, so that merge() :: S -> [U] -> V
@@ -36,6 +36,21 @@ struct JSubeventProcessor {

};

template <typename SubeventT>
struct SubeventWrapper {

std::shared_ptr<JEvent>* parent;
SubeventT* data;
size_t id;
size_t total;

SubeventWrapper(std::shared_ptr<JEvent>* parent, SubeventT* data, size_t id, size_t total)
: parent(std::move(parent))
, data(data)
, id(id)
, total(total) {}
};


template <typename InputT, typename OutputT>
class JSubeventArrow : public JArrow {
226 changes: 0 additions & 226 deletions src/libraries/JANA/Engine/JSubeventMailbox.h

This file was deleted.

5 changes: 2 additions & 3 deletions src/programs/unit_tests/SubeventTests.cc
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@

#include <JANA/JObject.h>
#include <JANA/JEvent.h>
#include <JANA/Engine/JSubeventMailbox.h>
#include <JANA/Engine/JSubeventArrow.h>
#include "JANA/Engine/JArrowTopology.h"
#include "JANA/Engine/JTopologyBuilder.h"
@@ -42,7 +41,7 @@ TEST_CASE("Create subevent processor") {
REQUIRE(output->z == 29.6f);
}


#if 0
TEST_CASE("Simplest working SubeventMailbox") {

std::vector<SubeventWrapper<MyOutput>> unmerged;
@@ -123,7 +122,7 @@ TEST_CASE("SubeventMailbox with two overlapping events") {
auto items_in_event = (*(merged[0]))->Get<MyOutput>();
REQUIRE(items_in_event.size() == 4);
}

#endif

TEST_CASE("Basic subevent arrow functionality") {

Loading