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) {}

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.

42 { return numScheduleCalled_; }

References numScheduleCalled_.

◆ instance()

static NoThreadPool& tensorflow::NoThreadPool::instance ( )
inlinestatic

Definition at line 22 of file NoThreadPool.h.

22  {
24  return pool;
25  }

References CMS_THREAD_SAFE, and dqmiodatasetharvest::pool.

Referenced by tensorflow::run().

◆ 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.

29  {
30  numScheduleCalled_ += 1;
31  fn();
32  }

References personalPlayback::fn, and numScheduleCalled_.

Referenced by ScheduleWithHint().

◆ ScheduleWithHint()

void tensorflow::NoThreadPool::ScheduleWithHint ( std::function< void()>  fn,
int  start,
int  end 
)
inlineoverride

Definition at line 34 of file NoThreadPool.h.

34 { Schedule(fn); }

References personalPlayback::fn, and Schedule().

Member Data Documentation

◆ numScheduleCalled_

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

Definition at line 45 of file NoThreadPool.h.

Referenced by GetNumScheduleCalled(), and Schedule().

dqmiodatasetharvest.pool
pool
Definition: dqmiodatasetharvest.py:190
tensorflow::NoThreadPool::numScheduleCalled_
std::atomic< int > numScheduleCalled_
Definition: NoThreadPool.h:45
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition: thread_safety_macros.h:4
tensorflow::NoThreadPool::NoThreadPool
NoThreadPool()
Definition: NoThreadPool.h:27
personalPlayback.fn
fn
Definition: personalPlayback.py:515
tensorflow::NoThreadPool::Schedule
void Schedule(std::function< void()> fn) override
Definition: NoThreadPool.h:29