GNU Radio's LFAST Package
CC2F2ByteVector_impl.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2017 ghostop14.
4 *
5 * This is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3, or (at your option)
8 * any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this software; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#ifndef INCLUDED_TESTTIMING_CC2F2BYTEVECTOR_IMPL_H
22#define INCLUDED_TESTTIMING_CC2F2BYTEVECTOR_IMPL_H
23
25#include <boost/thread/thread.hpp>
26
27#define LF_MAX_THREADS 8
28
29namespace gr {
30 namespace lfast {
31
33 {
34 protected:
36 int d_vlen;
37
38 boost::thread *threads[LF_MAX_THREADS];
42 const gr_complex *inBuffer;
43 char *outBuffer;
44
47
49
50 boost::mutex d_mutex;
51
52 float min_val = -128;
53 float max_val = 127;
54
55 float *floatBuff = NULL;
57
58 void processItems(int threadIndex);
59
60 public:
61 CC2F2ByteVector_impl(int scale,int vecLength,int numVecItems);
63 virtual bool stop();
64 void setBufferLength(int numItems);
65
66 // Where all the action really happens
67 int work_original(int noutput_items,
68 gr_vector_const_void_star &input_items,
69 gr_vector_void_star &output_items);
70 int work_test(int noutput_items,
71 gr_vector_const_void_star &input_items,
72 gr_vector_void_star &output_items);
73 int work(int noutput_items,
74 gr_vector_const_void_star &input_items,
75 gr_vector_void_star &output_items);
76 };
77
78 } // namespace testtiming
79} // namespace gr
80
81#endif /* INCLUDED_TESTTIMING_CC2F2BYTEVECTOR_IMPL_H */
82
#define LF_MAX_THREADS
Definition CC2F2ByteVector_impl.h:27
const gr_complex * inBuffer
Definition CC2F2ByteVector_impl.h:42
void processItems(int threadIndex)
CC2F2ByteVector_impl(int scale, int vecLength, int numVecItems)
float max_val
Definition CC2F2ByteVector_impl.h:53
bool stopThreads
Definition CC2F2ByteVector_impl.h:48
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
unsigned concurentThreadsSupported
Definition CC2F2ByteVector_impl.h:45
long startIndex[LF_MAX_THREADS]
Definition CC2F2ByteVector_impl.h:41
void setBufferLength(int numItems)
long threadBlockSize[LF_MAX_THREADS]
Definition CC2F2ByteVector_impl.h:40
int d_vlen
Definition CC2F2ByteVector_impl.h:36
char * outBuffer
Definition CC2F2ByteVector_impl.h:43
int d_scale
Definition CC2F2ByteVector_impl.h:35
bool dataReady[LF_MAX_THREADS]
Definition CC2F2ByteVector_impl.h:39
boost::mutex d_mutex
Definition CC2F2ByteVector_impl.h:50
int work_original(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
float * floatBuff
Definition CC2F2ByteVector_impl.h:55
float min_val
Definition CC2F2ByteVector_impl.h:52
int work_test(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
int curBufferSize
Definition CC2F2ByteVector_impl.h:56
boost::thread * threads[LF_MAX_THREADS]
Definition CC2F2ByteVector_impl.h:38
unsigned concurrentMinus1
Definition CC2F2ByteVector_impl.h:46
<+description of block+>
Definition CC2F2ByteVector.h:37
Definition agc.h:30