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

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 681 of file IccMpeCalc.cpp.

Member Function Documentation

◆ Exec()

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

Reimplemented from IIccOpDef.

Definition at line 684 of file IccMpeCalc.cpp.

685 {
686 int j, n = op->data.select.v1+2;
687 size_t ss = os.pStack->size();
688 if (n>(int)ss)
689 return false;
690 icFloatNumber *s = &(*os.pStack)[ss-n];
691 if (n==2) {
692 s[0] = icMin(s[0], s[1]);
693 OsShrinkArgs(1);
694 }
695 else {
696 icFloatNumber mv = s[0];
697 for (j=1; j<n; j++) {
698 if (s[j]<mv)
699 mv = s[j];
700 }
701 s[0] = mv;
702 OsShrinkArgs(n-1);
703 }
704 return true;
705 }
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
#define OsShrinkArgs(N)
icFloatNumber icMin(icFloatNumber v1, icFloatNumber v2)
Definition IccUtil.cpp:898
icUInt16Number v1
Definition IccMpeCalc.h:243
struct SIccCalcOp::@1::@2 select
union SIccCalcOp::@1 data
CIccFloatVector * pStack
Definition IccMpeCalc.h:275

References SIccCalcOp::data, icMin(), OsShrinkArgs, SIccOpState::pStack, SIccCalcOp::select, and SIccCalcOp::v1.

+ Here is the call graph for this function:

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