diff options
author | Nick Foster | 2011-05-18 18:03:26 -0700 |
---|---|---|
committer | Nick Foster | 2011-05-18 18:03:26 -0700 |
commit | 3a41b3208e222965e908c6a04e3ab05379c782c4 (patch) | |
tree | 4dcc39d3d7a765aa347a6d34bb2c6464fdb8fe17 /volk/lib | |
parent | c80e7b00de836a388013a002008c7256481414cb (diff) | |
download | gnuradio-3a41b3208e222965e908c6a04e3ab05379c782c4.tar.gz gnuradio-3a41b3208e222965e908c6a04e3ab05379c782c4.tar.bz2 gnuradio-3a41b3208e222965e908c6a04e3ab05379c782c4.zip |
Volk: added alignment prop to each machine. call volk_get_alignment() to get your machine's reqd alignment for malloc.
Diffstat (limited to 'volk/lib')
-rw-r--r-- | volk/lib/qa_utils.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/volk/lib/qa_utils.cc b/volk/lib/qa_utils.cc index db606a472..7f86dd78b 100644 --- a/volk/lib/qa_utils.cc +++ b/volk/lib/qa_utils.cc @@ -233,7 +233,8 @@ bool icompare(t *in1, t *in2, unsigned int vlen, unsigned int tol) { class volk_qa_aligned_mem_pool{ public: - void *get_new(size_t size, size_t alignment = 32){ + void *get_new(size_t size){ + size_t alignment = volk_get_alignment(); _mems.push_back(std::vector<char>(size + alignment-1, 0)); size_t ptr = size_t(&_mems.back().front()); return (void *)((ptr + alignment-1) & ~(alignment-1)); |