Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkOpenCLActivator.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #include "mitkOpenCLActivator.h"
14 
15 void OpenCLActivator::Load(us::ModuleContext *context)
16 {
17  // generate context
18  m_ResourceService.reset(new OclResourceServiceImpl);
20 
21  context->RegisterService<OclResourceService>(m_ResourceService.get(), props);
22 }
23 
24 void OpenCLActivator::Unload(us::ModuleContext *)
25 {
26  m_ResourceService.release();
27 }
28 
void Load(us::ModuleContext *context)
Load module context.
void Unload(us::ModuleContext *)
Unload module context.
Custom activator for the OpenCL Module in order to register and provide the OclResourceService.
US_UNORDERED_MAP_TYPE< std::string, Any > ServiceProperties
#define US_EXPORT_MODULE_ACTIVATOR(_activator_type)
Export a module activator class.
Declaration of the OpenCL Resources micro-service.