27b43c6686
We added a new centralized OpenCL Compute manager. This can later be extended to support CUDA, SyCL, etc. SMO can be configured at build time to choose which API it will use for compute. Moreover, the ComputeMgr allows us to register buffers which are available to all cl_contexts.
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
#include <iostream>
|
|
#include <mindManager/mindManager.h>
|
|
#include <deviceManager/deviceManager.h>
|
|
#include <stimBuffApis/stimBuffApiManager.h>
|
|
#include <computeManager/computeManager.h>
|
|
#include <salmanoff.h>
|
|
|
|
|
|
namespace smo {
|
|
|
|
void initializeSalmanoff(void)
|
|
{
|
|
std::cout << __func__ << ": Entered." << std::endl;
|
|
|
|
compute::ComputeManager::getInstance().initialize();
|
|
mind::MindManager::getInstance().initialize();
|
|
stim_buff::StimBuffApiManager::getInstance().initialize();
|
|
device::DeviceManager::getInstance().initialize();
|
|
device::DeviceManager::getInstance().collateAllDapSpecs();
|
|
device::DeviceManager::getInstance().parseAllDapSpecs();
|
|
std::cout << device::DeviceManager::stringifyDeviceSpecs() << std::endl;
|
|
}
|
|
|
|
void shutdownSalmanoff(void)
|
|
{
|
|
std::cout << __func__ << ": Entered." << std::endl;
|
|
device::DeviceManager::getInstance().finalize();
|
|
stim_buff::StimBuffApiManager::getInstance().finalize();
|
|
mind::MindManager::getInstance().finalize();
|
|
compute::ComputeManager::getInstance().finalize();
|
|
}
|
|
|
|
} // namespace smo
|