CMS 3D CMS Logo

FunctorTask.h
Go to the documentation of this file.
1 #ifndef FWCore_Concurrency_FunctorTask_h
2 #define FWCore_Concurrency_FunctorTask_h
3 // -*- C++ -*-
4 //
5 // Package: Concurrency
6 // Class : FunctorTask
7 //
15 //
16 // Original Author: Chris Jones
17 // Created: Thu Feb 21 13:46:31 CST 2013
18 // $Id$
19 //
20 
21 // system include files
22 #include <atomic>
23 #include <exception>
24 #include <memory>
25 
26 // user include files
28 
29 // forward declarations
30 
31 namespace edm {
32  template <typename F>
33  class FunctorTask : public TaskBase {
34  public:
35  explicit FunctorTask(F f) : func_(std::move(f)) {}
36 
37  void execute() final { func_(); };
38 
39  private:
40  F func_;
41  };
42 
43  template <typename F>
45  return new FunctorTask<F>(std::move(f));
46  }
47 } // namespace edm
48 
49 #endif
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::FunctorTask::func_
F func_
Definition: FunctorTask.h:37
edm::TaskBase
Definition: TaskBase.h:31
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
edm::make_functor_task
FunctorTask< F > * make_functor_task(F f)
Definition: FunctorTask.h:44
edm::FunctorTask::FunctorTask
FunctorTask(F f)
Definition: FunctorTask.h:35
edm::FunctorTask::execute
void execute() final
Definition: FunctorTask.h:37
edm::FunctorTask
Definition: FunctorTask.h:33
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
TaskBase.h