RaftLib
0.3a
C++ Stream Processing Template Library
|
Public Member Functions | |
stdalloc (Map &map, volatile bool &exit_alloc) | |
virtual | ~stdalloc () |
virtual void | run () |
![]() | |
Allocate (Map &map, volatile bool &exit_alloc) | |
virtual | ~Allocate () |
void | waitTillReady () |
Additional Inherited Members | |
![]() | |
void | initialize (PortInfo *const src, PortInfo *const dst, FIFO *const fifo) |
virtual void | allocate (PortInfo &a, PortInfo &b, void *data) |
void | setReady () |
![]() | |
kernelkeeper & | source_kernels |
kernelkeeper & | all_kernels |
std::set< FIFO * > | allocated_fifo |
volatile bool & | exit_alloc |
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.
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.
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.
|
virtual |
destructor, doesn't really do much at he moment.
|
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.