I am trying to compile mitsuba with a spectrum size of 36.
As far as I understood, I have to change the value iniside mitsuba.conf from Spectrum<Float, 4> to Spectrum<Float, 36>.
I didn't find any documentation about this value and searched the source code definition of Spectrum to try and understand it.
The compilation then fails with
mitsuba2/ext/enoki/include/enoki/array_masked.h:28:85: error: use of overloaded operator '=' is ambiguous (with operand types 'enoki::Array<float, 36>' and 'const mitsuba::Spectrum<float, 36>')
template <typename T2> ENOKI_INLINE void operator =(const T2 &value) { if (m) d = value; }
~ ^ ~~~~~
mitsuba2/src/integrators/volpathmis.cpp:459:45: note: in instantiation of function template specialization 'enoki::detail::MaskedValue<enoki::Array<float, 36>>::operator=<mitsuba::Spectrum<float, 36>>' requested here
masked(p_over_f[i], active) = select(neq(ratio, ratio), 0.f, ratio);
^
mitsuba2/src/integrators/volpathmis.cpp:140:13: note: in instantiation of member function 'mitsuba::VolpathMisIntegratorImpl<float, mitsuba::Spectrum<float, 36>, true>::update_weights' requested here
update_weights(p_over_f, detach(q), 1.0f, channel, perform_rr);
^
mitsuba2/src/integrators/volpathmis.cpp:72:5: note: in instantiation of member function 'mitsuba::VolpathMisIntegratorImpl<float, mitsuba::Spectrum<float, 36>, true>::sample' requested here
VolpathMisIntegratorImpl(const Properties &props) : Base(props) {}
^
mitsuba2/src/integrators/volpathmis.cpp:48:37: note: in instantiation of member function 'mitsuba::VolpathMisIntegratorImpl<float, mitsuba::Spectrum<float, 36>, true>::VolpathMisIntegratorImpl' requested here
result = (Object *) new Impl<true>(m_props);
^
mitsuba2/ext/enoki/include/enoki/array_recursive.h:30:5: note: candidate function
ENOKI_ARRAY_IMPORT_BASIC(Base, StaticArrayImpl)
^
mitsuba2/ext/enoki/include/enoki/array_generic.h:129:5: note: expanded from macro 'ENOKI_ARRAY_IMPORT_BASIC'
ENOKI_ARRAY_DEFAULTS(Array) \
^
mitsuba2/ext/enoki/include/enoki/array_generic.h:125:12: note: expanded from macro 'ENOKI_ARRAY_DEFAULTS'
Array &operator=(Array &&) = default;
^
mitsuba2/ext/enoki/include/enoki/array.h:83:5: note: candidate function
ENOKI_ARRAY_IMPORT(Base, Array)
^
mitsuba2/ext/enoki/include/enoki/array_generic.h:138:5: note: expanded from macro 'ENOKI_ARRAY_IMPORT'
ENOKI_ARRAY_IMPORT_BASIC(Base, Array) \
^
mitsuba2/ext/enoki/include/enoki/array_generic.h:129:5: note: expanded from macro 'ENOKI_ARRAY_IMPORT_BASIC'
ENOKI_ARRAY_DEFAULTS(Array) \
^
mitsuba2/ext/enoki/include/enoki/array_generic.h:125:12: note: expanded from macro 'ENOKI_ARRAY_DEFAULTS'
Array &operator=(Array &&) = default;
^
1 warning and 1 error generated.
ninja: build stopped: subcommand failed.
Is 36 somehow a magic number that is disallowed?
I am trying to compare Mitsuba2 to my bachelor thesis program which uses a spectrum size of 36.
Steps to reproduce
For bug report, please enumerate the steps to follow in order to reproduce the issue <- [remove this]
"enabled": [
# The "scalar_rgb" variant *must* be included at the moment.
"scalar_rgb",
"scalar_spectral"
],
"default": "scalar_spectral",
"scalar_spectral": {
"float": "float",
"spectrum": "Spectrum<Float, 36>"
},
Summary
Compiling mitsuba with
Spectrum<Float, 36>
insidemitsuba.conf
fails due to an ambiguous overloaded operator.System configuration
scalar_rgb
scalar_spectral
packet_rgb
(with and without)packet_spectral
(with and without)Description
I am trying to compile mitsuba with a spectrum size of 36. As far as I understood, I have to change the value iniside
mitsuba.conf
fromSpectrum<Float, 4>
toSpectrum<Float, 36>
. I didn't find any documentation about this value and searched the source code definition of Spectrum to try and understand it.The compilation then fails with
Is
36
somehow a magic number that is disallowed? I am trying to compare Mitsuba2 to my bachelor thesis program which uses a spectrum size of 36.Steps to reproduce
For bug report, please enumerate the steps to follow in order to reproduce the issue <- [remove this]
git clone --recursive https://github.com/mitsuba-renderer/mitsuba2.git
cd mitsuba2
git checkout 4e7628c6eed365904ca2ba536b795d1b03410344
cp resources/mitsuba.conf.template mitsuba.conf
mitsuba.conf
to replace/includemkdir build && cd build
cmake -GNinja ..
ninja