Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccOpDefSolve Class Reference
+ Inheritance diagram for CIccOpDefSolve:
+ Collaboration diagram for CIccOpDefSolve:

Public Member Functions

virtual bool Exec (SIccCalcOp *op, SIccOpState &os)
 
- Public Member Functions inherited from IIccOpDef
virtual int ArgsPushed (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual int ArgsUsed (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual void Describe (SIccCalcOp &op, std::string &desc, int nVerboseness)
 
 IIccOpDef ()
 
virtual bool IsValid (CIccMpeCalculator *pCalc, SIccCalcOp &op)
 
virtual ~IIccOpDef ()
 

Detailed Description

Definition at line 550 of file IccMpeCalc.cpp.

Member Function Documentation

◆ Exec()

virtual bool CIccOpDefSolve::Exec ( SIccCalcOp * op,
SIccOpState & os )
inlinevirtual

Reimplemented from IIccOpDef.

Definition at line 553 of file IccMpeCalc.cpp.

554 {
555 size_t ss = os.pStack->size();
556 int r=op->data.select.v1+1;
557 int c=op->data.select.v2+1;
558 int nMSize = r*c;
559 int nSize = nMSize + c;
560
561 if (nSize>(int)ss)
562 return false;
563
564 if (r>1 && c>1) {
565
566 if (os.pScratch->size()<(size_t)c)
567 os.pScratch->resize(c);
568
569 icFloatNumber *ptrStack = &(*os.pStack)[ss-nSize];
570 icFloatNumber *x = &(*os.pScratch)[0];
571 icFloatNumber *mtx = ptrStack;
572 icFloatNumber *y = &ptrStack[nMSize];
573
574 bool bResult = false;
575
576 if (g_pIccMatrixSolver) {
577 bResult = g_pIccMatrixSolver->Solve(x, mtx, y, r, c);
578 }
579 if (bResult) {
580 memcpy(ptrStack, x, c*sizeof(icFloatNumber));
581 ptrStack[c] = 1.0;
582 }
583 else {
584 memset(ptrStack, 0, c*sizeof(icFloatNumber));
585 ptrStack[c] = 0.0;
586 }
587 os.pStack->resize(ss-nSize+r+1);
588 }
589 return true;
590 }
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
IIccMatrixSolver * g_pIccMatrixSolver
Global Variable: g_pIccMatrixSolver.
Definition IccSolve.cpp:186
virtual bool Solve(icFloatNumber *dXVector, const icFloatNumber *dMatrix, const icFloatNumber *dYVector, icUInt16Number nRows, icUInt16Number nCols)=0
Member Function: Solve.
icUInt16Number v2
Definition IccMpeCalc.h:242
icUInt16Number v1
Definition IccMpeCalc.h:243
struct SIccCalcOp::@1::@2 select
union SIccCalcOp::@1 data
CIccFloatVector * pScratch
Definition IccMpeCalc.h:276
CIccFloatVector * pStack
Definition IccMpeCalc.h:275

References SIccCalcOp::data, g_pIccMatrixSolver, SIccOpState::pScratch, SIccOpState::pStack, SIccCalcOp::select, IIccMatrixSolver::Solve(), SIccCalcOp::v1, and SIccCalcOp::v2.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: