Commit Graph

14 Commits

Author SHA1 Message Date
Johann
da2ad47d66 test/buffer.h: move range checking to compiler
Pass low/high values as type T. Out of range values should be caught by
static analysis instead.

Change-Id: I0a3ee8820af05f4c791ab097626174e2206fa6d5
2017-07-05 11:21:18 -07:00
Johann
6cb3178192 buffer.h: incorrect RandRange results
'low' was promoted to unsigned, triggering a ubsan warning

Change-Id: Id49340079d39c105da93cf13e96cf852a93a94ba
2017-07-01 20:01:22 -07:00
Johann
c2044fda1d buffer.h: use stride_ instead of stride()
Change-Id: Ib51231349bf0ff3e23672762dc7bfa49b5fe4083
2017-06-30 07:37:20 -07:00
Johann
ce5b17f9ad testing: ranges for random values
Add a method to acm_random.h to generate ranges of values

Add a way to call that method to buffer.h

Adjust dct_[partial_]test.cc to use it.

Change-Id: I8c23ae9d27612c28f050b0e44c41cb4ad2494086
2017-06-30 07:25:30 -07:00
Johann
e0330c4810 buffer.h: Only allow Init() to be called once.
Change-Id: I041c8b6f314802833c5287a176dbfeec9461b08e
2017-06-28 10:59:39 -07:00
Johann
5aee8ea752 buffer.h: allow declaring an alignment
x86 simd register operations generally prefer and may require 16 byte
alignment.

Change-Id: I73ce577a90dc66af60743c5727c36f23200950ba
2017-06-09 11:03:15 -07:00
Johann
e50ea014c3 Revert "buffer.h: use size_t"
This reverts commit f08581c1d0.

type conversion warnings abound.

Change-Id: I41d4c0e7a388e1008bdbc55fefda4bbca3f89f00
2017-06-08 10:20:21 -07:00
Johann
902d63759e buffer.h: add num_elements_
raw_size_ was being incorrectly computed and used

Change-Id: Iade45f69964c567ffb258880f26006a96ae5a30d
2017-06-07 11:31:20 -07:00
Johann
4a37e3e2a0 buffer.h: zero-init all values
Change-Id: I18d90658bcd4365d49adcadd6954090b3b399aa8
2017-06-07 11:27:26 -07:00
Johann
f08581c1d0 buffer.h: use size_t
Change-Id: Ieca3f1ef23cd1d7b844ea3ecb054007ed280b04f
2017-06-07 11:24:27 -07:00
Johann
de4cb716ee buffer.h: split out init
Change-Id: Idfbd2e01714ca9d00525c5aeba78678b43fb0287
2017-06-06 15:02:50 -07:00
Johann
8659764a07 buffer.h: Use T for values
Change-Id: I2da4110e843b6e361028b921c24b6ca2ea9077d9
2017-06-06 12:05:14 -07:00
Johann
f380a1658d Use Buffer class for post proc tests
Add Buffer features for:
Setting the buffer to the output of an ACMRandom function.
Copying a buffer.
Comparing two buffers.
Printing two buffers.

Change-Id: Ib53fb602451a3abdcee279ea2b65b51fbc02d3df
2017-01-26 09:50:49 -08:00
Johann
6886da7547 Create a class for buffers used in tests
Demonstrate its use with the IDCT test.

Change-Id: Idf87fe048847c180f13818fd4df916ba4500134b
2017-01-11 08:28:39 -08:00