Commit 24cf4dc3 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

Fixing (#5), merging 2 activators into 1


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 11139aab
set(LIBRARY_NAME exatn-runtime-executor)
file(GLOB SRC
#*.cpp
ExecutorActivator.cpp
node_executors/talsh/node_executor_talsh.cpp
node_executors/exatensor/node_executor_exatensor.cpp
graph_executors/eager/graph_executor_eager.cpp
......
......@@ -13,10 +13,10 @@ namespace {
/**
*/
class US_ABI_LOCAL GraphExecutorActivator : public BundleActivator {
class US_ABI_LOCAL ExecutorActivator : public BundleActivator {
public:
GraphExecutorActivator() {}
ExecutorActivator() {}
/**
*/
......@@ -27,6 +27,12 @@ public:
context.RegisterService<exatn::runtime::TensorGraphExecutor>(g1);
context.RegisterService<exatn::runtime::TensorGraphExecutor>(g2);
auto n1 = std::make_shared<exatn::runtime::TalshNodeExecutor>();
auto n2 = std::make_shared<exatn::runtime::ExatensorNodeExecutor>();
context.RegisterService<exatn::runtime::TensorNodeExecutor>(n1);
context.RegisterService<exatn::runtime::TensorNodeExecutor>(n2);
}
/**
......@@ -36,4 +42,4 @@ public:
} // namespace
CPPMICROSERVICES_EXPORT_BUNDLE_ACTIVATOR(GraphExecutorActivator)
CPPMICROSERVICES_EXPORT_BUNDLE_ACTIVATOR(ExecutorActivator)
#include "node_executor_talsh.hpp"
#include "node_executor_exatensor.hpp"
#include "cppmicroservices/BundleActivator.h"
#include "cppmicroservices/BundleContext.h"
#include <memory>
#include <set>
using namespace cppmicroservices;
namespace {
/**
*/
class US_ABI_LOCAL NodeExecutorActivator : public BundleActivator {
public:
NodeExecutorActivator() {}
/**
*/
void Start(BundleContext context) {
auto g1 = std::make_shared<exatn::runtime::TalshNodeExecutor>();
auto g2 = std::make_shared<exatn::runtime::ExatensorNodeExecutor>();
context.RegisterService<exatn::runtime::TensorNodeExecutor>(g1);
context.RegisterService<exatn::runtime::TensorNodeExecutor>(g2);
}
/**
*/
void Stop(BundleContext /*context*/) {}
};
} // namespace
CPPMICROSERVICES_EXPORT_BUNDLE_ACTIVATOR(NodeExecutorActivator)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment