Skip to content

Commit

Permalink
Excise SubeventMailbox
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed Dec 27, 2023
1 parent 0499f39 commit 51248b0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 231 deletions.
1 change: 0 additions & 1 deletion src/examples/SubeventExample/SubeventExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
17 changes: 16 additions & 1 deletion src/libraries/JANA/Engine/JSubeventArrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
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
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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") {

Expand Down

0 comments on commit 51248b0

Please sign in to comment.