Skip to content

Commit

Permalink
Clarify test case by using uint8 maxValue
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Reid <[email protected]>
  • Loading branch information
markreidvfx committed Mar 20, 2024
1 parent 15a41f9 commit 3e33b9c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions tests/cpu/AVX2_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ void testConvert_InBitDepth(OCIO::BitDepth outBD)

DEFINE_SIMD_TEST(packed_uint8_to_float_test)
{
std::vector<uint8_t> inImage(256);
std::vector<float> outImage(256);
size_t maxValue = OCIO::BitDepthInfo<OCIO::BIT_DEPTH_UINT8>::maxValue + 1;
std::vector<uint8_t> inImage(maxValue);
std::vector<float> outImage(maxValue);

for (unsigned i = 0; i < inImage.size(); i++)
{
Expand Down
5 changes: 3 additions & 2 deletions tests/cpu/AVX512_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ void testConvert_InBitDepth(OCIO::BitDepth outBD)

DEFINE_SIMD_TEST(packed_uint8_to_float_test)
{
std::vector<uint8_t> inImage(256);
std::vector<float> outImage(256);
size_t maxValue = OCIO::BitDepthInfo<OCIO::BIT_DEPTH_UINT8>::maxValue + 1;
std::vector<uint8_t> inImage(maxValue);
std::vector<float> outImage(maxValue);

for (unsigned i = 0; i < inImage.size(); i++)
{
Expand Down
5 changes: 3 additions & 2 deletions tests/cpu/AVX_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,9 @@ void testConvert_InBitDepth(OCIO::BitDepth outBD)

DEFINE_SIMD_TEST(packed_uint8_to_float_test)
{
std::vector<uint8_t> inImage(256);
std::vector<float> outImage(256);
size_t maxValue = OCIO::BitDepthInfo<OCIO::BIT_DEPTH_UINT8>::maxValue + 1;
std::vector<uint8_t> inImage(maxValue);
std::vector<float> outImage(maxValue);

for (unsigned i = 0; i < inImage.size(); i++)
{
Expand Down
5 changes: 3 additions & 2 deletions tests/cpu/SSE2_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,9 @@ void testConvert_InBitDepth(OCIO::BitDepth outBD)

DEFINE_SIMD_TEST(packed_uint8_to_float_test)
{
std::vector<uint8_t> inImage(256);
std::vector<float> outImage(256);
size_t maxValue = OCIO::BitDepthInfo<OCIO::BIT_DEPTH_UINT8>::maxValue + 1;
std::vector<uint8_t> inImage(maxValue);
std::vector<float> outImage(maxValue);

for (unsigned i = 0; i < inImage.size(); i++)
{
Expand Down

0 comments on commit 3e33b9c

Please sign in to comment.