STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Concurrency::location Class Reference

An abstraction of a physical location on hardware. More...

#include <concrt.h>

Public Types

enum  _Type { _System, _NumaNode, _SchedulingNode, _ExecutionResource }
 Describes the type of the given location. More...
 

Public Member Functions

 location ()
 Constructs a location object. More...
 
 location (const location &_Src)
 Constructs a location object. More...
 
locationoperator= (const location &_Rhs)
 Assigns the contents of a different location object to this one. More...
 
 ~location ()
 Destroys a location object. More...
 
bool operator== (const location &_Rhs) const
 Determines whether two location objects represent the same location. More...
 
bool operator!= (const location &_Rhs) const
 Determines whether two location objects represent different location. More...
 
 location (_Type _LocationType, unsigned int _Id, unsigned int _BindingId=0, _Inout_opt_ void *_PBinding=NULL)
 Constructs a specific location. More...
 
bool _FastVPIntersects (const location &_Rhs) const
 Determines whether two locations have an intersection. This is a fast intersection which avoids certain checks by knowing that the this pointer is a virtual processor location for a validly bound virtual processor. More...
 
bool _FastNodeIntersects (const location &_Rhs) const
 Determines whether two locations have an intersection. This is a fast intersection which avoids certain checks by knowing that the this pointer is a node for a validly bound node. More...
 
void _Assign (const location &_Rhs)
 Assigns _Rhs to this location. More...
 
bool _Is_system () const
 Internal routine that tells whether a location represents the "system location". This indicates no specific placement. More...
 
template<typename _Ty >
_Ty * _As () const
 Returns the internal binding as a specified object. More...
 
unsigned int _GetId () const
 Returns the ID which this location object represents. More...
 
_Type _GetType () const
 Returns the type which this location object represents. More...
 
unsigned int _GetBindingId () const
 Gets the binding ID for this location. More...
 

Static Public Member Functions

static _CONCRTIMP location __cdecl current ()
 Returns a location object representing the most specific place the calling thread is executing. More...
 
static _CONCRTIMP location __cdecl _Current_node ()
 Returns a location representing the scheduling node that the calling thread is executing. More...
 

Private Attributes

unsigned int _M_type: 28
 
unsigned int _M_reserved: 4
 
unsigned int _M_bindingId
 
union {
   unsigned int   _M_id
 
   void *   _M_ptr
 
}; 
 
void_M_pBinding
 

Detailed Description

An abstraction of a physical location on hardware.

Member Enumeration Documentation

Describes the type of the given location.

Enumerator
_System 

Indicates that the location represents the "system location". This has no specific affinity.

_NumaNode 

Indicates that the location represents a particular NUMA node.

_SchedulingNode 

Indicates that the location represents a particular scheduling node.

_ExecutionResource 

Indicates that the location represents a particular execution resource.

1941  {
1945  _System, // _M_id is meaningless
1946 
1950  _NumaNode, // _M_id is the Windows NUMA node number
1951 
1955  _SchedulingNode, // _M_id is the unique identifier for the scheduling node
1956 
1960  _ExecutionResource, // _M_id is the unique identifier for the execution resource
1961  };
Indicates that the location represents a particular NUMA node.
Definition: concrt.h:1950
Indicates that the location represents a particular scheduling node.
Definition: concrt.h:1955
Indicates that the location represents a particular execution resource.
Definition: concrt.h:1960
Indicates that the location represents the "system location". This has no specific affinity...
Definition: concrt.h:1945

Constructor & Destructor Documentation

Concurrency::location::location ( )
inline

Constructs a location object.

A default constructed location represents the system as a whole.

1836  :
1837  _M_type(_System),
1838  _M_reserved(0),
1839  _M_bindingId(0),
1840  _M_pBinding(NULL),
1841  _M_ptr(NULL)
1842  {
1843  }
#define NULL
Definition: vcruntime.h:236
unsigned int _M_reserved
Definition: concrt.h:2062
void * _M_pBinding
Definition: concrt.h:2079
unsigned int _M_type
Definition: concrt.h:2059
void * _M_ptr
Definition: concrt.h:2074
Indicates that the location represents the "system location". This has no specific affinity...
Definition: concrt.h:1945
unsigned int _M_bindingId
Definition: concrt.h:2065
Concurrency::location::location ( const location _Src)
inline

Constructs a location object.

1850  {
1851  _Assign(_Src);
1852  }
void _Assign(const location &_Rhs)
Assigns _Rhs to this location.
Definition: concrt.h:1999
Concurrency::location::~location ( )
inline

Destroys a location object.

1897  {
1898  }
Concurrency::location::location ( _Type  _LocationType,
unsigned int  _Id,
unsigned int  _BindingId = 0,
_Inout_opt_ void _PBinding = NULL 
)

Constructs a specific location.

Member Function Documentation

template<typename _Ty >
_Ty* Concurrency::location::_As ( ) const
inline

Returns the internal binding as a specified object.

2025  {
2026  return reinterpret_cast<_Ty *>(_M_pBinding);
2027  }
void * _M_pBinding
Definition: concrt.h:2079
void Concurrency::location::_Assign ( const location _Rhs)
inline

Assigns _Rhs to this location.

2000  {
2001  _M_type = _Rhs._M_type;
2002  _M_reserved = _Rhs._M_reserved;
2003 
2004  _M_ptr = _Rhs._M_ptr;
2005 
2006  _M_bindingId = _Rhs._M_bindingId;
2007  _M_pBinding = _Rhs._M_pBinding;
2008  }
unsigned int _M_reserved
Definition: concrt.h:2062
void * _M_pBinding
Definition: concrt.h:2079
unsigned int _M_type
Definition: concrt.h:2059
void * _M_ptr
Definition: concrt.h:2074
unsigned int _M_bindingId
Definition: concrt.h:2065
static _CONCRTIMP location __cdecl Concurrency::location::_Current_node ( )
static

Returns a location representing the scheduling node that the calling thread is executing.

bool Concurrency::location::_FastNodeIntersects ( const location _Rhs) const

Determines whether two locations have an intersection. This is a fast intersection which avoids certain checks by knowing that the this pointer is a node for a validly bound node.

Parameters
_RhsThe location to intersect with this.
Returns
An indication as to whether the two locations intersect.
bool Concurrency::location::_FastVPIntersects ( const location _Rhs) const

Determines whether two locations have an intersection. This is a fast intersection which avoids certain checks by knowing that the this pointer is a virtual processor location for a validly bound virtual processor.

Parameters
_RhsThe location to intersect with this.
Returns
An indication as to whether the two locations intersect.
unsigned int Concurrency::location::_GetBindingId ( ) const
inline

Gets the binding ID for this location.

2052  {
2053  return _M_bindingId;
2054  }
unsigned int _M_bindingId
Definition: concrt.h:2065
unsigned int Concurrency::location::_GetId ( ) const
inline

Returns the ID which this location object represents.

2034  {
2035  return _M_id;
2036  }
unsigned int _M_id
Definition: concrt.h:2071
_Type Concurrency::location::_GetType ( ) const
inline

Returns the type which this location object represents.

2043  {
2044  return (_Type)_M_type;
2045  }
unsigned int _M_type
Definition: concrt.h:2059
_Type
Describes the type of the given location.
Definition: concrt.h:1940
bool Concurrency::location::_Is_system ( ) const
inline

Internal routine that tells whether a location represents the "system location". This indicates no specific placement.

2015  {
2016  return (_Type)_M_type == _System;
2017  }
unsigned int _M_type
Definition: concrt.h:2059
_Type
Describes the type of the given location.
Definition: concrt.h:1940
Indicates that the location represents the "system location". This has no specific affinity...
Definition: concrt.h:1945
static _CONCRTIMP location __cdecl Concurrency::location::current ( )
static

Returns a location object representing the most specific place the calling thread is executing.

Returns
A location representing the most specific place the calling thread is executing.
bool Concurrency::location::operator!= ( const location _Rhs) const
inline

Determines whether two location objects represent different location.

Returns
true if the two locations are different, false otherwise.
1920  {
1921  return !operator==(_Rhs);
1922  }
bool operator==(const location &_Rhs) const
Determines whether two location objects represent the same location.
Definition: concrt.h:1907
location& Concurrency::location::operator= ( const location _Rhs)
inline

Assigns the contents of a different location object to this one.

Parameters
_RhsThe source location object.
1887  {
1888  _Assign(_Rhs);
1889  return *this;
1890  }
void _Assign(const location &_Rhs)
Assigns _Rhs to this location.
Definition: concrt.h:1999
bool Concurrency::location::operator== ( const location _Rhs) const
inline

Determines whether two location objects represent the same location.

Returns
true if the two locations are identical, and false otherwise.
1908  {
1909  return (_M_type == _Rhs._M_type && _M_ptr == _Rhs._M_ptr);
1910  }
unsigned int _M_type
Definition: concrt.h:2059
void * _M_ptr
Definition: concrt.h:2074

Member Data Documentation

union { ... }
unsigned int Concurrency::location::_M_bindingId
private
unsigned int Concurrency::location::_M_id
void* Concurrency::location::_M_pBinding
private
void* Concurrency::location::_M_ptr
unsigned int Concurrency::location::_M_reserved
private
unsigned int Concurrency::location::_M_type
private

The documentation for this class was generated from the following file: