Giter Club home page Giter Club logo

ctl's People

Contributors

aforsythe avatar cbenhagen avatar equal-l2 avatar fabiencastan avatar fkainz avatar kdt3rd avatar kgboreham avatar michaeldsmith avatar pstanczyk avatar scottdyer avatar selfshadow avatar thomaswilshaw avatar waebbl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ctl's Issues

valgrind detects error in ./unittest/IlmCtl/IlmCtlTest

valgrind -s --error-exitcode=1 --leak-check=full ./unittest/IlmCtl/IlmCtlTest

1: ==11== Memcheck, a memory error detector
1: ==11== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
1: ==11== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
1: ==11== Command: ./unittest/IlmCtl/IlmCtlTest
1: ==11==
1:
1: Testing end-of-line conventions
1: Dos source file
1: Unix source file
1: Mac source file
1: ok
1:
1: Testing parser
1: ERROR -- caught exception:
1: Cannot find CTL module "test".
1: IlmCtlTest: /usr/src/CTL/unittest/IlmCtl/testParser.cpp:105: void testParser(): Assertion `false' failed.
1: ==11==
1: ==11== Process terminating with default action of signal 6 (SIGABRT)
1: ==11== at 0x4ECC00B: raise (raise.c:51)
1: ==11== by 0x4EAB858: abort (abort.c:79)
1: ==11== by 0x4EAB728: __assert_fail_base.cold (assert.c:92)
1: ==11== by 0x4EBCFD5: __assert_fail (assert.c:101)
1: ==11== by 0x113FA5: testParser() (in /usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest)
1: ==11== by 0x10D8C3: main (in /usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest)
1: ==11==
1: ==11== HEAP SUMMARY:
1: ==11== in use at exit: 2,655 bytes in 31 blocks
1: ==11== total heap usage: 1,292 allocs, 1,261 frees, 256,674 bytes allocated
1: ==11==
1: ==11== 31 bytes in 1 blocks are possibly lost in loss record 25 of 30
1: ==11== at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==11== by 0x4C8035D: std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==11== by 0x4C81285: std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==11== by 0x4B3196E: Iex_2_3::BaseExc::BaseExc(std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >&) (in /usr/lib/x86_64-linux-gnu/libIex-2_3.so.24.0.0)
1: ==11== by 0x4A65788: Iex_2_3::ArgExc::ArgExc(std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x4A6434F: Ctl::Interpreter::findModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x4A64EE8: Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x4A645C8: Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x111A47: testParser() (in /usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest)
1: ==11== by 0x10D8C3: main (in /usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest)
1: ==11==
1: ==11== 200 bytes in 1 blocks are possibly lost in loss record 28 of 30
1: ==11== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==11== by 0x4BE61F3: __cxa_allocate_exception (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==11== by 0x4A6433A: Ctl::Interpreter::findModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x4A64EE8: Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x4A645C8: Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==11== by 0x111A47: testParser() (in /usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest)
1: ==11== by 0x10D8C3: main (in /usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest)
1: ==11==
1: ==11== LEAK SUMMARY:
1: ==11== definitely lost: 0 bytes in 0 blocks
1: ==11== indirectly lost: 0 bytes in 0 blocks
1: ==11== possibly lost: 231 bytes in 2 blocks
1: ==11== still reachable: 2,424 bytes in 29 blocks
1: ==11== suppressed: 0 bytes in 0 blocks
1: ==11== Reachable blocks (those to which a pointer was found) are not shown.
1: ==11== To see them, rerun with: --leak-check=full --show-leak-kinds=all

Nuke CTL Node

I'm not sur this is the right way to go, but I couldn't find the appropriate mailing list.

In issue #26, there is mention of a Nuke CTL node. Does it exist, somewhere? If so, how do I compile and install it?

Thanks!

Vincent Olivier

NukeCTL and CTL_MODULE_PATH

CTL_MODULE_PATH env var seems to have to be set before launching Nuke such as imported modules of a CTL script could be found by NukeCTL node.

This can be annoying if different versions of the same transformation co-exist in CTL_MODULE_PATH.
Precise use case : comparing different versions of ACES RRT that have to import corresponding utilities modules.

Shouldn't CTL_MODULE_PATH be set automatically or in a transparent way ?

For what it's worth, in TuttleOFX CTL node, imported modules are searched in the directory of the loaded CTL.

Nuke_CTL is disabled as plugin

Hello

I'm IlmBase, OpenEXR, ampasCTL, OpenEXR_CTL maintainer for FreeBSD

http://www.freshports.org/graphics/ilmbase/

http://www.freshports.org/graphics/OpenEXR/

http://www.freshports.org/graphics/ampasCTL/

http://www.freshports.org/graphics/openexr_ctl/

And make new Versions.

I see that graphics/ampasCTL-devel (1.5) replace ampasCTL (1.4.1) and OpenEXR_CTL (1.0.1).

Here is installed

pkg info | grep openexr
OpenEXR-1.7.1                  High dynamic-range (HDR) image file format
OpenEXR2-2.0.0                 High dynamic-range (HDR) image file format
openexr_ctl-1.0.1_1            Simplified OpenEXR interface to CTL

pkg info | grep ilmbase
ilmbase-1.0.3                  ILM Base libraries a.k.a. Half, IlmThread, Imath, and Iex
ilmbase2-2.0.0                 ILM Base libraries a.k.a. Half, IlmThread, Imath, and Iex

pkg info | grep ampas   
ampasACES-container-1.0        Color Transformation Language interpreter
ampasCTL-1.4.1_1               Color Transformation Language interpreter
ampasCTL2-1.4.1                Color Transformation Language interpreter

Nuke_CTL is not builded with ampasCTL-devel-1.5 i think because installed IlmBase / OpenEXR libraries

Get this with installation graphics/ampasCTL-devel-1.5

CMake Warning at Nuke_CTL/CMakeLists.txt:46 (message):
  NUKE not found, check NUKE_INSTALL_PATH setting or NDKDIR env.  var,
  NukeCTL plugin disabled

With intstallation get this problem and more others

Installing ampasCTL-devel-1.5...pkg-static: ampasCTL-devel-1.5 conflicts with openexr_ctl-1.0.1_1 (installs files into the same place).  Problematic file: /usr/local/bin/exr_ctl_exr

Is better to use Nuke_CTL or IlmBase / OpenEXR libraries?

CTL-ctl_1.5_rc handful of minor changes needed to compile "make check"

a few files in unittest were failing on "memcpy" so I added #include and a few math ones failed on srand/RAND_MAX so added #include to those.

Seems like maybe that wasn't the best solve because now make check compiles but 2 of 4 test fail, one with a segfault. Would there be a better way or better location (e.g. some header file) to put these standard libraries?

    Start 1: IlmCtl
1/4 Test #1: IlmCtl ..........................._Exception: SegFault  0.17 sec
    Start 2: IlmCtlMath
2/4 Test #2: IlmCtlMath .......................
_Exception: Other  0.02 sec
    Start 3: IlmImfCtl
3/4 Test #3: IlmImfCtl ........................   Passed    0.06 sec
    Start 4: ctlrender
4/4 Test #4: ctlrender ........................   Passed   31.18 sec

50% tests passed, 2 tests failed out of 4

Total Test time (real) =  31.44 sec

The following tests FAILED:
 1 - IlmCtl (SEGFAULT)
 2 - IlmCtlMath (OTHER_FAULT)
Errors while running CTest
make[3]: *** [unittest/CMakeFiles/check] Error 8
make[2]: *** [unittest/CMakeFiles/check.dir/all] Error 2
make[1]: *** [unittest/CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2

CTL Brew formula is outdated

Installed ctl brew formula (it installed the other required formulae).

dyld: Library not loaded: /usr/local/lib/libImath-2_1.11.dylib
  Referenced from: /usr/local/bin/ctlrender
  Reason: image not found
Trace/BPT trap: 5

The ctlrender binary seems to be linking against libImath-2_1.11.dylib whereas I have libImath-2_2.12.dylib. I wonder if anything needs rebuilding, or whether the brew script needs changing?

Update documentation to show that 32-bit floats are supported

It appears that ctlrender supports the writing of 32-bit tiffs, but this is currently unclear in the documentation.

When running ctlrender, if the flag -format tiff32 -force is used, then ctlrender will create a 32-bit tiff file, but this does not appear to be documented in the help for format. So, when ctlrender -help format is entered, -tiff32 should be on the list of supported output file types.

I anticipate that the most regular input to ctlrender will be a 16-bit half float exr, so there should probably be a note that the 32-bit tiff output must be used with a -force because the output file type is of a higher bit depth than the input file type.

ACES CTL modules with main function

Hello,

I'm trying to use the CTL C++ API and noticed that the ImfCtlApplyTransforms simplified API don't seems to work with ACES CTL anymore. The problem is that it expects a module with a function name matching the file name but the CTL define a main function.

I looked at the ctlrender code and found that it first checks for a main function and if not present search for a function matching the module name. I'm not sure if this could apply to the ImfCtlApplyTransforms API because in it's current state it first loads all the module, then map the tasks to thread in a pool. Will this work if we load several modules with a main function at once ?

Because I'm quite new to this codebase, is there a simple way to still use the simplified API while not modifying the CTL files ? If not I guess I should use something similar to the ctlrender code ?

OpenEXR_CTL not support OpenEXR 2.0.0

OpenEXR_CTL-1.0.1 compile good with OpenEXR-1.7.1

When i try to compile with OpenEXR2-2.0.0 get

using pkg-config to set OPENEXR_CXXFLAGS2 and OPENEXR_LDFLAGS2:
    OPENEXR_CXXFLAGS2 = -D_THREAD_SAFE -I/usr/local/include/OpenEXR2  
    OPENEXR_LDFLAGS2 = -L/usr/local/lib/OpenEXR2 -L/usr/local/lib/ilmbase2  
    OPENEXR_LIBS2 = -L/usr/local/lib/OpenEXR2 -lIlmImf -L/usr/local/lib/ilmbase2 -lImath -lHalf -lIex -lIexMath -lIlmThread -pthread  
test_prefix = NONE
checking for pkg-config... (cached) /usr/local/bin/pkg-config
using pkg-config to set CTL_CXXFLAGS2 and CTL_LDFLAGS2:
    CTL_CXXFLAGS2 = -D_THREAD_SAFE -I/usr/local/include/OpenEXR2  -I/usr/local/include/CTL2  
    CTL_LDFLAGS2 = -L/usr/local/lib/ilmbase2  
    CTL_LIBS2 = -lIlmCtlSimd -lIlmCtlMath -lIlmCtl -L/usr/local/lib/ilmbase2 -lImath -lHalf -lIex -lIexMath -lIlmThread -pthread   
checking for OpenEXR2... yes
Compiled and ran OpenEXR test program.
checking for CTL2... yes
The ctl test program succeeded.
checking for ANSI C header files... (cached) yes
checking for limits.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... (cached) yes
checking for gcc optimization flags... -pipe
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating OpenEXR_CTL2.pc
config.status: creating IlmImfCtl/Makefile
config.status: creating IlmImfCtlTest/Makefile
config.status: creating CtlModules/Makefile
config.status: creating exrdpx/Makefile
config.status: creating exr_ctl_exr/Makefile
config.status: creating vc/Makefile
config.status: executing depfiles commands
config.status: executing libtool commands

---------------------------------------------
Summary for OpenEXR_CTL features:

No variable options in this package.  Configure completed successfully.
---------------------------------------------

===>  Building for openexr_ctl2-1.0.1
Making all in IlmImfCtl
/bin/sh /usr/local/bin/libtool --tag=CXX    --mode=compile c++ -DPACKAGE_NAME=\"OpenEXR_CTL\" -DPACKAGE_TARNAME=\"openexr_ctl\" -DPACKAGE_VERSION=\"1.0.1\" -D$
ACKAGE_STRING=\"OpenEXR_CTL\ 1.0.1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"openexr_ctl\" -DVERSION=\"1.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYP$
S_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DH$
VE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -I. @CTL_CXXFLAGS@ @OPENEXR_CXXFLAGS@    -pipe -O2 -pipe -fno-strict-aliasing -MT ImfCt$
ApplyTransforms.lo -MD -MP -MF .deps/ImfCtlApplyTransforms.Tpo -c -o ImfCtlApplyTransforms.lo ImfCtlApplyTransforms.cpp
libtool: compile:  c++ -DPACKAGE_NAME=\"OpenEXR_CTL\" -DPACKAGE_TARNAME=\"openexr_ctl\" -DPACKAGE_VERSION=\"1.0.1\" "-DPACKAGE_STRING=\"OpenEXR_CTL 1.0.1\"" -$
PACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"openexr_ctl\" -DVERSION=\"1.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLI$
_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -D$
TDC_HEADERS=1 -DHAVE_LIMITS_H=1 -I. @CTL_CXXFLAGS@ @OPENEXR_CXXFLAGS@ -pipe -O2 -pipe -fno-strict-aliasing -MT ImfCtlApplyTransforms.lo -MD -MP -MF .deps/ImfC$
lApplyTransforms.Tpo -c ImfCtlApplyTransforms.cpp  -fPIC -DPIC -o .libs/ImfCtlApplyTransforms.o
c++: @CTL_CXXFLAGS@: No such file or directory
c++: @OPENEXR_CXXFLAGS@: No such file or directory
In file included from ImfCtlApplyTransforms.cpp:43:
./ImfCtlApplyTransforms.h:187:22: error: ImathBox.h: No such file or directory
./ImfCtlApplyTransforms.h:188:26: error: ImfThreading.h: No such file or directory
In file included from ImfCtlApplyTransforms.cpp:44:
./ImfCtlCopyFunctionArg.h:46:26: error: ImfAttribute.h: No such file or directory
./ImfCtlCopyFunctionArg.h:47:28: error: ImfFrameBuffer.h: No such file or directory
./ImfCtlCopyFunctionArg.h:48:29: error: CtlFunctionCall.h: No such file or directory
ImfCtlApplyTransforms.cpp:45:23: error: ImfHeader.h: No such file or directory
ImfCtlApplyTransforms.cpp:47:28: error: CtlInterpreter.h: No such file or directory
ImfCtlApplyTransforms.cpp:48:27: error: IlmThreadPool.h: No such file or directory
ImfCtlApplyTransforms.cpp:49:28: error: IlmThreadMutex.h: No such file or directory
ImfCtlApplyTransforms.cpp:50:17: error: Iex.h: No such file or directory
In file included from ImfCtlApplyTransforms.cpp:43:
./ImfCtlApplyTransforms.h:209: error: expected ',' or '...' before '::' token
./ImfCtlApplyTransforms.h:215: error: ISO C++ forbids declaration of 'Imath' with no type
In file included from ImfCtlApplyTransforms.cpp:44:
./ImfCtlCopyFunctionArg.h:58: error: expected unqualified-id before '&' token
./ImfCtlCopyFunctionArg.h:58: error: expected ',' or '...' before '&' token
./ImfCtlCopyFunctionArg.h:65: error: expected ',' or '...' before '::' token
./ImfCtlCopyFunctionArg.h:69: error: ISO C++ forbids declaration of 'Imath' with no type
./ImfCtlCopyFunctionArg.h:71: error: expected ',' or '...' before '::' token
./ImfCtlCopyFunctionArg.h:75: error: ISO C++ forbids declaration of 'Imath' with no type
./ImfCtlCopyFunctionArg.h:81: error: expected unqualified-id before '&' token
./ImfCtlCopyFunctionArg.h:81: error: expected ',' or '...' before '&' token
./ImfCtlCopyFunctionArg.h:84: error: expected unqualified-id before '&' token
./ImfCtlCopyFunctionArg.h:84: error: expected ',' or '...' before '&' token
ImfCtlApplyTransforms.cpp:53: error: 'Iex' is not a namespace-name
ImfCtlApplyTransforms.cpp:53: error: expected namespace-name before ';' token
ImfCtlApplyTransforms.cpp:54: error: 'Imath' is not a namespace-name
ImfCtlApplyTransforms.cpp:54: error: expected namespace-name before ';' token
ImfCtlApplyTransforms.cpp:55: error: 'IlmThread' is not a namespace-name
ImfCtlApplyTransforms.cpp:55: error: expected namespace-name before ';' token
ImfCtlApplyTransforms.cpp:78: error: 'FunctionCallPtr' was not declared in this scope
ImfCtlApplyTransforms.cpp:78: error: template argument 1 is invalid
ImfCtlApplyTransforms.cpp:78: error: template argument 2 is invalid
ImfCtlApplyTransforms.cpp:78: error: invalid type in declaration before ';' token
ImfCtlApplyTransforms.cpp:84: error: expected ',' or '...' before '&' token
ImfCtlApplyTransforms.cpp:91: error: ISO C++ forbids declaration of 'Box2i' with no type
ImfCtlApplyTransforms.cpp: In function 'void ImfCtl::<unnamed>::callFunctions(const ImfCtl::<unnamed>::FunctionList&, int)':
ImfCtlApplyTransforms.cpp:103: error: 'FunctionCallPtr' was not declared in this scope
ImfCtlApplyTransforms.cpp:103: error: expected `;' before 'previousFunc'
ImfCtlApplyTransforms.cpp:105: error: request for member 'size' in 'funcs', which is of non-class type 'const int'
ImfCtlApplyTransforms.cpp:107: error: expected `;' before 'func'
ImfCtlApplyTransforms.cpp:114: error: 'func' was not declared in this scope
ImfCtlApplyTransforms.cpp:116: error: 'FunctionArgPtr' was not declared in this scope
ImfCtlApplyTransforms.cpp:116: error: expected `;' before 'arg'
ImfCtlApplyTransforms.cpp:119: error: 'arg' was not declared in this scope
ImfCtlApplyTransforms.cpp:128: error: 'previousFunc' was not declared in this scope
ImfCtlApplyTransforms.cpp:130: error: expected `;' before 'previousArg'
ImfCtlApplyTransforms.cpp:133: error: 'previousArg' was not declared in this scope
ImfCtlApplyTransforms.cpp:139: error: 'previousArg' was not declared in this scope
ImfCtlApplyTransforms.cpp:143: error: 'numSamples' was not declared in this scope
ImfCtlApplyTransforms.cpp:148: error: incomplete type 'Imf::FrameBuffer' used in nested name specifier
ImfCtlApplyTransforms.cpp:148: error: expected `;' before 'inSlice'
ImfCtlApplyTransforms.cpp:151: error: 'inSlice' was not declared in this scope
ImfCtlApplyTransforms.cpp:151: error: 'inFb' was not declared in this scope
ImfCtlApplyTransforms.cpp:155: error: 'transformWindow' was not declared in this scope
ImfCtlApplyTransforms.cpp:156: error: 'firstSample' was not declared in this scope
ImfCtlApplyTransforms.cpp:157: error: 'numSamples' was not declared in this scope
ImfCtlApplyTransforms.cpp:171: error: 'ArgExc' was not declared in this scope
ImfCtlApplyTransforms.cpp:174: error: 'THROW' was not declared in this scope
ImfCtlApplyTransforms.cpp:186: error: 'previousFunc' was not declared in this scope
ImfCtlApplyTransforms.cpp:188: error: expected `;' before 'previousArg'
ImfCtlApplyTransforms.cpp:191: error: 'previousArg' was not declared in this scope
ImfCtlApplyTransforms.cpp:197: error: 'previousArg' was not declared in this scope
ImfCtlApplyTransforms.cpp:206: error: incomplete type 'Imf::Header' used in nested name specifier
ImfCtlApplyTransforms.cpp:206: error: expected `;' before 'inAttr'
ImfCtlApplyTransforms.cpp:209: error: 'inAttr' was not declared in this scope
ImfCtlApplyTransforms.cpp:209: error: 'inHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:217: error: incomplete type 'Imf::Header' used in nested name specifier
ImfCtlApplyTransforms.cpp:217: error: expected `;' before 'envAttr'
ImfCtlApplyTransforms.cpp:220: error: 'envAttr' was not declared in this scope
ImfCtlApplyTransforms.cpp:220: error: 'envHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:236: error: 'ArgExc' was not declared in this scope
ImfCtlApplyTransforms.cpp:239: error: 'THROW' was not declared in this scope
ImfCtlApplyTransforms.cpp:247: error: 'func' was not declared in this scope
ImfCtlApplyTransforms.cpp:247: error: 'numSamples' was not declared in this scope
ImfCtlApplyTransforms.cpp:255: error: 'FunctionArgPtr' was not declared in this scope
ImfCtlApplyTransforms.cpp:255: error: expected `;' before 'arg'
ImfCtlApplyTransforms.cpp:258: error: 'arg' was not declared in this scope
ImfCtlApplyTransforms.cpp:264: error: incomplete type 'Imf::FrameBuffer' used in nested name specifier
ImfCtlApplyTransforms.cpp:264: error: expected `;' before 'outSlice'
ImfCtlApplyTransforms.cpp:267: error: 'outSlice' was not declared in this scope
ImfCtlApplyTransforms.cpp:267: error: 'outFb' was not declared in this scope
ImfCtlApplyTransforms.cpp:275: error: 'outSlice' was not declared in this scope
ImfCtlApplyTransforms.cpp:275: error: 'outFb' was not declared in this scope
ImfCtlApplyTransforms.cpp:279: error: 'transformWindow' was not declared in this scope
ImfCtlApplyTransforms.cpp:280: error: 'firstSample' was not declared in this scope
ImfCtlApplyTransforms.cpp:294: error: incomplete type 'Imf::Header' used in nested name specifier
ImfCtlApplyTransforms.cpp:294: error: expected `;' before 'outAttr'
ImfCtlApplyTransforms.cpp:297: error: 'outAttr' was not declared in this scope
ImfCtlApplyTransforms.cpp:297: error: 'outHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:305: error: 'outAttr' was not declared in this scope
ImfCtlApplyTransforms.cpp:305: error: 'outHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:315: error: 'previousFunc' was not declared in this scope
ImfCtlApplyTransforms.cpp: At global scope:
ImfCtlApplyTransforms.cpp:321: error: expected class-name before '{' token
ImfCtlApplyTransforms.cpp:325: error: expected `)' before '*' token
ImfCtlApplyTransforms.cpp:345: error: ISO C++ forbids declaration of 'Box2i' with no type
ImfCtlApplyTransforms.cpp:345: error: expected ';' before '&' token
ImfCtlApplyTransforms.cpp:353: error: ISO C++ forbids declaration of 'Mutex' with no type
ImfCtlApplyTransforms.cpp:353: error: expected ';' before '&' token
ImfCtlApplyTransforms.cpp:359: error: expected `)' before '*' token
ImfCtlApplyTransforms.cpp: In member function 'virtual void ImfCtl::<unnamed>::CallFunctionsTask::execute()':
ImfCtlApplyTransforms.cpp:406: error: request for member 'push_back' in 'funcs', which is of non-class type 'ImfCtl::<unnamed>::FunctionList'
ImfCtlApplyTransforms.cpp:406: error: invalid use of incomplete type 'struct Ctl::Interpreter'
./ImfCtlApplyTransforms.h:198: error: forward declaration of 'struct Ctl::Interpreter'
ImfCtlApplyTransforms.cpp:413: error: invalid use of incomplete type 'struct Ctl::Interpreter'
./ImfCtlApplyTransforms.h:198: error: forward declaration of 'struct Ctl::Interpreter'
ImfCtlApplyTransforms.cpp:423: error: '_transformWindow' was not declared in this scope
ImfCtlApplyTransforms.cpp:433: error: 'Lock' was not declared in this scope
ImfCtlApplyTransforms.cpp:433: error: expected `;' before 'lock'
ImfCtlApplyTransforms.cpp:438: error: 'Lock' was not declared in this scope
ImfCtlApplyTransforms.cpp:438: error: expected `;' before 'lock'
ImfCtlApplyTransforms.cpp: At global scope:
ImfCtlApplyTransforms.cpp:450: error: expected ',' or '...' before '&' token
ImfCtlApplyTransforms.cpp:456: error: ISO C++ forbids declaration of 'Box2i' with no type
ImfCtlApplyTransforms.cpp: In function 'void ImfCtl::applyTransforms(Ctl::Interpreter&, const ImfCtl::StringList&, int)':
ImfCtlApplyTransforms.cpp:464: error: invalid use of incomplete type 'struct Ctl::Interpreter'
./ImfCtlApplyTransforms.h:198: error: forward declaration of 'struct Ctl::Interpreter'
ImfCtlApplyTransforms.cpp:470: error: 'transformWindow' was not declared in this scope
ImfCtlApplyTransforms.cpp:489: error: 'Mutex' was not declared in this scope
ImfCtlApplyTransforms.cpp:489: error: expected `;' before 'exceptionMutex'
ImfCtlApplyTransforms.cpp:493: error: 'TaskGroup' was not declared in this scope
ImfCtlApplyTransforms.cpp:493: error: expected `;' before 'taskGroup'
ImfCtlApplyTransforms.cpp:495: error: 'numThreads' was not declared in this scope
ImfCtlApplyTransforms.cpp:502: error: 'ThreadPool' has not been declared
ImfCtlApplyTransforms.cpp:503: error: 'taskGroup' was not declared in this scope
ImfCtlApplyTransforms.cpp:509: error: 'envHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:510: error: 'inHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:511: error: 'inFb' was not declared in this scope
ImfCtlApplyTransforms.cpp:512: error: 'outHeader' was not declared in this scope
ImfCtlApplyTransforms.cpp:513: error: 'outFb' was not declared in this scope
ImfCtlApplyTransforms.cpp:514: error: 'exceptionMutex' was not declared in this scope
ImfCtlApplyTransforms.cpp:530: error: 'Iex' has not been declared
*** [ImfCtlApplyTransforms.lo] Error code 1

Stop in /var/tmp/ports/usr/local/ports/local/work/graphics/openexr_ctl2/work/ampas-CTL-ca179ca/OpenEXR_CTL/IlmImfCtl.
*** [all-recursive] Error code 1

Stop in /var/tmp/ports/usr/local/ports/local/work/graphics/openexr_ctl2/work/ampas-CTL-ca179ca/OpenEXR_CTL.
*** [do-build] Error code 1

Stop in /usr/local/ports/local/work/graphics/openexr_ctl2.
===> Error running make build
===> Cleaning up

But i have these libraries

ls /usr/local/include/OpenEXR2 
Iex.h                         ImathFrustum.h                ImfChannelList.h              ImfHuf.h                      ImfRgbaFile.h
IexBaseExc.h                  ImathFun.h                    ImfChannelListAttribute.h     ImfIO.h                       ImfRgbaYca.h
IexErrnoExc.h                 ImathGL.h                     ImfChromaticities.h           ImfInputFile.h                ImfStandardAttributes.h
IexExport.h                   ImathGLU.h                    ImfChromaticitiesAttribute.h  ImfInputPart.h                ImfStringAttribute.h
IexForward.h                  ImathHalfLimits.h             ImfCompositeDeepScanLine.h    ImfInt64.h                    ImfStringVectorAttribute.h
IexMacros.h                   ImathInt64.h                  ImfCompression.h              ImfIntAttribute.h             ImfTestFile.h
IexMathExc.h                  ImathInterval.h               ImfCompressionAttribute.h     ImfKeyCode.h                  ImfThreading.h
IexMathFloatExc.h             ImathLimits.h                 ImfConvert.h                  ImfKeyCodeAttribute.h         ImfTileDescription.h
IexMathFpu.h                  ImathLine.h                   ImfDeepCompositing.h          ImfLineOrder.h                ImfTileDescriptionAttribute.h
IexMathIeeeExc.h              ImathLineAlgo.h               ImfDeepFrameBuffer.h          ImfLineOrderAttribute.h       ImfTiledInputFile.h
IexNamespace.h                ImathMath.h                   ImfDeepScanLineInputFile.h    ImfLut.h                      ImfTiledInputPart.h
IexThrowErrnoExc.h            ImathMatrix.h                 ImfDeepScanLineInputPart.h    ImfMatrixAttribute.h          ImfTiledOutputFile.h
IlmBaseConfig.h               ImathMatrixAlgo.h             ImfDeepScanLineOutputFile.h   ImfMisc.h                     ImfTiledOutputPart.h
IlmThread.h                   ImathNamespace.h              ImfDeepScanLineOutputPart.h   ImfMultiPartInputFile.h       ImfTiledRgbaFile.h
IlmThreadExport.h             ImathPlane.h                  ImfDeepTiledInputFile.h       ImfMultiPartOutputFile.h      ImfTimeCode.h
IlmThreadForward.h            ImathPlatform.h               ImfDeepTiledInputPart.h       ImfMultiView.h                ImfTimeCodeAttribute.h
IlmThreadMutex.h              ImathQuat.h                   ImfDeepTiledOutputFile.h      ImfName.h                     ImfVecAttribute.h
IlmThreadNamespace.h          ImathRandom.h                 ImfDeepTiledOutputPart.h      ImfNamespace.h                ImfVersion.h
IlmThreadPool.h               ImathRoots.h                  ImfDoubleAttribute.h          ImfOpaqueAttribute.h          ImfWav.h
IlmThreadSemaphore.h          ImathShear.h                  ImfEnvmap.h                   ImfOutputFile.h               ImfXdr.h
ImathBox.h                    ImathSphere.h                 ImfEnvmapAttribute.h          ImfOutputPart.h               OpenEXRConfig.h
ImathBoxAlgo.h                ImathVec.h                    ImfExport.h                   ImfPartHelper.h               half.h
ImathColor.h                  ImathVecAlgo.h                ImfFloatAttribute.h           ImfPartType.h                 halfExport.h
ImathColorAlgo.h              ImfAcesFile.h                 ImfForward.h                  ImfPixelType.h                halfFunction.h
ImathEuler.h                  ImfArray.h                    ImfFrameBuffer.h              ImfPreviewImage.h             halfLimits.h
ImathExc.h                    ImfAttribute.h                ImfFramesPerSecond.h          ImfPreviewImageAttribute.h
ImathExport.h                 ImfB44Compressor.h            ImfGenericInputFile.h         ImfRational.h
ImathForward.h                ImfBoxAttribute.h             ImfGenericOutputFile.h        ImfRationalAttribute.h
ImathFrame.h                  ImfCRgbaFile.h                ImfHeader.h                   ImfRgba.h

OpenEXR_CTL Clang warnings

Please make cleaner Code that works good with Clang.

From FreeBSD 10 is default used Clang for Ports.

I have these build messages

...
libtool: compile:  clang++ -DPACKAGE_NAME=\"CTL\" -DPACKAGE_TARNAME=\"ctl\" -DPACKAGE_VERSION=\"1.4.1\" "-DPACKAGE_STRING=\"CTL 1.4.1\"" -DPACKAGE_BUGREPORT=\$
\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ctl\" -DVERSION=\"1.4.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHA$
E_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_LIMITS$
H=1 -DHAVE_UNISTD_H=1 -DHAVE_COMPLETE_IOMANIP=1 -I. -D_THREAD_SAFE -I/usr/local/include/OpenEXR -I.. -pipe -O2 -pipe -fno-strict-aliasing -MT CtlLookupTable.l$
 -MD -MP -MF .deps/CtlLookupTable.Tpo -c CtlLookupTable.cpp -o CtlLookupTable.o >/dev/null 2>&1
In file included from CtlRbfInterpolator.cpp:56:
./CtlSparseMatrix.h:212:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (*ri < 0)
            ~~~ ^ ~
./CtlSparseMatrix.h:216:13: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        while (*ce < 0 && ce <= re)
               ~~~ ^ ~
./CtlSparseMatrix.h:245:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (*ri < 0)
            ~~~ ^ ~
./CtlSparseMatrix.h:249:13: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        while (*ce < 0 && ce <= re)
               ~~~ ^ ~
./CtlSparseMatrix.h:245:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (*ri < 0)
            ~~~ ^ ~
libtool: compile:  clang++ -DPACKAGE_NAME=\"CTL\" -DPACKAGE_TARNAME=\"ctl\" -DPACKAGE_VERSION=\"1.4.1\" "-DPACKAGE_STRING=\"CTL 1.4.1\"" -DPACKAGE_BUGREPORT=\$
\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ctl\" -DVERSION=\"1.4.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHA$
E_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_LIMITS$
H=1 -DHAVE_UNISTD_H=1 -DHAVE_COMPLETE_IOMANIP=1 -I. -D_THREAD_SAFE -I/usr/local/include/OpenEXR -I.. -pipe -O2 -pipe -fno-strict-aliasing -MT CtlColorSpace.lo 
-MD -MP -MF .deps/CtlColorSpace.Tpo -c CtlColorSpace.cpp -o CtlColorSpace.o >/dev/null 2>&1
./CtlLinearSolver.h:576:12: note: in instantiation of function template specialization 'Ctl::CRSOperator<double>::applyT<__gnu_cxx::__normal_iterator<double *,
 std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > > >' requested here
    op().A.applyT(b_first, b_last, c_first, c_last);
           ^
./CtlLinearSolver.h:310:2: note: in instantiation of function template specialization 'Ctl::LSS<double, Ctl::CRSOperator<double>, Ctl::CG<double, Ctl::LSSOper$
tor<double, Ctl::CRSOperator<double> >, Ctl::NullLinearOperator>, Ctl::NullLinearOperator>::constants<__gnu_cxx::__normal_iterator<double *, std::vector<doubl$
, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > > >' requested here
        constants(b_first, b_last, c.begin(), c.end());
        ^
CtlRbfInterpolator.cpp:190:14: note: in instantiation of function template specialization 'Ctl::LSS<double, Ctl::CRSOperator<double>, Ctl::CG<double, Ctl::LSS$
perator<double, Ctl::CRSOperator<double> >, Ctl::NullLinearOperator>, Ctl::NullLinearOperator>::operator()<__gnu_cxx::__normal_iterator<double *, std::vector<$
ouble, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > > >' requested here
    lssAffine(b.begin(), b.end(), _affine.begin(), _affine.end());
             ^
In file included from CtlRbfInterpolator.cpp:56:
./CtlSparseMatrix.h:249:13: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        while (*ce < 0 && ce <= re)
               ~~~ ^ ~
./CtlSparseMatrix.h:212:10: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        if (*ri < 0)
            ~~~ ^ ~
./CtlLinearSolver.h:241:4: note: in instantiation of function template specialization 'Ctl::CRSOperator<double>::apply<__gnu_cxx::__normal_iterator<double *, $
td::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > > >' requested here
        A.apply(x_first, x_last, aux.begin(), aux.end());
          ^
./CtlLinearSolver.h:404:7: note: in instantiation of function template specialization 'Ctl::LSSOperator<double, Ctl::CRSOperator<double> >::apply<__gnu_cxx::_$
normal_iterator<double *, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > $
 >' requested here
    A.apply(x_first, x_last, t.begin(), t.end()); // t = A * x
      ^
./CtlLinearSolver.h:388:9: note: in instantiation of function template specialization 'Ctl::CG<double, Ctl::LSSOperator<double, Ctl::CRSOperator<double> >, Ct$
::NullLinearOperator>::cg<__gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::v$
ctor<double, std::allocator<double> > > >' requested here
        return cg(b_first, b_last, x_first, x_last);
               ^
./CtlLinearSolver.h:311:9: note: in instantiation of function template specialization 'Ctl::CG<double, Ctl::LSSOperator<double, Ctl::CRSOperator<double> >, Ct$
::NullLinearOperator>::operator()<__gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *$
 std::vector<double, std::allocator<double> > > >' requested here
        return solver(c.begin(), c.end(), x_first, x_last);
               ^
CtlRbfInterpolator.cpp:190:14: note: in instantiation of function template specialization 'Ctl::LSS<double, Ctl::CRSOperator<double>, Ctl::CG<double, Ctl::LSS$
perator<double, Ctl::CRSOperator<double> >, Ctl::NullLinearOperator>, Ctl::NullLinearOperator>::operator()<__gnu_cxx::__normal_iterator<double *, std::vector<$
ouble, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double *, std::vector<double, std::allocator<double> > > >' requested here
    lssAffine(b.begin(), b.end(), _affine.begin(), _affine.end());
             ^
In file included from CtlRbfInterpolator.cpp:56:
./CtlSparseMatrix.h:216:13: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
        while (*ce < 0 && ce <= re)
               ~~~ ^ ~
mv -f .deps/CtlLookupTable.Tpo .deps/CtlLookupTable.Plo
mv -f .deps/CtlColorSpace.Tpo .deps/CtlColorSpace.Plo
8 warnings generated.
libtool: compile:  clang++ -DPACKAGE_NAME=\"CTL\" -DPACKAGE_TARNAME=\"ctl\" -DPACKAGE_VERSION=\"1.4.1\" "-DPACKAGE_STRING=\"CTL 1.4.1\"" -DPACKAGE_BUGREPORT=\"
\" -DPACKAGE_URL=\"\" -DPACKAGE=\"ctl\" -DVERSION=\"1.4.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAV
E_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DSTDC_HEADERS=1 -DHAVE_LIMITS_
H=1 -DHAVE_UNISTD_H=1 -DHAVE_COMPLETE_IOMANIP=1 -I. -D_THREAD_SAFE -I/usr/local/include/OpenEXR -I.. -pipe -O2 -pipe -fno-strict-aliasing -MT CtlRbfInterpolato
r.lo -MD -MP -MF .deps/CtlRbfInterpolator.Tpo -c CtlRbfInterpolator.cpp -o CtlRbfInterpolator.o >/dev/null 2>&1
mv -f .deps/CtlRbfInterpolator.Tpo .deps/CtlRbfInterpolator.Plo
...

Maximum data size for scatteredDataToGrid3D(...)?

Is there a maximum size for the data set in scatteredDataToGrid? Using ctlrender I run into trouble with the CTL below but when I truncate most of the data it works fine.

The error I get with the large data set: Assertion failed: (sigma > .0f), function kernel, file /tmp/ctl-sQsqh1/CTL-ctl-1.5.2/lib/IlmCtlMath/CtlRbfInterpolator.cpp, line 77.

const float minLUT3D[3] = {0.0, 0.0, 0.0};
const float maxLUT3D[3] = {1.0, 1.0, 1.0};
const float data[][2][3] =
        {
            {{0.406317, 0.413001, 0.338628}, {0.406317, 0.413001, 0.338628}},
            {{0.456565, 0.469993, 0.423239}, {0.456565, 0.469993, 0.423239}},
            {{0.738231, 0.702113, 0.610636}, {0.738231, 0.702113, 0.610636}},
            {{0.381430, 0.375586, 0.340856}, {0.381430, 0.375586, 0.340856}},
            {{0.634546, 0.603052, 0.480674}, {0.634546, 0.603052, 0.480674}},
            {{0.446357, 0.445991, 0.383597}, {0.446357, 0.445991, 0.383597}},
            {{0.632502, 0.613642, 0.448280}, {0.632502, 0.613642, 0.448280}},
            {{0.497597, 0.492256, 0.466331}, {0.497597, 0.492256, 0.466331}},
            {{0.412024, 0.418799, 0.348653}, {0.412024, 0.418799, 0.348653}},
            {{0.428977, 0.428580, 0.357183}, {0.428977, 0.428580, 0.357183}},
            {{0.374533, 0.392370, 0.341527}, {0.374533, 0.392370, 0.341527}},
            {{0.520043, 0.498222, 0.412421}, {0.520043, 0.498222, 0.412421}},
            {{0.090929, 0.684276, 0.090929}, {0.090929, 0.684276, 0.090929}},
            {{0.214115, 0.191669, 0.190494}, {0.214115, 0.191669, 0.190494}},
            {{0.663981, 0.621118, 0.550607}, {0.663981, 0.621118, 0.550607}},
            {{0.363851, 0.380728, 0.339895}, {0.363851, 0.380728, 0.339895}},
            {{0.542260, 0.533425, 0.411887}, {0.542260, 0.533425, 0.411887}},
            {{0.476081, 0.477241, 0.395727}, {0.476081, 0.477241, 0.395727}},
            {{0.565087, 0.551614, 0.427649}, {0.565087, 0.551614, 0.427649}},
            {{0.544533, 0.540444, 0.448981}, {0.544533, 0.540444, 0.448981}},
            {{0.345373, 0.357000, 0.328435}, {0.345373, 0.357000, 0.328435}},
            {{0.601923, 0.560021, 0.467674}, {0.601923, 0.560021, 0.467674}},
            {{0.345190, 0.335653, 0.300679}, {0.345190, 0.335653, 0.300679}},
            {{0.533516, 0.538582, 0.465354}, {0.533516, 0.538582, 0.465354}},
            {{0.090929, 0.090929, 0.684276}, {0.090929, 0.090929, 0.684276}},
            {{0.508370, 0.418509, 0.374533}, {0.508370, 0.418509, 0.374533}},
            {{0.595163, 0.597330, 0.448356}, {0.595163, 0.597330, 0.448356}},
            {{0.389410, 0.407645, 0.342565}, {0.389410, 0.407645, 0.342565}},
            {{0.557656, 0.536019, 0.459174}, {0.557656, 0.536019, 0.459174}},
            {{0.334371, 0.348577, 0.307698}, {0.334371, 0.348577, 0.307698}},
            {{0.489021, 0.469108, 0.390021}, {0.489021, 0.469108, 0.390021}},
            {{0.465980, 0.468910, 0.378943}, {0.465980, 0.468910, 0.378943}},
            {{0.414679, 0.449714, 0.368704}, {0.414679, 0.449714, 0.368704}},
            {{0.497490, 0.482933, 0.396887}, {0.497490, 0.482933, 0.396887}},
            {{0.432166, 0.420340, 0.394965}, {0.432166, 0.420340, 0.394965}},
            {{0.425467, 0.418021, 0.377584}, {0.425467, 0.418021, 0.377584}},
            {{0.090929, 0.684276, 0.684276}, {0.090929, 0.684276, 0.684276}},
            {{0.509087, 0.450126, 0.408042}, {0.509087, 0.450126, 0.408042}},
            {{0.462669, 0.457984, 0.376547}, {0.462669, 0.457984, 0.376547}},
            {{0.512322, 0.497337, 0.466087}, {0.512322, 0.497337, 0.466087}},
            {{0.903532, 0.848753, 0.812863}, {0.903532, 0.848753, 0.812863}},
            {{0.331365, 0.342931, 0.276066}, {0.331365, 0.342931, 0.276066}},
            {{0.520989, 0.499199, 0.485878}, {0.520989, 0.499199, 0.485878}},
            {{0.354543, 0.357534, 0.335332}, {0.354543, 0.357534, 0.335332}},
            {{0.414405, 0.444663, 0.491325}, {0.414405, 0.444663, 0.491325}},
            {{0.453605, 0.468452, 0.488640}, {0.453605, 0.468452, 0.488640}},
            {{0.256001, 0.245762, 0.227680}, {0.256001, 0.245762, 0.227680}},
            {{0.443534, 0.431174, 0.431418}, {0.443534, 0.431174, 0.431418}},
            {{0.684276, 0.684276, 0.090929}, {0.684276, 0.684276, 0.090929}},
            {{0.444327, 0.450263, 0.470115}, {0.444327, 0.450263, 0.470115}},
            {{0.470832, 0.519127, 0.531014}, {0.470832, 0.519127, 0.531014}},
            {{0.430045, 0.436683, 0.459770}, {0.430045, 0.436683, 0.459770}},
            {{0.561944, 0.596551, 0.599496}, {0.561944, 0.596551, 0.599496}},
            {{0.403647, 0.425483, 0.387243}, {0.403647, 0.425483, 0.387243}},
            {{0.480720, 0.483192, 0.498314}, {0.480720, 0.483192, 0.498314}},
            {{0.477775, 0.457740, 0.408347}, {0.477775, 0.457740, 0.408347}},
            {{0.351324, 0.355947, 0.374868}, {0.351324, 0.355947, 0.374868}},
            {{0.236103, 0.240024, 0.227817}, {0.236103, 0.240024, 0.227817}},
            {{0.420645, 0.435584, 0.367514}, {0.420645, 0.435584, 0.367514}},
            {{0.659434, 0.595590, 0.600229}, {0.659434, 0.595590, 0.600229}},
            {{0.323857, 0.343130, 0.307485}, {0.323857, 0.343130, 0.307485}},
            {{0.388754, 0.412543, 0.459632}, {0.388754, 0.412543, 0.459632}},
            {{0.208026, 0.220600, 0.230396}, {0.208026, 0.220600, 0.230396}},
            {{0.337789, 0.332555, 0.343603}, {0.337789, 0.332555, 0.343603}},
            {{0.221195, 0.218799, 0.190295}, {0.221195, 0.218799, 0.190295}},
            {{0.328557, 0.345235, 0.268437}, {0.328557, 0.345235, 0.268437}},
            {{0.552544, 0.557916, 0.563210}, {0.552544, 0.557916, 0.563210}},
            {{0.264607, 0.328923, 0.325521}, {0.264607, 0.328923, 0.325521}},
            {{0.415030, 0.422049, 0.452445}, {0.415030, 0.422049, 0.452445}},
            {{0.230076, 0.231754, 0.236088}, {0.230076, 0.231754, 0.236088}},
            {{0.520150, 0.540627, 0.549859}, {0.520150, 0.540627, 0.549859}},
            {{0.452094, 0.388434, 0.355230}, {0.452094, 0.388434, 0.355230}},
            {{0.318883, 0.298497, 0.261097}, {0.318883, 0.298497, 0.261097}},
            {{0.516655, 0.516884, 0.532250}, {0.516655, 0.516884, 0.532250}},
            {{0.589014, 0.590661, 0.638239}, {0.589014, 0.590661, 0.638239}},
            {{0.223743, 0.230640, 0.244846}, {0.223743, 0.230640, 0.244846}},
            {{0.701259, 0.505852, 0.473487}, {0.701259, 0.505852, 0.473487}},
            {{0.434989, 0.434989, 0.434989}, {0.434989, 0.434989, 0.434989}},
            {{0.407874, 0.408545, 0.416770}, {0.407874, 0.408545, 0.416770}},
            {{0.547494, 0.545007, 0.589822}, {0.547494, 0.545007, 0.589822}},
            {{0.387549, 0.394614, 0.418219}, {0.387549, 0.394614, 0.418219}},
            {{0.579782, 0.584085, 0.624399}, {0.579782, 0.584085, 0.624399}},
            {{0.436576, 0.452445, 0.479637}, {0.436576, 0.452445, 0.479637}},
            {{0.282918, 0.252384, 0.262135}, {0.282918, 0.252384, 0.262135}},
            {{0.434989, 0.434989, 0.434989}, {0.434989, 0.434989, 0.434989}},
            {{0.438178, 0.440238, 0.471702}, {0.438178, 0.440238, 0.471702}},
            {{0.554009, 0.547204, 0.582010}, {0.554009, 0.547204, 0.582010}},
            {{0.425544, 0.436759, 0.468864}, {0.425544, 0.436759, 0.468864}},
            {{0.513176, 0.514702, 0.428305}, {0.513176, 0.514702, 0.428305}},
            {{0.434989, 0.434989, 0.434989}, {0.434989, 0.434989, 0.434989}},
            {{0.339300, 0.343267, 0.362417}, {0.339300, 0.343267, 0.362417}},
            {{0.333333, 0.272801, 0.282780}, {0.333333, 0.272801, 0.282780}},
            {{0.448096, 0.465522, 0.494377}, {0.448096, 0.465522, 0.494377}},
            {{0.321630, 0.249287, 0.249210}, {0.321630, 0.249287, 0.249210}},
            {{0.452064, 0.465385, 0.477485}, {0.452064, 0.465385, 0.477485}},
            {{0.330465, 0.301137, 0.305516}, {0.330465, 0.301137, 0.305516}},
            {{0.434989, 0.434989, 0.434989}, {0.434989, 0.434989, 0.434989}},
            {{0.426627, 0.446418, 0.490425}, {0.426627, 0.446418, 0.490425}},
            {{0.524559, 0.522332, 0.571725}, {0.524559, 0.522332, 0.571725}},
            {{0.294697, 0.310552, 0.339574}, {0.294697, 0.310552, 0.339574}},
            {{0.597543, 0.420935, 0.366033}, {0.597543, 0.420935, 0.366033}},
            {{0.434989, 0.434989, 0.434989}, {0.434989, 0.434989, 0.434989}},
            {{0.507607, 0.512856, 0.526040}, {0.507607, 0.512856, 0.526040}},
            {{0.322393, 0.270665, 0.283528}, {0.322393, 0.270665, 0.283528}}
        };

const float lut3D[33][33][33][3], scatteredDataToGrid3D (data, minLUT3D, maxLUT3D, lut3D);

void main
 (
 input varying float rIn,
 input varying float gIn,
 input varying float bIn,
 input varying float aIn,
 output varying float rOut,
 output varying float gOut,
 output varying float bOut,
 output varying float aOut
 )
 {
 float r = rIn;
 float g = gIn;
 float b = bIn;
 lookup3D_f(lut3D, minLUT3D, maxLUT3D, r, g, b, r, g, b);
 rOut = r;
 gOut = g;
 bOut = b;
 aOut = aIn;
 }

CTL version synchronization

The version of CTL used within ctlrender may not be in synchronization with the official CTL libraries. These differences should be reconciled pushing useful new features back to the main CTL source.

Various minor typos in ctlrender usage text

In ctlrender -help: -output_scale is missing closing angle bracket

In ctlrender -help format: inconsistent use of periods at end of details for each format

In ctlrender -help scale: various copy/paste bugs. An unfinished statement warning about pitfalls of ADX values.

readme.md Ubuntu install instructions to run optional unit test do not work

Currently the readme.md Ubuntu install instructions have info about how to run optional unit tests, but the instructions don't work
the current instructions are:
sudo make checkcd
this gives error
make: *** No rule to make target 'checkcd'. Stop.
this issue can be fixed by changing the instructions to:
sudo make check
which will run the unit tests and actually finds that the unit tests are currently broken because of missing includes

Raise Minimum Version to CMake v.2.8.4

In: CTL/unittest/ctlrender/CMakeLists.txt

The WORKING_DIRECTORY parameter is a feature of cmake v.2.8.4

add_test(
    NAME ctlrender
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    COMMAND ./test.sh $<TARGET_FILE:ctlrender>
)

#add_dependencies(check ctlrender)

ctlrender unittest fails on OSX

I am updating my homebrew formula for ctl to 1.5. When adding make check by default i ran into a unittest error:

Logfile: https://gist.github.com/cbenhagen/a1e10ab3164800492c76

You can test by running:

brew install https://github.com/cbenhagen/homebrew/raw/aces_container/Library/Formula/aces_container.rb
brew install -vd https://github.com/cbenhagen/homebrew/raw/ctl/Library/Formula/ctl.rb

ctlrender scaling behavior and documention

The documentation for ctlrender’s scaling of integer content reads like this:

> ctlrender -help scale 
input and output value scaling:

    To deal with differences in input and output file bit depth, the ability
    to scale input and output values has been provided. While these options
    are primarily of use for integral file formats, they can be used with
    file formats that store data in floating point or psuedo-floating point
    formats. The default handling of the input and output scaling is variant
    on the format of the input (and output) file, but is intended to behave 
    as one expects.

    integral input files (integer tiff, integer dpx):
        If the '-input_scale' option is provided then the sample value from
        the file is *divided by* the specified scale.
        If the '-input_scale' option is not provided, then the input values
        are scaled to the range 0.0-1.0 (inclusive). For the purposes of
        this argument, DPX files are considered an integral file format,
        however ACES files are *not*. This is equivalent to specifying
        -input_scale <bits_per_sample_in_input_file>

    floating point input files (exr, floatint point TIFF, floating point
    dpx):
        If the '-input_scale' option is provided then the sample values
        are *multiplied by* the scale value.
        If the '-input_scale' option is not provided then the sample values
        from the file is used as-is (with a scale of 1.0).

    integral output files (integer tiff, integer dpx):
        If the '-output_scale' option is provided then the sample value from
        the CTL transformation is *multiplied by* the scale factor.
        If the '-output_scale' option is not provided, then the values of
        0.0-1.0 from the CTL transformation are scaled to the bit depth of
        the output file. For the purposes of this argument, DPX files are
        considered an integral file format, however ACES files are *not*.
        This is equivalent to specifying
        -output_scale <bits_per_sample_in_output_file>

    floating point output files (exr, floatint point TIFF, floating point
    dpx):
        If the '-output_scale' option is provided then the sample values
        are *divided by* the scale value.
        If the '-output_scale' option is not provided then the sample values
        from the file is used as-is (with a scale of 1.0).

    In all cases the CTL output values (after output_scaling) are clipped
    to the maximum values supported by the output file format.

The final sentences of the paragraphs on integral input and output files say This is equivalent to specifying -input_scale <bits_per_sample_in_input_file> and This is equivalent to specifying -output_scale <bits_per_sample_in_output_file>
Is that correct? I would think the equivalences was to specifying -input_scale 2^<bits_per_sample_in_input_file> - 1 and -output_scale 2^<bits_per_sample_in_output_file> - 1

If the -help scale output is incorrect, this should be fixed. In practice, actual behavior does not seem to correlate with the documentation. It would be helpful to have an example provided for each option to make clear when and how one might use each option.

Mac ilmbase files not included

Hello. I'm installing CTL on a Mac running OSX 10.8.4. Everything is installing correctly except for that when I run "make" in the build directory, the CTL files cannot find ilmbase. I get "/Users/oscar/Projects/CTL-1.5/CTL/lib/IlmCtl/CtlRcPtr.h:71:10: fatal error: 'IlmThreadMutex.h' file not found.
This is odd because when running cmake, Ilmbase is found. Somehow during compilation this found folder is not being included. I could link the directories or manually add the files but that defeats the purpose of discovering the issue. I also believe we had a similar issue on the other Mac in the lab so this might be a Mac specific bug. I'm pretty new to cmake so any suggestions would be appreciated.
Thanks.

scatteredDataToGrid() in detail

How does the scatteredDataToGrid() function create the source and destination grid? Does it sort the values properly before so there are no odd twists in the transform?

Reason I'm asking is I'm trying to match one macbeth to another by sampling the 24 source and destination patches and overall the results look pretty close, however the blacks get really lifted and the red patch that was matching pretty closely before got very desaturated. Does the interpolation of the grid towards the extreme boundaries of the grid cause the issues? Am I missing a step?

Thanks very much for any input!

Nhat

Can't build on Ubuntu error: no match for ‘operator<<’

Hi,

I am using the following :

  • OS: Pop!_OS (Linux pop-os 5.4.0-7642-generic)
  • Cmake: cmake version 3.16.3
  • libopenexr-dev: 2.3.0-6ubuntu0.2
  • libilmbase-dev: 2.3.0-6build1

And i am trying to build the project by following those steps (from the README.md file):

$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install

And this is the error :

In file included from /usr/local/include/OpenEXR/Iex.h:48,
                 from CTL/lib/IlmCtlSimd/CtlSimdReg.h:60,
                 from CTL/lib/IlmCtlSimd/CtlSimdInst.h:65,
                 from CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:61:
CTL/lib/IlmCtlSimd/CtlSimdInst.cpp: In member function ‘void Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const’:
CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:192:31: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘Iex_2_5::BaseExc’)
  192 |    inst->lineNumber() << ": " << e);
      |                               ^~ ~
      |                                  |
      |                                  Iex_2_5::BaseExc
/usr/local/include/OpenEXR/IexMacros.h:110:27: note: in definition of macro ‘REPLACE_EXC’
  110 |         _iex_replace_s << text;              \
      |         
                  ^~~~

What am I missing here?

Thanks in advance

CTL git does not compile on windows

The first problem is that the constructor with ... is not recognized by the compiler. The problem appears on VC10, VC11 and VC12.

[ 4%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlExc.cpp.obj
CtlExc.cpp
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(95) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor available

F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(99) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor available

F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(101) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(103) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(105) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(107) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(109) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(111) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(113) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(115) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(118) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.h(121) : error C2512: 'Ctl::CtlExc' : no appropriate default constructor availabl
e
F:\code\lib\ctl-git2\lib\IlmCtl\CtlExc.cpp(80) : error C3861: 'va_copy': identifier not found
NMAKE : fatal error U1077: 'c:\PROGRA2\MICROS1.0\VC\bin\amd64\cl.exe' : return code '0x2'

readme.md tiff install instuctions in Ubuntu 20.04 doesn't work

Currently the readme.md says TIFF can optionally be installed in Ubuntu with
sudo apt-get install libtiff4
but this doesn't seem to work anymore in Ubuntu 20.04 gives error
E: Unable to locate package libtiff4
this issue can be fixed by instead installing libtiff in Ubuntu with
sudo apt-get install libtiff-dev
I suggest the readme.md is updated accordingly

Compilation error caused by including OpenEXR related header

I am not able to compile the code because whenever a OpenEXR related header is included it throws an error. For example,

/home/jasjuang/CTL/lib/IlmCtl/CtlExc.h:66:24: fatal error: IexBaseExc.h: No such file or directory

Then I realized in CtlExc.h it's simply doing

#include <IexBaseExc.h> 

but if I change the code to

#include <OpenEXR/IexBaseExc.h> 

it passes compilation for this part. There are other numerous OpenEXR related header that throws the same compilation error? Why isn't there a OpenEXR prefix for all the included header? If I install it with sudo apt-get install libilmbase-dev, the header will showup at /usr/include/OpenEXR/IexBaseExc.h, if I install it from source, it will show up in /usr/local/include/OpenEXR/IexBaseExc.h, so no matter what there will be a OpenEXR prefix in the path for the header.

CtlIntrepreter.cpp fails compile - closed...solved via ctl_1.5_rc

Any idea what could be missing to cause this? Using system openexr package which appears to work (i was able to compile and use exrdisplay for example)

(verified that openexr on system)

slackpkg search exr

Looking for exr in package list. Please wait... DONE
The list below shows all packages with name matching "exr".
[ installed ] - openexr-1.7.0-i486-1

(compilation error)
Making all in IlmCtl
make[1]: Entering directory `/home//CTL/IlmCtl'
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DPACKAGE_NAME="CTL" -DPACKAGE_TARNAME="ctl" -DPACKAGE_VERSION="1.4.1" -DPACKAGE_STRING="CTL\ 1.4.1" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="ctl" -DVERSION="1.4.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_COMPLETE_IOMANIP=1 -I. -pthread -I/usr/include/OpenEXR -I.. -pipe -g -O2 -MT CtlInterpreter.lo -MD -MP -MF .deps/CtlInterpreter.Tpo -c -o CtlInterpreter.lo CtlInterpreter.cpp
libtool: compile: g++ -DPACKAGE_NAME="CTL" -DPACKAGE_TARNAME="ctl" -DPACKAGE_VERSION="1.4.1" "-DPACKAGE_STRING="CTL 1.4.1"" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="ctl" -DVERSION="1.4.1" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DSTDC_HEADERS=1 -DHAVE_LIMITS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_COMPLETE_IOMANIP=1 -I. -pthread -I/usr/include/OpenEXR -I.. -pipe -g -O2 -MT CtlInterpreter.lo -MD -MP -MF .deps/CtlInterpreter.Tpo -c CtlInterpreter.cpp -fPIC -DPIC -o .libs/CtlInterpreter.o
CtlInterpreter.cpp: In function 'std::string Ctl::{anonymous}::findModule(const string&)':
CtlInterpreter.cpp:196:34: error: 'F_OK' was not declared in this scope
CtlInterpreter.cpp:196:38: error: 'access' was not declared in this scope
make[1]: *** [CtlInterpreter.lo] Error 1

CTL git does not compile on windows (part 2)

CtlInterpreter.cpp is missing several includes and uses the unportable lrand48() function.

Here are the includes I had to add to make it portable.

ifdef _WIN32

#include \<io.h\>
#include \<stdio.h\>
#include \<stdlib.h\>
#include \<time.h\>
#define snprintf _snprintf

else

#include \<unistd.h\>

endif

'-format aces' flag does not produce valid image files

Something appears to have broken in the '-format aces' output option.

ctlrender does not return an error, and the file appears to have been written successfully. However, the resulting file is unrecognized by both the operating system and by OpenEXR utilities such as exrheader.

I am on a Mac running OS 10.9.1, running the following:
-- found IlmBase, version 2.0.1
-- found TIFF, version 4.0.3
-- Found OpenEXR, version 2.0.1
-- Found AcesContainer, version 1.0.0

PATCH to fix ilmbase 2.3.0 compatibility in lib/IlmCtlSimd/CtlSimdInst.cpp

ilmbase and OpenEXR 2.3.0 change Iex::BaseExc to no longer derive from std::string, mentioned in the release notes here: https://github.com/openexr/openexr/releases/tag/v2.3.0

This causes a compilation error on lib/IlmCtlSimd/CtlSimdInst.cpp when it propagates a caught exception, because there is no longer an implicit conversion from Iex::BaseExc to std::string available.

It appears as though the fix were to use e.what() instead of e, which is what the attached patch does.
patch-lib_IlmCtlSimd_CtlSimdInst.cpp.txt

ampasCTL not works with openexr_viewers

Now are ampasCTL and ampasACES-container committed

http://www.freshports.org/graphics/ampasCTL/

http://www.freshports.org/graphics/ampasACES-container/

I wish to make openexr_viewers FreeBSD Port too

http://download.savannah.nongnu.org/releases/openexr/openexr_viewers-2.1.0.tar.gz

And get this

using pkg-config to set OPENEXR_CTL_CXXFLAGS and OPENEXR_CTL_LDFLAGS:
    OPENEXR_CTL_CXXFLAGS = -I/OpenEXR  
    OPENEXR_CTL_LDFLAGS = -L  
    OPENEXR_CTL_LIBS = -L -lIlmImfCtl   
checking for OpenEXR... yes
Compiled and ran OpenEXR test program.
checking for OpenEXR_CTL... no
*** Could not run the OpenEXR_CTL test program, checking why...
*** The test program could not be compiled.  Is OpenEXR_CTL installed?
*** Check that the cflags (below) includes the OpenEXR_CTL include directory
***
*** Flags used by the test:
***     cflags: -O2 -pipe -fno-strict-aliasing -I/OpenEXR   
***     ldflags:  -L  
***
*** You can also run configure with --disable-openexrctltest to skip this test.
The OpenEXR_CTL package could not be found.  Will build and install playexr and exrdisplay without ctl support.
    ```

    Please revert that ampasCTL use from old openexr_ctl-1.0.1 these libraries (CtlModules) that openexr_viewers can build with ctl support.

    transform_RRT.ctl
    transform_display_video.ctl 
    http://download.savannah.nongnu.org/releases/openexr/openexr_viewers-2.1.0.tar.gz

 And get this

```\n
    checking for OpenEXR_CTL... no
    *** Could not run the OpenEXR_CTL test program, checking why...
    *** The test program could not be compiled.  Is OpenEXR_CTL installed?
    *** Check that the cflags (below) includes the OpenEXR_CTL include directory
    ***
    *** Flags used by the test:
    ***     cflags: -O2 -pipe -fno-strict-aliasing -I/OpenEXR   
    ***     ldflags:  -L 
    ***
    *** You can also run configure with --disable-openexrctltest to skip this test.
    The OpenEXR_CTL package could not be found.  Will build and install playexr and exrdisplay without ctl support.

Please revert that ampasCTL use from old openexr_ctl-1.0.1 these libraries (CtlModules) that openexr_viewers can build with ctl support.

transform_RRT.ctl
transform_display_video.ctl

Compiling CTL on OS X 10.9

CTL does not seem to compile cleanly on 10.9. Below is a dump of my cmake and make steps.

scott:build (master)$ cmake ..
-- The C compiler identification is Clang 5.0.0
-- The CXX compiler identification is Clang 5.0.0
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- found IlmBase, version 1.0.2
-- found TIFF, version 3.8.2
-- Found OpenEXR, version 1.7.0
-- Found AcesContainer, version 1.0.0
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/scott/Documents/ampas/iif/src/CTL/build
scott:build (master)$ make
Scanning dependencies of target IlmCtl
[  1%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlAddr.cpp.o
[  2%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlAlign.cpp.o
[  4%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlExc.cpp.o
[  5%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlFunctionCall.cpp.o
[  7%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlInterpreter.cpp.o
[  8%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlLContext.cpp.o
[ 10%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlLex.cpp.o
[ 11%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlMessage.cpp.o
[ 12%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlModule.cpp.o
[ 14%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlModuleSet.cpp.o
[ 15%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlParser.cpp.o
[ 17%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlRcPtr.cpp.o
[ 18%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlSymbolTable.cpp.o
[ 20%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlSyntaxTree.cpp.o
[ 21%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlTokens.cpp.o
[ 22%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlType.cpp.o
[ 24%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlTypeStorage.cpp.o
[ 25%] Building CXX object lib/IlmCtl/CMakeFiles/IlmCtl.dir/CtlStdType.cpp.o
Linking CXX shared library libIlmCtl.dylib
Undefined symbols for architecture x86_64:
  "Iex::throwErrnoExc(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      Ctl::Interpreter::_loadModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in CtlInterpreter.cpp.o
  "Iex::BaseExc::BaseExc(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)", referenced from:
      Iex::TypeExc::TypeExc(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in CtlInterpreter.cpp.o
      Ctl::CtlExc::CtlExc(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in CtlInterpreter.cpp.o
      Iex::ArgExc::ArgExc(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in CtlInterpreter.cpp.o
      Iex::ArgExc::ArgExc(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in CtlModuleSet.cpp.o
      Iex::TypeExc::TypeExc(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) in CtlRcPtr.cpp.o
  "operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, half)", referenced from:
      Ctl::HalfLiteralNode::print(int) const in CtlSyntaxTree.cpp.o
      Ctl::HalfLiteralNode::printLiteral() const in CtlSyntaxTree.cpp.o
      Ctl::HalfType::evaluate(Ctl::LContext&, Ctl::RcPtr<Ctl::ExprNode> const&) const in CtlType.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/IlmCtl/libIlmCtl.1.5.0.dylib] Error 1
make[1]: *** [lib/IlmCtl/CMakeFiles/IlmCtl.dir/all] Error 2
make: *** [all] Error 2

valgrind detects error in ./unittest/IlmImfCtl/IlmImfCtlTest

valgrind -s --error-exitcode=1 --leak-check=full ./unittest/IlmImfCtl/IlmImfCtlTest

1: ==13== Memcheck, a memory error detector
1: ==13== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
1: ==13== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
1: ==13== Command: ./unittest/IlmImfCtl/IlmImfCtlTest
1: ==13==
1:
1: Testing function argument types
1: ERROR -- caught exception: Cannot find CTL module "function3".
1: IlmImfCtlTest: /usr/src/CTL/unittest/IlmImfCtl/testTypes.cpp:334: void testTypes(): Assertion `false' failed.
1: ==13==
1: ==13== Process terminating with default action of signal 6 (SIGABRT)
1: ==13== at 0x4FCA00B: raise (raise.c:51)
1: ==13== by 0x4FA9858: abort (abort.c:79)
1: ==13== by 0x4FA9728: __assert_fail_base.cold (assert.c:92)
1: ==13== by 0x4FBAFD5: __assert_fail (assert.c:101)
1: ==13== by 0x11C3F9: testTypes() (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13== by 0x11691A: main (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13==
1: ==13== HEAP SUMMARY:
1: ==13== in use at exit: 8,236 bytes in 66 blocks
1: ==13== total heap usage: 695 allocs, 629 frees, 465,323 bytes allocated
1: ==13==
1: ==13== 36 bytes in 1 blocks are possibly lost in loss record 27 of 64
1: ==13== at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==13== by 0x4ECD35D: std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==13== by 0x4ECE285: std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==13== by 0x4AA196E: Iex_2_3::BaseExc::BaseExc(std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >&) (in /usr/lib/x86_64-linux-gnu/libIex-2_3.so.24.0.0)
1: ==13== by 0x4A1A3EA: Iex_2_3::ArgExc::ArgExc(std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >&) (in /usr/src/CTL/build/lib/IlmImfCtl/libIlmImfCtl.so)
1: ==13== by 0x520534F: Ctl::Interpreter::findModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==13== by 0x5205EE8: Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==13== by 0x52055C8: Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==13== by 0x4A19F78: ImfCtl::applyTransforms(Ctl::Interpreter&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, Imath_2_3::Box<Imath_2_3::Vec2 > const&, Imf_2_3::Header const&, Imf_2_3::Header const&, Imf_2_3::FrameBuffer const&, Imf_2_3::Header&, Imf_2_3::FrameBuffer const&, int) (in /usr/src/CTL/build/lib/IlmImfCtl/libIlmImfCtl.so)
1: ==13== by 0x11B608: (anonymous namespace)::runTest(Ctl::Interpreter&) (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13== by 0x11C304: testTypes() (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13== by 0x11691A: main (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13==
1: ==13== 200 bytes in 1 blocks are possibly lost in loss record 59 of 64
1: ==13== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==13== by 0x4E331F3: __cxa_allocate_exception (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==13== by 0x520533A: Ctl::Interpreter::findModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==13== by 0x5205EE8: Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==13== by 0x52055C8: Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==13== by 0x4A19F78: ImfCtl::applyTransforms(Ctl::Interpreter&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, Imath_2_3::Box<Imath_2_3::Vec2 > const&, Imf_2_3::Header const&, Imf_2_3::Header const&, Imf_2_3::FrameBuffer const&, Imf_2_3::Header&, Imf_2_3::FrameBuffer const&, int) (in /usr/src/CTL/build/lib/IlmImfCtl/libIlmImfCtl.so)
1: ==13== by 0x11B608: (anonymous namespace)::runTest(Ctl::Interpreter&) (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13== by 0x11C304: testTypes() (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13== by 0x11691A: main (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==13==
1: ==13== LEAK SUMMARY:
1: ==13== definitely lost: 0 bytes in 0 blocks
1: ==13== indirectly lost: 0 bytes in 0 blocks
1: ==13== possibly lost: 236 bytes in 2 blocks
1: ==13== still reachable: 8,000 bytes in 64 blocks
1: ==13== suppressed: 0 bytes in 0 blocks
1: ==13== Reachable blocks (those to which a pointer was found) are not shown.
1: ==13== To see them, rerun with: --leak-check=full --show-leak-kinds=all
1: ==13==
1: ==13== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

CMakeList.txt missing library paths

lib/IlmCtlSimd/CMakeLists.txt and lib/IlmImfCtl/CMakeLists.txt are missing the library path to IlmBase and OpenEXR.

diff -rupN CTL-ctl-1.5/lib/IlmCtlSimd/CMakeLists.txt CTL-ctl-1.5.cmake_fix/lib/IlmCtlSimd/CMakeLists.txt
--- CTL-ctl-1.5/lib/IlmCtlSimd/CMakeLists.txt   2013-10-22 10:39:04.000000000 -0700
+++ CTL-ctl-1.5.cmake_fix/lib/IlmCtlSimd/CMakeLists.txt 2013-12-16 22:45:25.836945021 -0800
@@ -2,6 +2,7 @@ include_directories( "${CMAKE_CURRENT_SO

 add_executable( halfExpLogTable halfExpLogTable.cpp )
 target_link_libraries( halfExpLogTable Half )
+target_link_libraries( halfExpLogTable ${IlmBase_LDFLAGS_OTHER} )

 add_custom_command( OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/halfExpLogTable.h"
                     COMMAND halfExpLogTable "${CMAKE_CURRENT_BINARY_DIR}/halfExpLogTable.h" "${CMAKE_CURRENT_BINARY_DIR}/halfExpLog.h"
diff -rupN CTL-ctl-1.5/lib/IlmImfCtl/CMakeLists.txt CTL-ctl-1.5.cmake_fix/lib/IlmImfCtl/CMakeLists.txt
--- CTL-ctl-1.5/lib/IlmImfCtl/CMakeLists.txt    2013-10-22 10:39:04.000000000 -0700
+++ CTL-ctl-1.5.cmake_fix/lib/IlmImfCtl/CMakeLists.txt  2013-12-16 22:54:55.023503611 -0800
@@ -8,6 +8,7 @@ add_library( IlmImfCtl ${DO_SHARED}
 )

 target_link_libraries( IlmImfCtl IlmCtl IlmImf Iex IlmThread Half )
+target_link_libraries( IlmImfCtl ${IlmBase_LDFLAGS_OTHER} ${OpenEXR_LDFLAGS_OTHER} )

 install( FILES ImfCtlApplyTransforms.h DESTINATION include/OpenEXR )

ctlrender fails to link on mac

When building CTL on OS X 10.8.4 the build fails when linking ctlrender. The error says that there are undefined symbols for the x86_64 architecture. I've tried setting the compiler flags to -m64 and -arch x86_64 for gcc and g++ without success. The macbook is 64 bit. Here is the log below.

Scanning dependencies of target ctlrender
[ 77%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/main.cc.o
[ 78%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/transform.cc.o
[ 80%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/usage.cc.o
[ 81%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/aces_file.cc.o
[ 82%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/dpx_file.cc.o
[ 84%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/exr_file.cc.o
[ 85%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/tiff_file.cc.o
[ 87%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/format.cc.o
[ 88%] Building CXX object ctlrender/CMakeFiles/ctlrender.dir/compression.cc.o
Linking CXX executable ctlrender
Undefined symbols for architecture x86_64:
"aces_write(char const_, float, unsigned int, unsigned int, unsigned int, float const_, format_t_)", referenced from:
transform(char const_, char const_, float, float, format_t_, Compression_, std::list<ctl_operation_t, std::allocator<ctl_operation_t> > const&, std::list<ctl_parameter_t, std::allocator<ctl_parameter_t> > const&)in transform.cc.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *_* [ctlrender/ctlrender] Error 1
make[1]: *** [ctlrender/CMakeFiles/ctlrender.dir/all] Error 2
make: *** [all] Error 2

Nested structure initialization causes syntax error

Is initialization of nested structures supported? Should it be a syntax error?

ctlversion 1;

struct Test {
  float a;
  float b;
};

Test buildTest(float a, float b)
{
  Test test = { a, b };
  return test;
}

struct NestedStruct {
  Test test;
  float v;
};

void testFunction()
{
  // This works
  NestedStruct a;
  a.test = buildTest(1.0, 2.0);
  a.v = 3.0;

  // This fails.  Should the error be syntax error?
  Test b = buildTest(1.0, 2.0);
  NestedStruct c = { b, 3.0 };

  // This fails.  Should the error be syntax error?
  NestedStruct d = { buildTest(1.0, 2.0), 3.0 };
}

valgrind detects error in ./unittest/IlmImfCtl/IlmImfCtlTest

valgrind -s --error-exitcode=1 --leak-check=full ./unittest/IlmImfCtl/IlmImfCtlTest

1: ==14== Memcheck, a memory error detector
1: ==14== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
1: ==14== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
1: ==14== Command: ./unittest/IlmImfCtl/IlmImfCtlTest
1: ==14==
1:
1: Testing function argument types
1: ERROR -- caught exception: Cannot find CTL module "function3".
1: IlmImfCtlTest: /usr/src/CTL/unittest/IlmImfCtl/testTypes.cpp:334: void testTypes(): Assertion `false' failed.
1: ==14==
1: ==14== Process terminating with default action of signal 6 (SIGABRT)
1: ==14== at 0x4FCA00B: raise (raise.c:51)
1: ==14== by 0x4FA9858: abort (abort.c:79)
1: ==14== by 0x4FA9728: __assert_fail_base.cold (assert.c:92)
1: ==14== by 0x4FBAFD5: __assert_fail (assert.c:101)
1: ==14== by 0x11C3F9: testTypes() (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14== by 0x11691A: main (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14==
1: ==14== HEAP SUMMARY:
1: ==14== in use at exit: 8,236 bytes in 66 blocks
1: ==14== total heap usage: 695 allocs, 629 frees, 465,323 bytes allocated
1: ==14==
1: ==14== 36 bytes in 1 blocks are possibly lost in loss record 27 of 64
1: ==14== at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==14== by 0x4ECD35D: std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==14== by 0x4ECE285: std::__cxx11::basic_string<char, std::char_traits, std::allocator >::_M_replace(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==14== by 0x4AA196E: Iex_2_3::BaseExc::BaseExc(std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >&) (in /usr/lib/x86_64-linux-gnu/libIex-2_3.so.24.0.0)
1: ==14== by 0x4A1A3EA: Iex_2_3::ArgExc::ArgExc(std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >&) (in /usr/src/CTL/build/lib/IlmImfCtl/libIlmImfCtl.so)
1: ==14== by 0x520534F: Ctl::Interpreter::findModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==14== by 0x5205EE8: Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==14== by 0x52055C8: Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==14== by 0x4A19F78: ImfCtl::applyTransforms(Ctl::Interpreter&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, Imath_2_3::Box<Imath_2_3::Vec2 > const&, Imf_2_3::Header const&, Imf_2_3::Header const&, Imf_2_3::FrameBuffer const&, Imf_2_3::Header&, Imf_2_3::FrameBuffer const&, int) (in /usr/src/CTL/build/lib/IlmImfCtl/libIlmImfCtl.so)
1: ==14== by 0x11B608: (anonymous namespace)::runTest(Ctl::Interpreter&) (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14== by 0x11C304: testTypes() (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14== by 0x11691A: main (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14==
1: ==14== 200 bytes in 1 blocks are possibly lost in loss record 59 of 64
1: ==14== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==14== by 0x4E331F3: __cxa_allocate_exception (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28)
1: ==14== by 0x520533A: Ctl::Interpreter::findModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==14== by 0x5205EE8: Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==14== by 0x52055C8: Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) (in /usr/src/CTL/build/lib/IlmCtl/libIlmCtl.so.1.5.0)
1: ==14== by 0x4A19F78: ImfCtl::applyTransforms(Ctl::Interpreter&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, Imath_2_3::Box<Imath_2_3::Vec2 > const&, Imf_2_3::Header const&, Imf_2_3::Header const&, Imf_2_3::FrameBuffer const&, Imf_2_3::Header&, Imf_2_3::FrameBuffer const&, int) (in /usr/src/CTL/build/lib/IlmImfCtl/libIlmImfCtl.so)
1: ==14== by 0x11B608: (anonymous namespace)::runTest(Ctl::Interpreter&) (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14== by 0x11C304: testTypes() (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14== by 0x11691A: main (in /usr/src/CTL/build/unittest/IlmImfCtl/IlmImfCtlTest)
1: ==14==
1: ==14== LEAK SUMMARY:
1: ==14== definitely lost: 0 bytes in 0 blocks
1: ==14== indirectly lost: 0 bytes in 0 blocks
1: ==14== possibly lost: 236 bytes in 2 blocks
1: ==14== still reachable: 8,000 bytes in 64 blocks
1: ==14== suppressed: 0 bytes in 0 blocks
1: ==14== Reachable blocks (those to which a pointer was found) are not shown.
1: ==14== To see them, rerun with: --leak-check=full --show-leak-kinds=all
1: ==14==
1: ==14== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)

valgrind errors with unittest IlmImfCtlTest - memory leak - 224 bytes directly lost, 48 bytes indirectly lost

compiled in debug mode first before running valgrind

cd build
rm -R *
cmake -DCMAKE_BUILD_TYPE=Debug ..
make

valgrind detects bytes in use at exit: 272 bytes in 3 blocks

1: + cd ./unittest/IlmImfCtl/
1: + valgrind -s --error-exitcode=1 --leak-check=full --track-origins=yes --show-leak-kinds=all ./IlmImfCtlTest
1: ==765== Memcheck, a memory error detector
1: ==765== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
1: ==765== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
1: ==765== Command: ./IlmImfCtlTest
1: ==765== 
1: 
1: Testing function argument types
1: ok
1: 
1: Testing function argument sources and destinations
1: 	number of threads = 0
1: 	number of threads = 1
1: 	number of threads = 2
1: 	number of threads = 3
1: ok
1: 
1: ==765== 
1: ==765== HEAP SUMMARY:
1: ==765==     in use at exit: 272 bytes in 3 blocks
1: ==765==   total heap usage: 4,493 allocs, 4,490 frees, 3,494,682 bytes allocated
1: ==765== 
1: ==765== 16 bytes in 1 blocks are indirectly lost in loss record 1 of 3
1: ==765==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==765==    by 0x53C6885: void std::vector<IlmThread_2_3::Task*, std::allocator<IlmThread_2_3::Task*> >::_M_realloc_insert<IlmThread_2_3::Task* const&>(__gnu_cxx::__normal_iterator<IlmThread_2_3::Task**, std::vector<IlmThread_2_3::Task*, std::allocator<IlmThread_2_3::Task*> > >, IlmThread_2_3::Task* const&) (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x53C628D: ??? (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x53C619F: IlmThread_2_3::ThreadPool::addTask(IlmThread_2_3::Task*) (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x4A1A138: ImfCtl::applyTransforms(Ctl::Interpreter&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, Imath_2_3::Box<Imath_2_3::Vec2<int> > const&, Imf_2_3::Header const&, Imf_2_3::Header const&, Imf_2_3::FrameBuffer const&, Imf_2_3::Header&, Imf_2_3::FrameBuffer const&, int) (ImfCtlApplyTransforms.cpp:523)
1: ==765==    by 0x117610: (anonymous namespace)::runTest(Ctl::Interpreter&, int) (testSourceDestination.cpp:176)
1: ==765==    by 0x118079: testSourceDestination() (testSourceDestination.cpp:239)
1: ==765==    by 0x116943: main (main.cpp:72)
1: ==765== 
1: ==765== 32 bytes in 1 blocks are indirectly lost in loss record 2 of 3
1: ==765==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==765==    by 0x53C5871: ??? (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x53C5BC0: ??? (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x53C66AF: IlmThread_2_3::ThreadPool::setNumThreads(int) (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x116A24: (anonymous namespace)::runTest(Ctl::Interpreter&, int) (testSourceDestination.cpp:80)
1: ==765==    by 0x11808A: testSourceDestination() (testSourceDestination.cpp:240)
1: ==765==    by 0x116943: main (main.cpp:72)
1: ==765== 
1: ==765== 272 (224 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 3 of 3
1: ==765==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==765==    by 0x53C66D1: IlmThread_2_3::ThreadPool::setNumThreads(int) (in /usr/lib/x86_64-linux-gnu/libIlmThread-2_3.so.24.0.0)
1: ==765==    by 0x116A24: (anonymous namespace)::runTest(Ctl::Interpreter&, int) (testSourceDestination.cpp:80)
1: ==765==    by 0x118068: testSourceDestination() (testSourceDestination.cpp:238)
1: ==765==    by 0x116943: main (main.cpp:72)
1: ==765== 
1: ==765== LEAK SUMMARY:
1: ==765==    definitely lost: 224 bytes in 1 blocks
1: ==765==    indirectly lost: 48 bytes in 2 blocks
1: ==765==      possibly lost: 0 bytes in 0 blocks
1: ==765==    still reachable: 0 bytes in 0 blocks
1: ==765==         suppressed: 0 bytes in 0 blocks
1: ==765== 
1: ==765== ERROR SUMMARY: 1 errors from 1 co
```ntexts (suppressed: 0 from 0)

valgrind errors with unittest IlmCtlTest - Conditional jump or move depends on uninitialised value(s)

compiled in debug mode first before running valgrind

cd build
rm -R *
cmake -DCMAKE_BUILD_TYPE=Debug ..
make

3 similar issues found by valgrind related to :
Conditional jump or move depends on uninitialised value(s)
testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
Uninitialised value was created by a heap allocations
testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)

1: + cd ./unittest/IlmCtl/
1: + valgrind -s --error-exitcode=1 --leak-check=full --track-origins=yes --show-leak-kinds=all ./IlmCtlTest
1: ==763== Memcheck, a memory error detector
1: ==763== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
1: ==763== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
1: ==763== Command: ./IlmCtlTest
1: ==763== 
1: 
1: Testing end-of-line conventions
1: Dos source file
1: Unix source file
1: Mac source file
1: ok
1: 
1: Testing parser
1: Testing variable scope
1: ok
1: Testing more variable scope
1: ok
1: Testing integer and floating-point literals
1: "''	
1:  line 1 
1:  line 2
1: string string one two three one two three
1: ok
1: Testing comments
1: ok
1: Testing operations on type bool, run-time
1: ok
1: Testing operations on type bool, compile-time
1: ok
1: Testing operations on type int, run-time
1: ok
1: Testing operations on type int, compile-time
1: ok
1: Testing operations on type unsigned int, run-time
1: ok
1: Testing operations on type unsigned int, compile-time
1: ok
1: Testing operations on type half, run-time
1: ok
1: Testing operations on type half, compile-time
1: ok
1: Testing operations on type float, run-time
1: ok
1: Testing operations on type float, compile-time
1: ok
1: Testing while and for loops
1: ok
1: Testing cos(), exp(), sqrt() etc.
1: ok
1: Testing operations on 3x3 and 4x4 matrices and 3D vectors
1: ok
1: Testing conversion between RGB and CIE XYZ
1: ok
1: Testing conversion between CIE XYZ and CIE L*u*v*
1: ok
1: Testing conversion between CIE XYZ and CIE L*a*b*
1: ok
1: Testing 1D table lookups: linear, regular spacіng
1: ok
1: Testing 1D table lookups: cubic, regular spacing
1: ok
1: Testing 3D table lookups, trilinear, regular spacing
1: ok
1: Testing 1D table lookups: linear, random spacing
1: ok
1: Testing 1D table lookups: cubic, random spacing
1: ok
1: Testing divisions by zero
1: ok
1: Testing 3D scattered data interpolation
1: ok
1: Testing CTL version check
1: ok
1: 1 2 3 4 5 
1: b = 0, f = -1.2e-07, random literals: 4, 3
1: ok
1: 
1: Testing varying examples from documentation.
1: 1 2 3 4 5 
1: b = 0, f = -1.2e-07, random literals: 4, 3
1: all f: [varying (0, 1.2) (1, 0) (2, 0) (3, -1.001) (4, 0)]
1: f > 1: [varying (0, 1.2)]
1: ok
1: 
1: Testing function calls from C++.
1: ok
1: 
1: Testing varying data.
1: ok
1: 
1: Testing varying data with branching & return stmt.
1: ok
1: 
1: Testing table lookups with varying data
1: 1D, linear, regular spacing
1: 1D, cubic, regular spacing
1: ==763== Conditional jump or move depends on uninitialised value(s)
1: ==763==    at 0x5093409: float Imath_2_3::clamp<float>(float, float, float) (ImathFun.h:113)
1: ==763==    by 0x5092163: Ctl::lookup1D(float const*, int, float, float, float) (CtlLookupTable.cpp:119)
1: ==763==    by 0x5092252: Ctl::lookupCubic1D(float const*, int, float, float, float) (CtlLookupTable.cpp:138)
1: ==763==    by 0x48D4FCC: Ctl::(anonymous namespace)::simdDoLookup1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&, float (*)(float const*, int, float, float, float)) (CtlSimdStdLibLookupTable.cpp:137)
1: ==763==    by 0x48D50F5: Ctl::(anonymous namespace)::simdLookupCubic1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&) (CtlSimdStdLibLookupTable.cpp:177)
1: ==763==    by 0x48C22E6: Ctl::SimdCCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:476)
1: ==763==    by 0x48C1064: Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:185)
1: ==763==    by 0x4925B58: Ctl::SimdXContext::run(int, Ctl::SimdInst const*) (CtlSimdXContext.cpp:233)
1: ==763==    by 0x48BE0C2: Ctl::SimdFunctionCall::callFunction(unsigned long) (CtlSimdFunctionCall.cpp:148)
1: ==763==    by 0x120F5F: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763==  Uninitialised value was created by a heap allocation
1: ==763==    at 0x483C583: operator new[](unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==763==    by 0x48CDC46: Ctl::SimdReg::SimdReg(bool, unsigned long) (CtlSimdReg.cpp:90)
1: ==763==    by 0x48BDCA3: Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) (CtlSimdFunctionCall.cpp:110)
1: ==763==    by 0x48C57AF: Ctl::SimdInterpreter::newFunctionCallInternal(Ctl::RcPtr<Ctl::SymbolInfo>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlSimdInterpreter.cpp:167)
1: ==763==    by 0x4A6551D: Ctl::Interpreter::newFunctionCall(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlInterpreter.cpp:507)
1: ==763==    by 0x1206B4: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763== 
1: ==763== Conditional jump or move depends on uninitialised value(s)
1: ==763==    at 0x509341B: float Imath_2_3::clamp<float>(float, float, float) (ImathFun.h:113)
1: ==763==    by 0x5092163: Ctl::lookup1D(float const*, int, float, float, float) (CtlLookupTable.cpp:119)
1: ==763==    by 0x5092252: Ctl::lookupCubic1D(float const*, int, float, float, float) (CtlLookupTable.cpp:138)
1: ==763==    by 0x48D4FCC: Ctl::(anonymous namespace)::simdDoLookup1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&, float (*)(float const*, int, float, float, float)) (CtlSimdStdLibLookupTable.cpp:137)
1: ==763==    by 0x48D50F5: Ctl::(anonymous namespace)::simdLookupCubic1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&) (CtlSimdStdLibLookupTable.cpp:177)
1: ==763==    by 0x48C22E6: Ctl::SimdCCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:476)
1: ==763==    by 0x48C1064: Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:185)
1: ==763==    by 0x4925B58: Ctl::SimdXContext::run(int, Ctl::SimdInst const*) (CtlSimdXContext.cpp:233)
1: ==763==    by 0x48BE0C2: Ctl::SimdFunctionCall::callFunction(unsigned long) (CtlSimdFunctionCall.cpp:148)
1: ==763==    by 0x120F5F: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763==  Uninitialised value was created by a heap allocation
1: ==763==    at 0x483C583: operator new[](unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==763==    by 0x48CDC46: Ctl::SimdReg::SimdReg(bool, unsigned long) (CtlSimdReg.cpp:90)
1: ==763==    by 0x48BDCA3: Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) (CtlSimdFunctionCall.cpp:110)
1: ==763==    by 0x48C57AF: Ctl::SimdInterpreter::newFunctionCallInternal(Ctl::RcPtr<Ctl::SymbolInfo>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlSimdInterpreter.cpp:167)
1: ==763==    by 0x4A6551D: Ctl::Interpreter::newFunctionCall(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlInterpreter.cpp:507)
1: ==763==    by 0x1206B4: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763== 
1: ==763== Conditional jump or move depends on uninitialised value(s)
1: ==763==    at 0x509205A: Ctl::(anonymous namespace)::indicesAndWeights(float, int, int&, int&, float&, float&) (CtlLookupTable.cpp:72)
1: ==763==    by 0x50921A6: Ctl::lookup1D(float const*, int, float, float, float) (CtlLookupTable.cpp:123)
1: ==763==    by 0x5092252: Ctl::lookupCubic1D(float const*, int, float, float, float) (CtlLookupTable.cpp:138)
1: ==763==    by 0x48D4FCC: Ctl::(anonymous namespace)::simdDoLookup1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&, float (*)(float const*, int, float, float, float)) (CtlSimdStdLibLookupTable.cpp:137)
1: ==763==    by 0x48D50F5: Ctl::(anonymous namespace)::simdLookupCubic1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&) (CtlSimdStdLibLookupTable.cpp:177)
1: ==763==    by 0x48C22E6: Ctl::SimdCCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:476)
1: ==763==    by 0x48C1064: Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:185)
1: ==763==    by 0x4925B58: Ctl::SimdXContext::run(int, Ctl::SimdInst const*) (CtlSimdXContext.cpp:233)
1: ==763==    by 0x48BE0C2: Ctl::SimdFunctionCall::callFunction(unsigned long) (CtlSimdFunctionCall.cpp:148)
1: ==763==    by 0x120F5F: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763==  Uninitialised value was created by a heap allocation
1: ==763==    at 0x483C583: operator new[](unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==763==    by 0x48CDC46: Ctl::SimdReg::SimdReg(bool, unsigned long) (CtlSimdReg.cpp:90)
1: ==763==    by 0x48BDCA3: Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) (CtlSimdFunctionCall.cpp:110)
1: ==763==    by 0x48C57AF: Ctl::SimdInterpreter::newFunctionCallInternal(Ctl::RcPtr<Ctl::SymbolInfo>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlSimdInterpreter.cpp:167)
1: ==763==    by 0x4A6551D: Ctl::Interpreter::newFunctionCall(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlInterpreter.cpp:507)
1: ==763==    by 0x1206B4: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763== 
1: 3D, linear, regular spacing
1: 1D, linear, random spacing
1: 1D, cubic, random spacing
1: ok
1: 
1: Testing a very large static array.
1: 	Generating file ./ctlMakeBigArray.ctl
1: 	ok
1: 	Loading large arrays in module ctlMakeBigArray.
1: very large array : size = 1000000.
1: 	Removing file ./ctlMakeBigArray.ctl
1: 	ok
1: 	ok
1: ok
1: ==763== 
1: ==763== HEAP SUMMARY:
1: ==763==     in use at exit: 0 bytes in 0 blocks
1: ==763==   total heap usage: 5,231,208 allocs, 5,231,208 frees, 407,807,008 bytes allocated
1: ==763== 
1: ==763== All heap blocks were freed -- no leaks are possible
1: ==763== 
1: ==763== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
1: ==763== 
1: ==763== 1 errors in context 1 of 3:
1: ==763== Conditional jump or move depends on uninitialised value(s)
1: ==763==    at 0x509205A: Ctl::(anonymous namespace)::indicesAndWeights(float, int, int&, int&, float&, float&) (CtlLookupTable.cpp:72)
1: ==763==    by 0x50921A6: Ctl::lookup1D(float const*, int, float, float, float) (CtlLookupTable.cpp:123)
1: ==763==    by 0x5092252: Ctl::lookupCubic1D(float const*, int, float, float, float) (CtlLookupTable.cpp:138)
1: ==763==    by 0x48D4FCC: Ctl::(anonymous namespace)::simdDoLookup1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&, float (*)(float const*, int, float, float, float)) (CtlSimdStdLibLookupTable.cpp:137)
1: ==763==    by 0x48D50F5: Ctl::(anonymous namespace)::simdLookupCubic1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&) (CtlSimdStdLibLookupTable.cpp:177)
1: ==763==    by 0x48C22E6: Ctl::SimdCCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:476)
1: ==763==    by 0x48C1064: Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:185)
1: ==763==    by 0x4925B58: Ctl::SimdXContext::run(int, Ctl::SimdInst const*) (CtlSimdXContext.cpp:233)
1: ==763==    by 0x48BE0C2: Ctl::SimdFunctionCall::callFunction(unsigned long) (CtlSimdFunctionCall.cpp:148)
1: ==763==    by 0x120F5F: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763==  Uninitialised value was created by a heap allocation
1: ==763==    at 0x483C583: operator new[](unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==763==    by 0x48CDC46: Ctl::SimdReg::SimdReg(bool, unsigned long) (CtlSimdReg.cpp:90)
1: ==763==    by 0x48BDCA3: Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) (CtlSimdFunctionCall.cpp:110)
1: ==763==    by 0x48C57AF: Ctl::SimdInterpreter::newFunctionCallInternal(Ctl::RcPtr<Ctl::SymbolInfo>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlSimdInterpreter.cpp:167)
1: ==763==    by 0x4A6551D: Ctl::Interpreter::newFunctionCall(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlInterpreter.cpp:507)
1: ==763==    by 0x1206B4: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763== 
1: ==763== 
1: ==763== 1 errors in context 2 of 3:
1: ==763== Conditional jump or move depends on uninitialised value(s)
1: ==763==    at 0x509341B: float Imath_2_3::clamp<float>(float, float, float) (ImathFun.h:113)
1: ==763==    by 0x5092163: Ctl::lookup1D(float const*, int, float, float, float) (CtlLookupTable.cpp:119)
1: ==763==    by 0x5092252: Ctl::lookupCubic1D(float const*, int, float, float, float) (CtlLookupTable.cpp:138)
1: ==763==    by 0x48D4FCC: Ctl::(anonymous namespace)::simdDoLookup1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&, float (*)(float const*, int, float, float, float)) (CtlSimdStdLibLookupTable.cpp:137)
1: ==763==    by 0x48D50F5: Ctl::(anonymous namespace)::simdLookupCubic1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&) (CtlSimdStdLibLookupTable.cpp:177)
1: ==763==    by 0x48C22E6: Ctl::SimdCCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:476)
1: ==763==    by 0x48C1064: Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:185)
1: ==763==    by 0x4925B58: Ctl::SimdXContext::run(int, Ctl::SimdInst const*) (CtlSimdXContext.cpp:233)
1: ==763==    by 0x48BE0C2: Ctl::SimdFunctionCall::callFunction(unsigned long) (CtlSimdFunctionCall.cpp:148)
1: ==763==    by 0x120F5F: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763==  Uninitialised value was created by a heap allocation
1: ==763==    at 0x483C583: operator new[](unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==763==    by 0x48CDC46: Ctl::SimdReg::SimdReg(bool, unsigned long) (CtlSimdReg.cpp:90)
1: ==763==    by 0x48BDCA3: Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) (CtlSimdFunctionCall.cpp:110)
1: ==763==    by 0x48C57AF: Ctl::SimdInterpreter::newFunctionCallInternal(Ctl::RcPtr<Ctl::SymbolInfo>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlSimdInterpreter.cpp:167)
1: ==763==    by 0x4A6551D: Ctl::Interpreter::newFunctionCall(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlInterpreter.cpp:507)
1: ==763==    by 0x1206B4: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763== 
1: ==763== 
1: ==763== 1 errors in context 3 of 3:
1: ==763== Conditional jump or move depends on uninitialised value(s)
1: ==763==    at 0x5093409: float Imath_2_3::clamp<float>(float, float, float) (ImathFun.h:113)
1: ==763==    by 0x5092163: Ctl::lookup1D(float const*, int, float, float, float) (CtlLookupTable.cpp:119)
1: ==763==    by 0x5092252: Ctl::lookupCubic1D(float const*, int, float, float, float) (CtlLookupTable.cpp:138)
1: ==763==    by 0x48D4FCC: Ctl::(anonymous namespace)::simdDoLookup1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&, float (*)(float const*, int, float, float, float)) (CtlSimdStdLibLookupTable.cpp:137)
1: ==763==    by 0x48D50F5: Ctl::(anonymous namespace)::simdLookupCubic1D(Ctl::SimdBoolMask const&, Ctl::SimdXContext&) (CtlSimdStdLibLookupTable.cpp:177)
1: ==763==    by 0x48C22E6: Ctl::SimdCCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:476)
1: ==763==    by 0x48C1064: Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const (CtlSimdInst.cpp:185)
1: ==763==    by 0x4925B58: Ctl::SimdXContext::run(int, Ctl::SimdInst const*) (CtlSimdXContext.cpp:233)
1: ==763==    by 0x48BE0C2: Ctl::SimdFunctionCall::callFunction(unsigned long) (CtlSimdFunctionCall.cpp:148)
1: ==763==    by 0x120F5F: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:216)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763==  Uninitialised value was created by a heap allocation
1: ==763==    at 0x483C583: operator new[](unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
1: ==763==    by 0x48CDC46: Ctl::SimdReg::SimdReg(bool, unsigned long) (CtlSimdReg.cpp:90)
1: ==763==    by 0x48BDCA3: Ctl::SimdFunctionCall::SimdFunctionCall(Ctl::SimdInterpreter&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ctl::RcPtr<Ctl::FunctionType>, Ctl::RcPtr<Ctl::SimdInstAddr>, Ctl::SymbolTable&) (CtlSimdFunctionCall.cpp:110)
1: ==763==    by 0x48C57AF: Ctl::SimdInterpreter::newFunctionCallInternal(Ctl::RcPtr<Ctl::SymbolInfo>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlSimdInterpreter.cpp:167)
1: ==763==    by 0x4A6551D: Ctl::Interpreter::newFunctionCall(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (CtlInterpreter.cpp:507)
1: ==763==    by 0x1206B4: testLookupCubic1D(Ctl::Interpreter&) (testVaryingLookup.cpp:160)
1: ==763==    by 0x1257FD: testVaryingLookup() (testVaryingLookup.cpp:528)
1: ==763==    by 0x10D990: main (main.cpp:81)
1: ==763== 
1: ==763== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)

Default behavior when input and output files are different bit depths seems unexpected

When input file is 10-bit, and output file is 16-bit OpenEXR, the following error is received:
"exception thrown (oops...): EXR files only support 16 or 32 bps at the moment."

This may actually be the intended behavior, but it seems like ctlrender should automatically scale correctly when the input format is an integral file and the output file is floating point. Adding an explicit -format exr16 works but the default behavior seems different than it was prior to CTL 1.5.

To reproduce, run the following line using the Sony F35 IDT available from aces-dev on the SonyF35.StillLife.dpx file available from the reference images 'camOrig' directory also available on aces-dev. For testing, I have used the 10-bit S-Log DPX file through the Sony F35 IDT.

This throws the exception:

ctlrender -ctl ~/aces-dev/transforms/ctl/idt/vendorSupplied/sony/F35/idt-SonyF35-10i.ctl -param1 aIn 1.0 SonyF35.StillLife.dpx  test_idt.exr

This will work:

ctlrender -ctl ~/aces-dev/transforms/ctl/idt/vendorSupplied/sony/F35/idt-SonyF35-10i.ctl -param1 aIn 1.0 SonyF35.StillLife.dpx  test_idt.exr -format exr16

CTL git is missing function exports

For building a proper DLL on windows, it is necesary to export all classes and public functions.
That needs an .h file with exports like:

if defined(OPENEXR_DLL)

#if defined(ILMCTL_EXPORTS)
        #define ILMCTL_EXPORT __declspec(dllexport)
    #define ILMCTL_EXPORT_CONST extern __declspec(dllexport)
#else
        #define ILMCTL_EXPORT __declspec(dllimport)
        #define ILMCTL_EXPORT_CONST extern __declspec(dllimport)
#endif

else

#define ILMCTL_EXPORT
#define ILMCTL_EXPORT_CONST extern const

endif

and then the classes defined like:

class ILMCTL_EXPORT RcObject
{
...
};

Is this project dead? openexr_ctl will not build with ctl and ignores --disable-ctltest

Using
CTL-ctl-1.5.2.tar.gz
CTL-openexr_ctl-1.0.1.tar.gz

Getting

using pkg-config to set CTL_CXXFLAGS and CTL_LDFLAGS:
   CTL_CXXFLAGS = -pthread -I/usr/include/CTL 
   CTL_LDFLAGS = -L/usr/lib64 
   CTL_LIBS = -L/usr/lib64 -lIlmCtlSimd -lIlmCtlMath -lIlmCtl -pthread 
checking for OpenEXR... yes
Compiled and ran OpenEXR test program.
checking for CTL... no
*** Could not run the CTL test program, checking why...
*** The test program could not be compiled.  Is CTL installed?
*** Check that the cflags (below) includes the CTL include directory
***
*** Flags used by the test:
***     cflags: -g -O2 -pthread -I/usr/include/CTL  
***     ldflags:  -L/usr/lib64 
***
*** You can also run configure with --disable-ctltest to skip this test.
configure: error: The ctl test program failed.

--disable-ctltest is also ignored.

CTL crashes on Linux 4.15.0-39 (OpenEXR 2.3)

I updated my viewer to openexr 2.3 and latest ctl (with changes to compile on windows). On Windows all is peachy, but on Linux, as soon as two conforming CTL scripts are added to an image (say an IDT/ODT pair), I get a crash. Here's a partial stack trace of the crash:

[bt] Execution path:
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZNK3Ctl8SimdInst11executePathERNS_12SimdBoolMaskERNS_12SimdXContextE+0x42) [0x7fc46d8ae182]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZNK3Ctl8SimdInst11executePathERNS_12SimdBoolMaskERNS_12SimdXContextE+0x42) [0x7fc46d8ae182]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZNK3Ctl14SimdBranchInst7executeERNS_12SimdBoolMaskERNS_12SimdXContextE+0x4cb) [0x7fc46d8ae91b]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZNK3Ctl8SimdInst11executePathERNS_12SimdBoolMaskERNS_12SimdXContextE+0x5f) [0x7fc46d8ae19f]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZNK3Ctl12SimdCallInst7executeERNS_12SimdBoolMaskERNS_12SimdXContextE+0xd6) [0x7fc46d8af906]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZNK3Ctl8SimdInst11executePathERNS_12SimdBoolMaskERNS_12SimdXContextE+0x5f) [0x7fc46d8ae19f]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZN3Ctl12SimdXContext3runEiPKNS_8SimdInstE+0x6a) [0x7fc46d92111a]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmCtlSimd.so.1.5.0(_ZN3Ctl16SimdFunctionCall12callFunctionEm+0xa6) [0x7fc46d8aa136]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmImfCtl.so(+0x5aea) [0x7fc46d663aea]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmImfCtl.so(+0x700b) [0x7fc46d66500b]
[bt] /media/gga/Datos/code/applications/mrViewer/BUILD/Linux-4.15.0-39-generic-64//Release/lib/libIlmThread-2_3.so.24(+0x3f10) [0x7fc4632e8f10]
[bt] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xbe733) [0x7fc46a626733]
[bt] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db) [0x7fc46a0b66db]
[bt] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fc468b5688f]

Note that if I compile the code under Linux-3.13.0-117-generic-64, all is fine and no crash happens.

CTL test program fails

Hi --

This is my first time compiling CTL and OpenEXR_CTL. I've compiled and installed the latest version of CTL just fine, but I get the following message when I try to build OpenEXR_CTL:


checking for OpenEXR... yes
Compiled and ran OpenEXR test program.
checking for CTL... no
*** Could not run the CTL test program, checking why...
*** The test program compiled and staticly linked, but did not run. This
*** usually means that the run-time linker is not finding CTL or finding
*** the wrong version of CTL.


*** If the linker is not finding CTL, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location Also, make sure you have run ldconfig if that
*** is required on your system.


*** Flags used by the test:
*** cflags: -g -O2 -I/usr/include/OpenEXR -I/usr/local/include/CTL
*** ldflags: -L/usr/local/lib


*** You can also run configure with --disable-ctltest to skip this test.
configure: error: The ctl test program failed.


The CTL libraries seem to be installed in the directories that the test is pointing to. I've never set LD_LIBRARY_PATH because it's usually not advisable. I've never modified ld.so.conf.

I'm building this on CentOS 6.3 using autoconf 1.11.

Any ideas on what I should do?

Thanks,

Haig

running AddressSanitizer on IlmCtlTest reports SEGV on unknown address 0x000000000008 in /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.h:9

add AddressSantizer build type to CMakelists.txt

set(CMAKE_CXX_FLAGS_ASAN
    "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
    CACHE STRING "Flags used by the C++ compiler during AddressSanitizer builds."
    FORCE)

build unit tests with AddressSanitizer build type

cd build
cmake .. -DCMAKE_BUILD_TYPE=asan
make check

run IlmCtlTest unit test

cd ./build/unittest/IlmCtl
./IlmCtlTest 

Output is below:

-------------------------------------------------
Testing end-of-line conventions
Dos source file
Unix source file
Mac source file
ok

Testing parser
Testing variable scope
ok
Testing more variable scope
ok
Testing integer and floating-point literals
"''
 line 1
 line 2
string string one two three one two three
ok
Testing comments
ok
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2075==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7fd0caafde64 bp 0x7ffd9bd418c0 sp 0x7ffd9bd41630 T0)
==2075==The signal is caused by a READ memory access.
==2075==Hint: address points to the zero page.
    #0 0x7fd0caafde63 in Ctl::SimdInst::lineNumber() const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.h:93
    #1 0x7fd0caafde63 in Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:175
    #2 0x7fd0cab01603 in Ctl::SimdCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:448
    #3 0x7fd0caafdd96 in Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:185
    #4 0x7fd0cab01603 in Ctl::SimdCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:448
    #5 0x7fd0caafdd96 in Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:185
    #6 0x7fd0cab01603 in Ctl::SimdCallInst::execute(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:448
    #7 0x7fd0caafdd96 in Ctl::SimdInst::executePath(Ctl::SimdBoolMask&, Ctl::SimdXContext&) const /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.cpp:185
    #8 0x7fd0cac913ce in Ctl::SimdXContext::run(int, Ctl::SimdInst const*) /usr/src/CTL/lib/IlmCtlSimd/CtlSimdXContext.cpp:233
    #9 0x7fd0cab1332c in Ctl::SimdModule::runInitCode() /usr/src/CTL/lib/IlmCtlSimd/CtlSimdModule.cpp:122
    #10 0x7fd0ca932316 in Ctl::Interpreter::_loadModule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/src/CTL/lib/IlmCtl/CtlInterpreter.cpp:383
    #11 0x7fd0ca933831 in Ctl::Interpreter::loadModuleRecursive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/src/CTL/lib/IlmCtl/CtlInterpreter.cpp:445
    #12 0x7fd0ca933c5d in Ctl::Interpreter::loadModule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /usr/src/CTL/lib/IlmCtl/CtlInterpreter.cpp:297
    #13 0x55e12f21cd55 in testParser() /usr/src/CTL/unittest/IlmCtl/testParser.cpp:80
    #14 0x55e12f204ed8 in main /usr/src/CTL/unittest/IlmCtl/main.cpp:76
    #15 0x7fd0ca2df082 in __libc_start_main ../csu/libc-start.c:308
    #16 0x55e12f204cad in _start (/usr/src/CTL/build/unittest/IlmCtl/IlmCtlTest+0xdcad)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /usr/src/CTL/lib/IlmCtlSimd/CtlSimdInst.h:93 in Ctl::SimdInst::lineNumber() const
==2075==ABORTING
-------------------------------------------------

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.