Skip to content

Commit 078255a

Browse files
committed
Cleanup
- Removing temporary code segments that were used to output new target values in the CPU tests. Signed-off-by: cuneyt.ozdas <cuneyt.ozdas@autodesk.com>
1 parent 4e4021c commit 078255a

2 files changed

Lines changed: 0 additions & 62 deletions

File tree

tests/cpu/ops/fixedfunction/FixedFunctionOpCPU_tests.cpp

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -523,17 +523,6 @@ OCIO_ADD_TEST(FixedFunctionOpCPU, aces_output_transform_20)
523523
1e-5f,
524524
__LINE__);
525525

526-
#if DUMP_RESULT
527-
std::cout << "aces_output_transform_20 results: \n" << std::setprecision(9) << std::fixed;
528-
for (unsigned i = 0; i < num_samples; ++i)
529-
{
530-
std::cout << input2_32f[i * 4 + 0] << "f, "
531-
<< input2_32f[i * 4 + 1] << "f, "
532-
<< input2_32f[i * 4 + 2] << "f, "
533-
<< input2_32f[i * 4 + 3] << "f,\n";
534-
}
535-
#endif
536-
537526
OCIO::ConstFixedFunctionOpDataRcPtr funcData2
538527
= std::make_shared<OCIO::FixedFunctionOpData>(OCIO::FixedFunctionOpData::ACES_OUTPUT_TRANSFORM_20_INV,
539528
params);
@@ -835,17 +824,6 @@ OCIO_ADD_TEST(FixedFunctionOpCPU, aces_tonescale_compress_20)
835824
1e-5f,
836825
__LINE__);
837826

838-
#if DUMP_RESULTS
839-
std::cout << "aces_tonescale_compress_20 results: \n" << std::setprecision(9) << std::fixed;
840-
for (unsigned i = 0; i < num_samples; ++i)
841-
{
842-
std::cout << input2_32f[i * 4 + 0] << "f, "
843-
<< input2_32f[i * 4 + 1] << "f, "
844-
<< input2_32f[i * 4 + 2] << "f, "
845-
<< input2_32f[i * 4 + 3] << "f,\n";
846-
}
847-
#endif
848-
849827
OCIO::ConstFixedFunctionOpDataRcPtr funcData2
850828
= std::make_shared<OCIO::FixedFunctionOpData>(OCIO::FixedFunctionOpData::ACES_TONESCALE_COMPRESS_20_INV,
851829
params);
@@ -943,16 +921,6 @@ OCIO_ADD_TEST(FixedFunctionOpCPU, aces_gamut_map_20)
943921
funcData,
944922
1e-5f,
945923
__LINE__);
946-
#if DUMP_RESULTS
947-
std::cout << "Results: \n" << std::setprecision(9) << std::fixed;
948-
for (unsigned i = 0; i < num_samples; ++i)
949-
{
950-
std::cout << input2_32f[i * 4 + 0] << "f, "
951-
<< input2_32f[i * 4 + 1] << "f, "
952-
<< input2_32f[i * 4 + 2] << "f, "
953-
<< input2_32f[i * 4 + 3] << "f,\n";
954-
}
955-
#endif
956924

957925
OCIO::ConstFixedFunctionOpDataRcPtr funcData2
958926
= std::make_shared<OCIO::FixedFunctionOpData>(OCIO::FixedFunctionOpData::ACES_GAMUT_COMPRESS_20_INV,

tests/cpu/transforms/BuiltinTransform_tests.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
#include "UnitTestUtils.h"
1818

1919
namespace OCIO = OCIO_NAMESPACE;
20-
#define DUMP_RESULTS 0
21-
2220

2321
OCIO_ADD_TEST(BuiltinTransform, creation)
2422
{
@@ -705,10 +703,6 @@ OCIO_ADD_TEST(Builtins, validate)
705703
{
706704
OCIO::ConstBuiltinTransformRegistryRcPtr reg = OCIO::BuiltinTransformRegistry::Get();
707705

708-
#if DUMP_RESULTS
709-
std::ostringstream ss;
710-
#endif
711-
712706
for (size_t index = 0; index < reg->getNumBuiltins(); ++index)
713707
{
714708
const char * name = reg->getBuiltinStyle(index);
@@ -738,33 +732,9 @@ OCIO_ADD_TEST(Builtins, validate)
738732
{
739733
Values results;
740734
ValidateBuiltinTransform(name, std::get<1>(values), std::get<2>(values), std::get<0>(values), __LINE__, results);
741-
742-
#if DUMP_RESULTS
743-
ss << std::defaultfloat;
744-
ss << " { \"" << name << "\",\n";
745-
ss << " { " << std::get<0>(values) << "f,\n { ";
746-
int comma = 0;
747-
for (auto val : std::get<1>(values))
748-
{
749-
ss << (comma++ ? ", " : "") << val << "f";
750-
comma = true;
751-
}
752-
ss << " },\n { ";
753-
ss << std::setprecision(8) << std::fixed;
754-
comma = 0;
755-
for (auto val : results)
756-
{
757-
ss << (comma++ ? ", " : "") << val << "f";
758-
}
759-
ss << " } } },\n ";
760-
#endif
761735
}
762736
}
763737

764-
#if DUMP_RESULTS
765-
std::cout << ss.str() << std::endl;
766-
#endif
767-
768738
// The above checks if a test values is missing, but not if there are test values
769739
// that don't have an associated built-in.
770740
OCIO_CHECK_EQUAL(UnitTestValues.size(), reg->getNumBuiltins());

0 commit comments

Comments
 (0)