Skip to content

Commit 7288f02

Browse files
committedApr 3, 2015
Merge remote-tracking branch 'pinkavaj/clear-int-00'
Conflicts: volk
2 parents 92cecef + 5c56ab7 commit 7288f02

File tree

8 files changed

+27
-26
lines changed

8 files changed

+27
-26
lines changed
 

‎gnuradio-runtime/include/gnuradio/fxpt.h

+10-9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <gnuradio/api.h>
2727
#include <gnuradio/types.h>
28+
#include <stdint.h>
2829

2930
namespace gr {
3031

@@ -47,18 +48,18 @@ namespace gr {
4748
static const float TWO_TO_THE_31;
4849

4950
public:
50-
static gr_int32
51+
static int32_t
5152
float_to_fixed(float x)
5253
{
5354
// Fold x into -PI to PI.
5455
int d = (int)floor(x/2/PI+0.5);
5556
x -= d*2*PI;
5657
// And convert to an integer.
57-
return (gr_int32) ((float) x * TWO_TO_THE_31 / PI);
58+
return (int32_t) ((float) x * TWO_TO_THE_31 / PI);
5859
}
5960

6061
static float
61-
fixed_to_float (gr_int32 x)
62+
fixed_to_float (int32_t x)
6263
{
6364
return x * (PI / TWO_TO_THE_31);
6465
}
@@ -67,9 +68,9 @@ namespace gr {
6768
* \brief Given a fixed point angle x, return float sine (x)
6869
*/
6970
static float
70-
sin(gr_int32 x)
71+
sin(int32_t x)
7172
{
72-
gr_uint32 ux = x;
73+
uint32_t ux = x;
7374
int index = ux >> (WORDBITS - NBITS);
7475
return s_sine_table[index][0] * (ux >> 1) + s_sine_table[index][1];
7576
}
@@ -78,19 +79,19 @@ namespace gr {
7879
* \brief Given a fixed point angle x, return float cosine (x)
7980
*/
8081
static float
81-
cos (gr_int32 x)
82+
cos (int32_t x)
8283
{
83-
gr_uint32 ux = x + 0x40000000;
84+
uint32_t ux = x + 0x40000000;
8485
int index = ux >> (WORDBITS - NBITS);
8586
return s_sine_table[index][0] * (ux >> 1) + s_sine_table[index][1];
8687
}
8788

8889
/*
8990
* \brief Given a fixedpoint angle x, return float cos(x) and sin (x)
9091
*/
91-
static void sincos(gr_int32 x, float *s, float *c)
92+
static void sincos(int32_t x, float *s, float *c)
9293
{
93-
gr_uint32 ux = x;
94+
uint32_t ux = x;
9495
int sin_index = ux >> (WORDBITS - NBITS);
9596
*s = s_sine_table[sin_index][0] * (ux >> 1) + s_sine_table[sin_index][1];
9697

‎gnuradio-runtime/include/gnuradio/fxpt_vco.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace gr {
3434
* \ingroup misc
3535
*/
3636
class /*GR_RUNTIME_API*/ fxpt_vco {
37-
gr_int32 d_phase;
37+
int32_t d_phase;
3838

3939
public:
4040
fxpt_vco () : d_phase(0) {}

‎gnuradio-runtime/lib/math/qa_fxpt.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ qa_fxpt::t0()
5151
* sometimes the answer is off by a few bits at the bottom.
5252
* Hence, the disabled check.
5353
*/
54-
CPPUNIT_ASSERT_EQUAL((gr_int32)0x40000000, gr::fxpt::float_to_fixed(M_PI/2));
55-
CPPUNIT_ASSERT_EQUAL((gr_int32)0, gr::fxpt::float_to_fixed(0));
56-
CPPUNIT_ASSERT_EQUAL((gr_int32)0x80000000, gr::fxpt::float_to_fixed(-M_PI));
54+
CPPUNIT_ASSERT_EQUAL((int32_t)0x40000000, gr::fxpt::float_to_fixed(M_PI/2));
55+
CPPUNIT_ASSERT_EQUAL((int32_t)0, gr::fxpt::float_to_fixed(0));
56+
CPPUNIT_ASSERT_EQUAL((int32_t)0x80000000, gr::fxpt::float_to_fixed(-M_PI));
5757
}
5858
}
5959

‎gr-analog/lib/frequency_modulator_fc_impl.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace gr {
7070

7171
float oi, oq;
7272

73-
gr_int32 angle = gr::fxpt::float_to_fixed (d_phase);
73+
int32_t angle = gr::fxpt::float_to_fixed (d_phase);
7474
gr::fxpt::sincos(angle, &oq, &oi);
7575
out[i] = gr_complex(oi, oq);
7676
}

‎gr-atsc/include/gnuradio/atsc/field_sync_demux.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ class ATSC_API atsc_field_sync_demux : public gr::block
6363
bool d_locked;
6464
bool d_in_field2;
6565
int d_segment_number;
66-
gr_uint64 d_next_input;
67-
gr_uint64 d_lost_index; // diagnostic fluff
66+
uint64_t d_next_input;
67+
uint64_t d_lost_index; // diagnostic fluff
6868

6969
unsigned long long d_inputs0_index; // for inputs[0].index
7070
unsigned long d_inputs0_size; // for inputs[0].size

‎gr-audio/lib/alsa/alsa_sink.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ namespace gr {
330330
gr_vector_const_void_star &input_items,
331331
gr_vector_void_star &output_items)
332332
{
333-
typedef gr_int16 sample_t; // the type of samples we're creating
333+
typedef int16_t sample_t; // the type of samples we're creating
334334
static const float scale_factor = std::pow(2.0f, 16-1) - 1;
335335

336336
unsigned int nchan = input_items.size();
@@ -370,7 +370,7 @@ namespace gr {
370370
gr_vector_const_void_star &input_items,
371371
gr_vector_void_star &output_items)
372372
{
373-
typedef gr_int32 sample_t; // the type of samples we're creating
373+
typedef int32_t sample_t; // the type of samples we're creating
374374
static const float scale_factor = std::pow(2.0f, 32-1) - 1;
375375

376376
unsigned int nchan = input_items.size();
@@ -411,7 +411,7 @@ namespace gr {
411411
gr_vector_const_void_star &input_items,
412412
gr_vector_void_star &output_items)
413413
{
414-
typedef gr_int16 sample_t; // the type of samples we're creating
414+
typedef int16_t sample_t; // the type of samples we're creating
415415
static const float scale_factor = std::pow(2.0f, 16-1) - 1;
416416

417417
assert(input_items.size () == 1);
@@ -452,7 +452,7 @@ namespace gr {
452452
gr_vector_const_void_star &input_items,
453453
gr_vector_void_star &output_items)
454454
{
455-
typedef gr_int32 sample_t; // the type of samples we're creating
455+
typedef int32_t sample_t; // the type of samples we're creating
456456
static const float scale_factor = std::pow(2.0f, 32-1) - 1;
457457

458458
assert(input_items.size () == 1);

‎gr-audio/lib/alsa/alsa_source.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ namespace gr {
310310
gr_vector_const_void_star &input_items,
311311
gr_vector_void_star &output_items)
312312
{
313-
typedef gr_int16 sample_t; // the type of samples we're creating
313+
typedef int16_t sample_t; // the type of samples we're creating
314314
static const float scale_factor = 1.0 / std::pow(2.0f, 16-1);
315315

316316
unsigned int nchan = output_items.size ();
@@ -348,7 +348,7 @@ namespace gr {
348348
gr_vector_const_void_star &input_items,
349349
gr_vector_void_star &output_items)
350350
{
351-
typedef gr_int16 sample_t; // the type of samples we're creating
351+
typedef int16_t sample_t; // the type of samples we're creating
352352
static const float scale_factor = 1.0 / std::pow(2.0f, 16-1);
353353

354354
float **out = (float**)&output_items[0];
@@ -385,7 +385,7 @@ namespace gr {
385385
gr_vector_const_void_star &input_items,
386386
gr_vector_void_star &output_items)
387387
{
388-
typedef gr_int32 sample_t; // the type of samples we're creating
388+
typedef int32_t sample_t; // the type of samples we're creating
389389
static const float scale_factor = 1.0 / std::pow(2.0f, 32-1);
390390

391391
unsigned int nchan = output_items.size ();
@@ -423,7 +423,7 @@ namespace gr {
423423
gr_vector_const_void_star &input_items,
424424
gr_vector_void_star &output_items)
425425
{
426-
typedef gr_int32 sample_t; // the type of samples we're creating
426+
typedef int32_t sample_t; // the type of samples we're creating
427427
static const float scale_factor = 1.0 / std::pow(2.0f, 32-1);
428428

429429
float **out = (float**)&output_items[0];

‎gr-pager/lib/flex_parse_impl.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace gr {
4343

4444
flex_parse_impl::flex_parse_impl(msg_queue::sptr queue, float freq) :
4545
sync_block("flex_parse",
46-
io_signature::make(1, 1, sizeof(gr_int32)),
46+
io_signature::make(1, 1, sizeof(int32_t)),
4747
io_signature::make(0, 0, 0)),
4848
d_queue(queue),
4949
d_freq(freq)
@@ -59,7 +59,7 @@ namespace gr {
5959
gr_vector_const_void_star &input_items,
6060
gr_vector_void_star &output_items)
6161
{
62-
const gr_int32 *in = (const gr_int32 *)input_items[0];
62+
const int32_t *in = (const int32_t *)input_items[0];
6363

6464
int i = 0;
6565
while(i < noutput_items) {

0 commit comments

Comments
 (0)
Please sign in to comment.