MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / setAllocationVars

Method setAllocationVars

src/OpenColorIO/ColorSpace.cpp:443–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443void ColorSpace::setAllocationVars(int numvars, const float * vars)
444{
445 if (numvars < 0)
446 {
447 throw Exception("setAllocationVars: numvars must not be negative.");
448 }
449 if (numvars > 0 && !vars)
450 {
451 throw Exception("setAllocationVars: vars must not be null when numvars is positive.");
452 }
453
454 getImpl()->m_allocationVars.resize(numvars);
455
456 if(!getImpl()->m_allocationVars.empty())
457 {
458 memcpy(&getImpl()->m_allocationVars[0],
459 vars,
460 numvars*sizeof(float));
461 }
462}
463
464ConstTransformRcPtr ColorSpace::getTransform(ColorSpaceDirection dir) const noexcept
465{

Callers 6

_set_valueMethod · 0.95
test_interfaceMethod · 0.95
loadFunction · 0.45
test_copyMethod · 0.45
test_allocation_varsMethod · 0.45
OCIO_ADD_TESTFunction · 0.45

Calls 3

getImplFunction · 0.50
resizeMethod · 0.45
emptyMethod · 0.45

Tested by 4

test_interfaceMethod · 0.76
test_copyMethod · 0.36
test_allocation_varsMethod · 0.36
OCIO_ADD_TESTFunction · 0.36