CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
tensorflow::NoThreadPool Class Reference

#include <NoThreadPool.h>

Inheritance diagram for tensorflow::NoThreadPool:

Public Member Functions

void Cancel () override
 
int CurrentThreadId () const override
 
int GetNumScheduleCalled ()
 
 NoThreadPool ()
 
int NumThreads () const override
 
void Schedule (std::function< void()> fn) override
 
void ScheduleWithHint (std::function< void()> fn, int start, int end) override
 

Static Public Member Functions

static NoThreadPoolinstance ()
 

Private Attributes

std::atomic< int > numScheduleCalled_
 

Detailed Description

Definition at line 20 of file NoThreadPool.h.

Constructor & Destructor Documentation

tensorflow::NoThreadPool::NoThreadPool ( )
inlineexplicit

Definition at line 27 of file NoThreadPool.h.

27 : numScheduleCalled_(0) {}
std::atomic< int > numScheduleCalled_
Definition: NoThreadPool.h:45

Member Function Documentation

void tensorflow::NoThreadPool::Cancel ( )
inlineoverride

Definition at line 36 of file NoThreadPool.h.

36 {}
int tensorflow::NoThreadPool::CurrentThreadId ( ) const
inlineoverride

Definition at line 40 of file NoThreadPool.h.

40 { return -1; }
int tensorflow::NoThreadPool::GetNumScheduleCalled ( )
inline

Definition at line 42 of file NoThreadPool.h.

References numScheduleCalled_.

42 { return numScheduleCalled_; }
std::atomic< int > numScheduleCalled_
Definition: NoThreadPool.h:45
static NoThreadPool& tensorflow::NoThreadPool::instance ( )
inlinestatic

Definition at line 22 of file NoThreadPool.h.

References CMS_THREAD_SAFE, and submitPVResolutionJobs::pool.

Referenced by tensorflow::run().

22  {
24  return pool;
25  }
#define CMS_THREAD_SAFE
int tensorflow::NoThreadPool::NumThreads ( ) const
inlineoverride

Definition at line 38 of file NoThreadPool.h.

38 { return 1; }
void tensorflow::NoThreadPool::Schedule ( std::function< void()>  fn)
inlineoverride

Definition at line 29 of file NoThreadPool.h.

References personalPlayback::fn, and numScheduleCalled_.

Referenced by ScheduleWithHint().

29  {
30  numScheduleCalled_ += 1;
31  fn();
32  }
std::atomic< int > numScheduleCalled_
Definition: NoThreadPool.h:45
void tensorflow::NoThreadPool::ScheduleWithHint ( std::function< void()>  fn,
int  start,
int  end 
)
inlineoverride

Definition at line 34 of file NoThreadPool.h.

References personalPlayback::fn, and Schedule().

34 { Schedule(fn); }
void Schedule(std::function< void()> fn) override
Definition: NoThreadPool.h:29

Member Data Documentation

std::atomic<int> tensorflow::NoThreadPool::numScheduleCalled_
private

Definition at line 45 of file NoThreadPool.h.

Referenced by GetNumScheduleCalled(), and Schedule().