RaftLib  0.3a
C++ Stream Processing Template Library
Public Member Functions | List of all members
stdalloc Class Reference
Inheritance diagram for stdalloc:
[legend]
Collaboration diagram for stdalloc:
[legend]

Public Member Functions

 stdalloc (Map &map, volatile bool &exit_alloc)
 
virtual ~stdalloc ()
 
virtual void run ()
 
- Public Member Functions inherited from Allocate
 Allocate (Map &map, volatile bool &exit_alloc)
 
virtual ~Allocate ()
 
void waitTillReady ()
 

Additional Inherited Members

- Protected Member Functions inherited from Allocate
void initialize (PortInfo *const src, PortInfo *const dst, FIFO *const fifo)
 
virtual void allocate (PortInfo &a, PortInfo &b, void *data)
 
void setReady ()
 
- Protected Attributes inherited from Allocate
kernelkeeper & source_kernels
 
kernelkeeper & all_kernels
 
std::set< FIFO * > allocated_fifo
 
volatile bool & exit_alloc
 

Constructor & Destructor Documentation

stdalloc::stdalloc ( Map map,
volatile bool &  exit_alloc 
)

stdalloc - default constructor, calls base allocate constructor of Allcoate which sets the map object. After setting this object loose in a thread, the notReady() function must be called so that the queue sees fully allocated buffers as opposed ot null objects.

Parameters
map- Map&, map with full application
exit_alloc- bool whose value is set by the map object owning this one. Controls when the loop within the run thread is exited.

stdalloc.cpp - simple allocation, just initializes the FIFO with a fixed size buffer (512 items) with an alignment of 16-bytes. This can easily be changed by changing the constants below.

Author
: Jonathan Beard
Version
: Sat Sep 20 19:56:49 2014

Copyright 2014 Jonathan Beard

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

stdalloc::~stdalloc ( )
virtual

destructor, doesn't really do much at he moment.

Member Function Documentation

void stdalloc::run ( )
virtual

run - call within a thread, internally we could have a loop before exiting but this version simply allocates and exits.

assume everyone needs a heap for the moment to get working

check and see if a has a defined allocation

check for pre-existing alloc size for test purposes

size

align

Implements Allocate.

Here is the call graph for this function:


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