Skip to content
Snippets Groups Projects
Commit b9d2a652 authored by Giovanna Lazzari Miotto's avatar Giovanna Lazzari Miotto :mushroom:
Browse files

nmc: Dummy code for NMC resource allocation

parent abd0cc01
No related branches found
No related tags found
No related merge requests found
Pipeline #11083536 failed
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <boost/bind/bind.hpp> #include <boost/bind/bind.hpp>
#include <boost/thread.hpp> #include <boost/thread.hpp>
#include "micron/nmc.h"
#include "micron/nmc.hpp"
#include "server.h" #include "server.h"
#include "tbb/task_group.h" #include "tbb/task_group.h"
#include "tbb/task_scheduler_init.h" #include "tbb/task_scheduler_init.h"
...@@ -23,6 +25,21 @@ MultiPipeline::MultiPipeline(Config c) ...@@ -23,6 +25,21 @@ MultiPipeline::MultiPipeline(Config c)
server_thread_ = boost::thread(boost::bind(&boost::asio::io_service::run, &io_service_)); server_thread_ = boost::thread(boost::bind(&boost::asio::io_service::run, &io_service_));
} }
nmc_status_t default_status = NMC_NO_MEM;
Nmc default_nmc(&default_status);
if (default_status != 0) {
LOG(FATAL) << "Failed to allocate default NMC resources";
}
nmc_status_t nmc_status = NMC_NO_MEM;
NmcAttachProps nmc_properties;
Nmc prop_nmc(nmc_properties, &nmc_status);
if (nmc_status) {
LOG(FATAL) << "Failed to allocate NMC resources";
}
uint32_t transf_engine_thread_count = nmc_properties.getTeTotalThreadCount();
LOG(INFO) << "Number of TE threads: " << transf_engine_thread_count;
MakePipelines(); MakePipelines();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment