CMS 3D CMS Logo

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

◆ NoThreadPool()

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

◆ Cancel()

void tensorflow::NoThreadPool::Cancel ( )
inlineoverride

Definition at line 36 of file NoThreadPool.h.

36 {}

◆ CurrentThreadId()

int tensorflow::NoThreadPool::CurrentThreadId ( ) const
inlineoverride

Definition at line 40 of file NoThreadPool.h.

40 { return -1; }

◆ GetNumScheduleCalled()

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

◆ instance()

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

◆ NumThreads()

int tensorflow::NoThreadPool::NumThreads ( ) const
inlineoverride

Definition at line 38 of file NoThreadPool.h.

38 { return 1; }

◆ Schedule()

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

◆ ScheduleWithHint()

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

◆ numScheduleCalled_

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

Definition at line 45 of file NoThreadPool.h.

Referenced by GetNumScheduleCalled(), and Schedule().