FreePOOMA  2.4.1
Classes | Public Types | Public Member Functions | Friends
Smarts::DataObject< SerialAsync > Class Template Reference

Implements a asynchronous scheduler for a data driven execution. More...

#include <SerialAsync.h>

List of all members.

Classes

class  Request
 The type for a request.

Public Types

typedef IterateScheduler
< SerialAsync
IterateScheduler_t
typedef Iterate< SerialAsyncIterate_t

Public Member Functions

 DataObject (int affinity=-1)
 Construct the data object with an empty set of requests and the given affinity.
 DataObject (int affinity, IterateScheduler< SerialAsync > &)
 for compatibility with other SMARTS schedulers, accept Scheduler arguments (unused)
int affinity () const
 Stub out affinity because there is no affinity in serial.
void affinity (int)
 Stub out affinity because there is no affinity in serial.
void request (Iterate< SerialAsync > &, SerialAsync::Action)
 An iterate makes a request for a certain action in a certain generation.
void release (SerialAsync::Action)
 An iterate finishes and tells the DataObject it no longer needs it.

Friends

class IterateScheduler< SerialAsync >
class Iterate< SerialAsync >

Detailed Description

template<>
class Smarts::DataObject< SerialAsync >

Implements a asynchronous scheduler for a data driven execution.

The DataObject Class is used introduce a type to represent a resources (normally) blocks of data) that Iterates contend for atomic access. Iterates make request for either a read or write to the DataObjects. DataObjects may grant the request if the object is currently available. Otherwise, the request is enqueue in a queue private to the data object until the DataObject is release by another Iterate. A set of read requests may be granted all at once if there are no intervening write request to that DataObject. DataObject<SerialAsync> is a specialization of DataObject for the policy template SerialAsync.

There are two ways data can be used: to read or to write. Don't change this to give more than two states; things inside depend on that.


Member Typedef Documentation

typedef IterateScheduler<SerialAsync> Smarts::DataObject< SerialAsync >::IterateScheduler_t
typedef Iterate<SerialAsync> Smarts::DataObject< SerialAsync >::Iterate_t

Constructor & Destructor Documentation

Smarts::DataObject< SerialAsync >::DataObject ( int  affinity = -1) [inline]

Construct the data object with an empty set of requests and the given affinity.

Smarts::DataObject< SerialAsync >::DataObject ( int  affinity,
IterateScheduler< SerialAsync > &   
) [inline]

for compatibility with other SMARTS schedulers, accept Scheduler arguments (unused)


Member Function Documentation

int Smarts::DataObject< SerialAsync >::affinity ( ) const [inline]

Stub out affinity because there is no affinity in serial.

void Smarts::DataObject< SerialAsync >::affinity ( int  ) [inline]

Stub out affinity because there is no affinity in serial.

void Smarts::DataObject< SerialAsync >::request ( Iterate< SerialAsync > &  it,
SerialAsync::Action  act 
) [inline]

An iterate makes a request for a certain action in a certain generation.

void DataObject::request(Iterate&, action) An iterate makes a reservation with this DataObject for a given action in a given generation.

The request may be granted immediately.

References Smarts::Iterate< SerialAsync >::notifications_m, Smarts::Iterate< SerialAsync >::notify(), and Smarts::SerialAsync::Read.

void Smarts::DataObject< SerialAsync >::release ( SerialAsync::Action  ) [inline]

An iterate finishes and tells the DataObject it no longer needs it.

If this is the last release for the current set of requests, have the IterateScheduler release some more.


Friends And Related Function Documentation

friend class IterateScheduler< SerialAsync > [friend]
friend class Iterate< SerialAsync > [friend]

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