diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2017-06-22 17:56:05 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-06-22 17:56:05 -0700 |
commit | 99ee660ce3701a33efa1737ae341e5360661f900 (patch) | |
tree | e51580572558e4fad555a999dccdabb37d9ef1e0 /gnuradio-runtime/lib/math/qa_fxpt_vco.cc | |
parent | 1d537a26b27b9d3ce6a3affc6ea500a9efc5a867 (diff) | |
parent | 54e89c6431c249bbe560568d76800fef6a245506 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'gnuradio-runtime/lib/math/qa_fxpt_vco.cc')
-rw-r--r-- | gnuradio-runtime/lib/math/qa_fxpt_vco.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/gnuradio-runtime/lib/math/qa_fxpt_vco.cc b/gnuradio-runtime/lib/math/qa_fxpt_vco.cc index 8ee402fdc1..a406c12c0f 100644 --- a/gnuradio-runtime/lib/math/qa_fxpt_vco.cc +++ b/gnuradio-runtime/lib/math/qa_fxpt_vco.cc @@ -79,9 +79,9 @@ qa_fxpt_vco::t1() { gr::vco<float,float> ref_vco; gr::fxpt_vco new_vco; - float ref_block[SIN_COS_BLOCK_SIZE]; - float new_block[SIN_COS_BLOCK_SIZE]; - float input[SIN_COS_BLOCK_SIZE]; + float *ref_block = new float[SIN_COS_BLOCK_SIZE]; + float *new_block = new float[SIN_COS_BLOCK_SIZE]; + float *input = new float[SIN_COS_BLOCK_SIZE]; double max_error = 0; for(int i = 0; i < SIN_COS_BLOCK_SIZE; i++) { @@ -97,6 +97,9 @@ qa_fxpt_vco::t1() } CPPUNIT_ASSERT_DOUBLES_EQUAL(ref_vco.get_phase(), new_vco.get_phase(), SIN_COS_TOLERANCE); // printf ("Fxpt max error %.9f, max phase error %.9f\n", max_error, ref_vco.get_phase()-new_vco.get_phase()); + delete[] ref_block; + delete[] new_block; + delete[] input; } void @@ -104,9 +107,9 @@ qa_fxpt_vco::t2() { gr::vco<gr_complex,float> ref_vco; gr::fxpt_vco new_vco; - gr_complex ref_block[SIN_COS_BLOCK_SIZE]; - gr_complex new_block[SIN_COS_BLOCK_SIZE]; - float input[SIN_COS_BLOCK_SIZE]; + gr_complex *ref_block = new gr_complex[SIN_COS_BLOCK_SIZE]; + gr_complex *new_block = new gr_complex[SIN_COS_BLOCK_SIZE]; + float *input = new float[SIN_COS_BLOCK_SIZE]; double max_error = 0; for(int i = 0; i < SIN_COS_BLOCK_SIZE; i++) { @@ -122,6 +125,9 @@ qa_fxpt_vco::t2() } CPPUNIT_ASSERT_DOUBLES_EQUAL(ref_vco.get_phase(), new_vco.get_phase(), SIN_COS_TOLERANCE); // printf ("Fxpt max error %.9f, max phase error %.9f\n", max_error, ref_vco.get_phase()-new_vco.get_phase()); + delete[] ref_block; + delete[] new_block; + delete[] input; } void |