LibreOffice Module sc (master)  1
Classes | Typedefs | Functions | Variables
sc::opencl Namespace Reference

Arguments that are actually compile-time constant string Currently, only the hash is passed. More...

Classes

class  CheckVariables
 
class  Cumipmt
 
class  DynamicKernelArgument
 (Partially) abstract base class for an operand More...
 
class  FormulaGroupInterpreterOpenCL
 
class  FormulaTreeNode
 
class  Fvschedule
 
class  InvalidParameterCount
 
class  IRR
 
class  MIRR
 
class  Normal
 
class  OpAbs
 
class  OpAccrint
 
class  OpAccrintm
 
class  OpAmordegrc
 
class  OpAmorlinc
 
class  OpAnd
 
class  OpArcCos
 
class  OpArcCosHyp
 
class  OpArcCot
 
class  OpArcCotHyp
 
class  OpArcSin
 
class  OpArcSinHyp
 
class  OpArcTan
 
class  OpArcTan2
 
class  OpArcTanH
 
class  OpAveDev
 
class  OpAverageA
 
class  OpAverageIf
 
class  OpAverageIfs
 
class  OpB
 
class  OpBase
 Abstract class for code generation. More...
 
class  OpBesselj
 
class  OpBetaDist
 
class  OpBetainv
 
class  OpBinomdist
 
class  OpBitAnd
 
class  OpBitLshift
 
class  OpBitOr
 
class  OpBitRshift
 
class  OpBitXor
 
class  OpCeil
 
class  OpChiDist
 
class  OpChiInv
 
class  OpChiSqDist
 
class  OpChiSqInv
 
class  OpCombin
 
class  OpCombinA
 
class  OpConfidence
 
class  OpConvert
 
class  OpCorrel
 
class  OpCos
 
class  OpCosh
 
class  OpCot
 
class  OpCoth
 
class  OpCountA
 
class  OpCountIf
 
class  OpCountIfs
 
class  OpCoupdaybs
 
class  OpCoupdays
 
class  OpCoupdaysnc
 
class  OpCoupncd
 
class  OpCoupnum
 
class  OpCouppcd
 
class  OpCovar
 
class  OpCritBinom
 
class  OpCsc
 
class  OpCscH
 
class  OpCumipmt
 
class  OpCumprinc
 
class  OpDaverage
 
class  OpDB
 
class  OpDcount
 
class  OpDcount2
 
class  OpDDB
 
class  OpDeg
 
class  OpDevSq
 
class  OpDISC
 
class  OpDmax
 
class  OpDmin
 
class  OpDollarde
 
class  OpDollarfr
 
class  OpDproduct
 
class  OpDstdev
 
class  OpDstdevp
 
class  OpDsum
 
class  OpDuration_ADD
 
class  OpDvar
 
class  OpDvarp
 
class  OpEffective
 
class  OpenCLError
 Failed in marshaling. More...
 
class  OpEven
 
class  OpExp
 
class  OpExponDist
 
class  OpFact
 
class  OpFdist
 
class  OpFInv
 
class  OpFisher
 
class  OpFisherInv
 
class  OpFloor
 
class  OpForecast
 
class  OpFTest
 
class  OpFV
 
class  OpFvschedule
 
class  OpGamma
 
class  OpGammaDist
 
class  OpGammaInv
 
class  OpGammaLn
 
class  OpGauss
 
class  OpGeoMean
 
class  OpGestep
 
class  OpHarMean
 
class  OpHypGeomDist
 
class  OpIf
 
class  OpInt
 
class  OpIntercept
 
class  OpIntrate
 
class  OpINTRATE
 
class  OpIPMT
 
class  OpIRR
 
class  OpIsEven
 
class  OpIsOdd
 
class  OpISPMT
 
class  OpKurt
 
class  OpLn
 
class  OpLog
 
class  OpLog10
 
class  OpLogInv
 
class  OpLogNormDist
 
class  OpMaxA
 
class  OpMDuration
 
class  OpMedian
 
class  OpMinA
 
class  OpMIRR
 
class  OpMod
 
class  OpMROUND
 
class  OpNegbinomdist
 
class  OpNegSub
 
class  OpNominal
 
class  OpNormdist
 
class  OpNorminv
 
class  OpNormsdist
 
class  OpNormsinv
 
class  OpNot
 
class  OpNper
 
class  OpNPV
 
class  OpOdd
 
class  OpOddlprice
 
class  OpOddlyield
 
class  OpOr
 
class  OpPDuration
 
class  OpPearson
 
class  OpPermut
 
class  OpPermutationA
 
class  OpPhi
 
class  OpPMT
 
class  OpPoisson
 
class  OpPower
 
class  OpPPMT
 
class  OpPrice
 
class  OpPriceDisc
 
class  OpPriceMat
 
class  OpProduct
 
class  OpPV
 
class  OpQuotient
 
class  OpRadians
 
class  OpReceived
 
class  OpRound
 
class  OpRoundDown
 
class  OpRoundUp
 
class  OpRRI
 
class  OpRsq
 
class  OpSec
 
class  OpSecH
 
class  OpSeriesSum
 
class  OpSin
 
class  OpSinh
 
class  OpSkew
 
class  OpSkewp
 
class  OpSLN
 
class  OpSlope
 
class  OpSqrt
 
class  OpSqrtPi
 
class  OpStandard
 
class  OpStDev
 
class  OpStDevA
 
class  OpStDevP
 
class  OpStDevPA
 
class  OpSTEYX
 
class  OpSumIf
 
class  OpSumIfs
 
class  OpSumSQ
 
class  OpSumX2MY2
 
class  OpSumX2PY2
 
class  OpSumXMY2
 
class  OpSYD
 
class  OpTan
 
class  OpTanH
 
class  OpTbilleq
 
class  OpTbillprice
 
class  OpTbillyield
 
class  OpTDist
 
class  OpTInv
 
class  OpTrunc
 
class  OpTTest
 
class  OpVar
 
class  OpVarA
 
class  OpVarP
 
class  OpVarPA
 
class  OpVDB
 
class  OpVLookup
 
class  OpWeibull
 
class  OpXirr
 
class  OpXNPV
 
class  OpXor
 
class  OpYield
 
class  OpYielddisc
 
class  OpYieldmat
 
class  OpZTest
 
class  PriceMat
 
class  RATE
 
class  RRI
 
class  SlidingFunctionBase
 
class  Unhandled
 Inconsistent state. More...
 
class  UnhandledToken
 Exceptions. More...
 
class  VectorRef
 Holds an input (read-only) argument reference to a SingleVectorRef. More...
 
class  XNPV
 

Typedefs

typedef std::shared_ptr< FormulaTreeNodeFormulaTreeNodeRef
 
typedef std::shared_ptr< DynamicKernelArgumentDynamicKernelArgumentRef
 

Functions

static DynamicKernelArgumentRef SoPHelper (const ScCalcConfig &config, const std::string &ts, const FormulaTreeNodeRef &ft, std::shared_ptr< SlidingFunctionBase > pCodeGen, int nResultSize)
 
template<class Base >
static std::shared_ptr< DynamicKernelArgumentVectorRefFactory (const ScCalcConfig &config, const std::string &s, const FormulaTreeNodeRef &ft, std::shared_ptr< SlidingFunctionBase > &pCodeGen, int index)
 

Variables

std::string nCorrValDecl
 
std::string SCdEpsilonDecl
 
std::string RoundDecl = "double Round(double fValue);\n"
 
std::string Round
 
std::string GetPMTDecl
 
std::string GetPMT
 
std::string GetPMT_newDecl
 
std::string GetPMT_new
 
std::string GetFVDecl
 
std::string GetFV
 
std::string GetFV_newDecl
 
std::string GetFV_new
 
std::string IsLeapYearDecl
 
std::string IsLeapYear
 
std::string DaysInMonthDecl
 
std::string DaysInMonth
 
std::string DaysInMonth_newDecl
 
std::string DaysInMonth_new
 
std::string DaysToDateDecl
 
std::string DaysToDate
 
std::string DateToDaysDecl
 
std::string DateToDays
 
std::string DateToDays_newDecl
 
std::string DateToDays_new
 
std::string GetNullDateDecl
 
std::string GetNullDate
 
std::string GetNullDate_newDecl
 
std::string GetNullDate_new
 
std::string ScaDateDecl
 
std::string ScaDate
 
std::string ScaDate2Decl
 
std::string ScaDate2
 
std::string lcl_GetCouppcdDecl
 
std::string lcl_GetCouppcd
 
std::string lcl_GetCoupncdDecl
 
std::string lcl_GetCoupncd
 
std::string addMonthsDecl
 
std::string addMonths
 
std::string getDaysInMonthRangeDecl
 
std::string getDaysInMonthRange
 
std::string GetDaysInYearsDecl
 
std::string GetDaysInYears
 
std::string GetDaysInYearDecl
 
std::string GetDaysInYear
 
std::string getDaysInYearRangeDecl
 
std::string getDaysInYearRange
 
std::string getDiffDecl
 
std::string getDiff
 
std::string lcl_GetcoupdaybsDecl
 
std::string lcl_Getcoupdaybs
 
std::string lcl_Getcoupdaybs_newDecl
 
std::string lcl_Getcoupdaybs_new
 
std::string lcl_GetcoupdaysDecl
 
std::string lcl_Getcoupdays
 
std::string lcl_Getcoupdays_newDecl
 
std::string lcl_Getcoupdays_new
 
std::string lcl_GetcoupnumDecl
 
std::string lcl_Getcoupnum
 
std::string lcl_Getcoupnum_newDecl
 
std::string lcl_Getcoupnum_new
 
std::string setDayDecl
 
std::string setDay
 
std::string coupdaysDecl
 
std::string coupdays
 
std::string coupdays_newDecl
 
std::string coupdays_new
 
std::string coupdaybsDecl
 
std::string coupdaybs
 
std::string coupdaybs_newDecl
 
std::string coupdaybs_new
 
std::string coupdaysncDecl
 
std::string coupdaysnc
 
std::string coupdaysnc_newDecl
 
std::string coupdaysnc_new
 
std::string checklessthanDecl
 
std::string checklessthan
 
std::string coupnumDecl
 
std::string coupnum
 
std::string coupnum_newDecl
 
std::string coupnum_new
 
std::string getPrice_Decl
 
std::string getPrice_
 
std::string getPrice_new_Decl
 
std::string getPrice_new
 
std::string getYield_Decl
 
std::string getYield_
 
std::string GetYearFracDecl
 
std::string GetYearFrac
 
std::string GetYieldmatDecl
 
std::string GetYieldmat
 
std::string GetDiffDateDecl
 
std::string GetDiffDate
 
std::string GetYearDiffDecl
 
std::string GetYearDiff
 
std::string GetDiffDate360_Decl
 
std::string GetDiffDate360_
 
std::string GetDiffDate360Decl
 
std::string GetDiffDate360
 
std::string GetDurationDecl
 
std::string GetDuration
 
std::string GetDuration_newDecl
 
std::string GetDuration_new
 
std::string ScGetDDBDecl
 
std::string ScGetDDB
 
std::string DblMinDecl
 
std::string DblMin
 
std::string ScInterVDBDecl
 
std::string ScInterVDB
 
std::string VDBImplementDecl
 
std::string VDBImplement
 
std::string GetOddlpriceDecl
 
std::string GetOddlprice
 
std::string GetOddlyieldDecl
 
std::string GetOddlyield
 
std::string GetYearFrac_newDecl
 
std::string GetYearFrac_new
 
std::string DaysToDate_newDecl
 
std::string DaysToDate_new
 
std::string DaysToDate_LocalBarrierDecl
 
std::string DaysToDate_LocalBarrier
 
std::string GetYearDiff_newDecl
 
std::string GetYearDiff_new
 
std::string GetDiffDate_newDecl
 
std::string GetDiffDate_new
 

Detailed Description

Arguments that are actually compile-time constant string Currently, only the hash is passed.

TBD(IJSUNG): pass also length and the actual string if there is a hash function collision FIXME: This idea of passing of hashes of uppercased strings into OpenCL code is fairly potent crack. It is hopefully not used at all any more, but noticing that there are string arguments automatically disables use of OpenCL for a formula group. If at some point there are resources to drain the OpenCL swamp, this should go away.

Typedef Documentation

Definition at line 152 of file opbase.hxx.

Definition at line 82 of file opbase.hxx.

Function Documentation

static DynamicKernelArgumentRef sc::opencl::SoPHelper ( const ScCalcConfig config,
const std::string &  ts,
const FormulaTreeNodeRef ft,
std::shared_ptr< SlidingFunctionBase pCodeGen,
int  nResultSize 
)
static

Definition at line 2649 of file formulagroupcl.cxx.

template<class Base >
static std::shared_ptr<DynamicKernelArgument> sc::opencl::VectorRefFactory ( const ScCalcConfig config,
const std::string &  s,
const FormulaTreeNodeRef ft,
std::shared_ptr< SlidingFunctionBase > &  pCodeGen,
int  index 
)
static

Variable Documentation

std::string sc::opencl::addMonths
Initial value:
=
"void addMonths(int b30Days,int bLastDay,int *nDay,int nOrigDay,"
"int *nMonth,int nMonthCount,int *year)\n"
"{\n"
" int nNewMonth = nMonthCount + *nMonth;\n"
" if( nNewMonth > 12 )\n"
" {\n"
" --nNewMonth;\n"
" *year+=nNewMonth / 12 ;\n"
" *nMonth = ( nNewMonth % 12 ) + 1;\n"
" }\n"
" else if( nNewMonth < 1 )\n"
" {\n"
" *year+= nNewMonth / 12 - 1 ;\n"
" *nMonth = nNewMonth % 12 + 12 ;\n"
" }\n"
" else\n"
" *nMonth = nNewMonth ;\n"
" if( b30Days )\n"
" {\n"
" *nDay = min( nOrigDay, 30);\n"
" if( bLastDay || (*nDay >= DaysInMonth( *nMonth, *year )) )\n"
" *nDay = 30;\n"
" }\n"
" else\n"
" {\n"
" int nLastDay = DaysInMonth( *nMonth, *year );\n"
" *nDay = bLastDay ? nLastDay : min( nOrigDay, nLastDay );\n"
" }\n"
"}\n"

Definition at line 399 of file op_financial.cxx.

std::string sc::opencl::addMonthsDecl
Initial value:
=
"void addMonths(int b30Days,int bLastDay,int *nDay,int nOrigDay,"
"int *nMonth,int nMonthCount,int *year);\n"

Definition at line 395 of file op_financial.cxx.

std::string sc::opencl::checklessthan
Initial value:
=
"int checklessthan(int aYear,int bYear,int aMonth,int bMonth,int anDay,int "
"bnDay,int abLastDay,int bbLastDay,int anOrigDay,int bnOrigDay)\n"
"{\n"
" if( aYear != bYear )\n"
" return aYear < bYear;\n"
" if( aMonth != bMonth )\n"
" return aMonth < bMonth;\n"
" if( anDay != bnDay )\n"
" return anDay < bnDay;\n"
" if( abLastDay || bbLastDay )\n"
" return !abLastDay && bbLastDay;\n"
" return anOrigDay < bnOrigDay;\n"
"}\n"

Definition at line 958 of file op_financial.cxx.

std::string sc::opencl::checklessthanDecl
Initial value:
=
"int checklessthan(int aYear,int bYear,int aMonth,int bMonth,int anDay,int "
"bnDay,int abLastDay,int bbLastDay,int anOrigDay,int bnOrigDay);\n"

Definition at line 955 of file op_financial.cxx.

std::string sc::opencl::coupdaybs
Initial value:
=
"double coupdaybs( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=GetNullDate();\n"
" return lcl_Getcoupdaybs(nNullDate, nSettle, nMat,nFreq, nBase);\n"
"}\n"

Definition at line 855 of file op_financial.cxx.

std::string sc::opencl::coupdaybs_new
Initial value:
=
"double coupdaybs_new( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=693594;\n"
" return lcl_Getcoupdaybs_new(nNullDate, nSettle, nMat,nFreq, nBase);\n"
"}\n"

Definition at line 865 of file op_financial.cxx.

std::string sc::opencl::coupdaybs_newDecl
Initial value:
=
"double coupdaybs_new( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 862 of file op_financial.cxx.

std::string sc::opencl::coupdaybsDecl
Initial value:
=
"double coupdaybs( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 852 of file op_financial.cxx.

std::string sc::opencl::coupdays
Initial value:
=
"double coupdays(int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=GetNullDate();\n"
" if( nBase == 1 )\n"
" return lcl_Getcoupdays(nNullDate, nSettle, nMat,nFreq, nBase);\n"
" else\n"
" return (double)GetDaysInYear(0,0,nBase)/nFreq;\n"
"}\n"

Definition at line 830 of file op_financial.cxx.

std::string sc::opencl::coupdays_new
Initial value:
=
"double coupdays_new(int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=693594;\n"
" if( nBase == 1 )\n"
" return lcl_Getcoupdays_new(nNullDate, nSettle, nMat,nFreq, nBase);\n"
" else\n"
" return (double)GetDaysInYear(0,0,nBase)*pow((double)nFreq,-1.0);\n"
"}\n"

Definition at line 842 of file op_financial.cxx.

std::string sc::opencl::coupdays_newDecl
Initial value:
=
"double coupdays_new(int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 839 of file op_financial.cxx.

std::string sc::opencl::coupdaysDecl
Initial value:
=
"double coupdays(int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 827 of file op_financial.cxx.

std::string sc::opencl::coupdaysnc

Definition at line 875 of file op_financial.cxx.

std::string sc::opencl::coupdaysnc_new

Definition at line 915 of file op_financial.cxx.

std::string sc::opencl::coupdaysnc_newDecl
Initial value:
=
"double coupdaysnc_new( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 912 of file op_financial.cxx.

std::string sc::opencl::coupdaysncDecl
Initial value:
=
"double coupdaysnc( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 872 of file op_financial.cxx.

std::string sc::opencl::coupnum
Initial value:
=
"double coupnum( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=GetNullDate();\n"
" return lcl_Getcoupnum(nNullDate,nSettle,nMat,nFreq);\n"
"}\n"

Definition at line 976 of file op_financial.cxx.

std::string sc::opencl::coupnum_new
Initial value:
=
"double coupnum_new( int nSettle,int nMat,int nFreq,int nBase)\n"
"{\n"
" int nNullDate=693594;\n"
" return lcl_Getcoupnum_new(nNullDate,nSettle,nMat,nFreq,nBase);\n"
"}\n"

Definition at line 985 of file op_financial.cxx.

std::string sc::opencl::coupnum_newDecl
Initial value:
=
"double coupnum_new( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 982 of file op_financial.cxx.

std::string sc::opencl::coupnumDecl
Initial value:
=
"double coupnum( int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 973 of file op_financial.cxx.

std::string sc::opencl::DateToDays
std::string sc::opencl::DateToDays_new
Initial value:
=
"int DateToDays_new( int nDay, int nMonth, int nYear )\n"
"{\n"
" int nDays = (nYear-1) * 365;\n"
" nDays += (int)((nYear-1) *pow(4.0,-1.0)- (nYear-1) *pow( 100.0,-1.0)"
"+ (nYear-1) *pow(400.0,-1.0));\n"
" for( int i = 1; i < nMonth; i++ )\n"
" nDays += DaysInMonth(i,nYear);\n"
" nDays += nDay;\n"
"\n"
" return nDays;\n"
"}\n"

Definition at line 252 of file op_financial.cxx.

std::string sc::opencl::DateToDays_newDecl
Initial value:
=
"int DateToDays_new( int nDay, int nMonth, int nYear );\n"

Definition at line 249 of file op_financial.cxx.

std::string sc::opencl::DateToDaysDecl
Initial value:
=
"int DateToDays( int nDay, int nMonth, int nYear );\n"

Definition at line 234 of file op_financial.cxx.

std::string sc::opencl::DaysInMonth
std::string sc::opencl::DaysInMonth_new
Initial value:
=
"int DaysInMonth( int nMonth, int nYear )\n"
"{\n"
" int tmp = 0;\n"
" switch(nMonth)\n"
" {\n"
" case 1:\n"
" case 3:\n"
" case 5:\n"
" case 7:\n"
" case 8:\n"
" case 10:\n"
" case 12:\n"
" tmp = 31;\n"
" break;\n"
" case 4:\n"
" case 6:\n"
" case 9:\n"
" case 11:\n"
" tmp =30;\n"
" break;\n"
" case 2:\n"
" if ( IsLeapYear(nYear)==1)\n"
" tmp = 29;\n"
" else\n"
" tmp = 28;\n"
" break;\n"
" }\n"
" return tmp;\n"
"}\n"

Definition at line 156 of file op_financial.cxx.

std::string sc::opencl::DaysInMonth_newDecl
Initial value:
=
"int DaysInMonth( int nMonth, int nYear );\n"

Definition at line 153 of file op_financial.cxx.

std::string sc::opencl::DaysInMonthDecl
Initial value:
=
"int DaysInMonth( int nMonth, int nYear );\n"

Definition at line 134 of file op_financial.cxx.

std::string sc::opencl::DaysToDate
std::string sc::opencl::DaysToDate_LocalBarrier

Definition at line 1800 of file op_financial.cxx.

std::string sc::opencl::DaysToDate_LocalBarrierDecl
Initial value:
=
"void DaysToDate( int nDays, int *rDay, int* rMonth, int* rYear );\n"

Definition at line 1797 of file op_financial.cxx.

std::string sc::opencl::DaysToDate_new

Definition at line 1755 of file op_financial.cxx.

std::string sc::opencl::DaysToDate_newDecl
Initial value:
=
"void DaysToDate_new( int nDays, int *rDay, int* rMonth, int* rYear );\n"

Definition at line 1752 of file op_financial.cxx.

std::string sc::opencl::DaysToDateDecl
Initial value:
=
"void DaysToDate( int nDays, int *rDay, int* rMonth, int* rYear );\n"

Definition at line 187 of file op_financial.cxx.

std::string sc::opencl::DblMin
Initial value:
=
"inline double DblMin( double a, double b )\n"
"{\n"
" return (a < b) ? a : b;\n"
"}\n"

Definition at line 1480 of file op_financial.cxx.

std::string sc::opencl::DblMinDecl
Initial value:
=
"inline double DblMin( double a, double b );\n"

Definition at line 1477 of file op_financial.cxx.

std::string sc::opencl::getDaysInMonthRange
Initial value:
=
"int getDaysInMonthRange( int nFrom, int nTo,int b30Days,int year)\n"
"{\n"
" if( nFrom > nTo )\n"
" return 0;\n"
" int nRet = 0;\n"
" if( b30Days )\n"
" nRet = (nTo - nFrom + 1) * 30;\n"
" else\n"
" {\n"
" for( int nMonthIx = nFrom; nMonthIx <= nTo; ++nMonthIx )\n"
" nRet += b30Days ? 30 : DaysInMonth( nMonthIx, year );\n"
" }\n"
" return nRet;\n"
"}\n"

Definition at line 433 of file op_financial.cxx.

std::string sc::opencl::getDaysInMonthRangeDecl
Initial value:
=
"int getDaysInMonthRange( int nFrom, int nTo,int b30Days,int year);\n"

Definition at line 430 of file op_financial.cxx.

std::string sc::opencl::GetDaysInYear
Initial value:
=
"int GetDaysInYear( int nNullDate, int nDate, int nMode )\n"
"{\n"
" switch( nMode )\n"
" {\n"
" case 0:\n"
" case 2:\n"
" case 4:\n"
" return 360;\n"
" case 1:\n"
" {\n"
" int nD=0, nM=0, nY=0;\n"
" nDate += nNullDate;\n"
" DaysToDate( nDate, &nD, &nM, &nY );\n"
" return IsLeapYear( nY )? 366 : 365;\n"
" }\n"
" case 3:\n"
" return 365;\n"
" }\n"
"}\n"

Definition at line 472 of file op_financial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string sc::opencl::GetDaysInYearDecl
Initial value:
=
"int GetDaysInYear( int nNullDate, int nDate, int nMode );\n"

Definition at line 469 of file op_financial.cxx.

std::string sc::opencl::getDaysInYearRange
Initial value:
=
"int getDaysInYearRange( int nFrom, int nTo,int b30Days )\n"
"{\n"
" if( nFrom > nTo )\n"
" return 0;\n"
" return b30Days ? ((nTo - nFrom + 1) * 360) : GetDaysInYears( nFrom, nTo)"
";\n"
"}\n"

Definition at line 496 of file op_financial.cxx.

std::string sc::opencl::getDaysInYearRangeDecl
Initial value:
=
"int getDaysInYearRange( int nFrom, int nTo,int b30Days );\n"

Definition at line 493 of file op_financial.cxx.

std::string sc::opencl::GetDaysInYears
Initial value:
=
"int GetDaysInYears( int nYear1, int nYear2 )\n"
"{\n"
" int nLeaps = 0;\n"
" for( int n = nYear1 ; n <= nYear2 ; n++ )\n"
" {\n"
" if( IsLeapYear( n ) )\n"
" nLeaps++;\n"
" }\n"
" int nSum = 1;\n"
" nSum += nYear2;\n"
" nSum -= nYear1;\n"
" nSum *= 365;\n"
" nSum += nLeaps;\n"
" return nSum;\n"
"}\n"

Definition at line 452 of file op_financial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun(), sc::opencl::OpPrice::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), sc::opencl::OpCoupdaybs::BinInlineFun(), sc::opencl::OpCoupdays::BinInlineFun(), and sc::opencl::OpCoupdaysnc::BinInlineFun().

std::string sc::opencl::GetDaysInYearsDecl
Initial value:
=
"int GetDaysInYears( int nYear1, int nYear2 );\n"

Definition at line 449 of file op_financial.cxx.

std::string sc::opencl::getDiff

Definition at line 511 of file op_financial.cxx.

std::string sc::opencl::GetDiffDate
std::string sc::opencl::GetDiffDate360
Initial value:
=
"int GetDiffDate360( int nNullDate, int nDate1, int nDate2,"
"bool bUSAMethod )\n"
"{\n"
" nDate1 += nNullDate;\n"
" nDate2 += nNullDate;\n"
" int nDay1, nMonth1, nYear1, nDay2, nMonth2, nYear2;\n"
" DaysToDate( nDate1, &nDay1, &nMonth1, &nYear1 );\n"
" DaysToDate( nDate2, &nDay2, &nMonth2, &nYear2 );\n"
" return GetDiffDate360_( nDay1, nMonth1, nYear1, IsLeapYear( nYear1 ), "
"nDay2, nMonth2, nYear2, bUSAMethod );\n"
"}\n"

Definition at line 1364 of file op_financial.cxx.

Referenced by sc::opencl::OpTbilleq::BinInlineFun(), and sc::opencl::OpTbillyield::BinInlineFun().

std::string sc::opencl::GetDiffDate360_
Initial value:
=
"int GetDiffDate360_(\n"
" int nDay1, int nMonth1, int nYear1, bool bLeapYear1,\n"
" int nDay2, int nMonth2, int nYear2,\n"
" bool bUSAMethod )\n"
"{\n"
" if( nDay1 == 31 )\n"
" nDay1--;\n"
" else if( bUSAMethod && ( nMonth1 == 2 && ( nDay1 == 29 || ( nDay1 == 28 "
"&& !bLeapYear1 ) ) ) )\n"
" nDay1 = 30;\n"
" if( nDay2 == 31 )\n"
" {\n"
" if( bUSAMethod && nDay1 != 30 )\n"
" {\n"
" nDay2 = 1;\n"
" if( nMonth2 == 12 )\n"
" {\n"
" nYear2++;\n"
" nMonth2 = 1;\n"
" }\n"
" else\n"
" nMonth2++;\n"
" }\n"
" else\n"
" nDay2 = 30;\n"
" }\n"
" return nDay2 + nMonth2 * 30 + nYear2 * 360 - nDay1 - nMonth1 * 30 - "
"nYear1 * 360;\n"
"}\n"

Definition at line 1329 of file op_financial.cxx.

std::string sc::opencl::GetDiffDate360_Decl
Initial value:
=
"int GetDiffDate360_(\n"
" int nDay1, int nMonth1, int nYear1, bool bLeapYear1,\n"
" int nDay2, int nMonth2, int nYear2,\n"
" bool bUSAMethod );\n"

Definition at line 1323 of file op_financial.cxx.

std::string sc::opencl::GetDiffDate360Decl
Initial value:
=
"int GetDiffDate360( int nNullDate, int nDate1, int nDate2,"
"bool bUSAMethod);\n"

Definition at line 1360 of file op_financial.cxx.

std::string sc::opencl::GetDiffDate_new

Definition at line 1862 of file op_financial.cxx.

std::string sc::opencl::GetDiffDate_newDecl
Initial value:
=
"int GetDiffDate_new( int nNullDate, int nStartDate, int nEndDate, int nMode,"
" int* pOptDaysIn1stYear );\n"

Definition at line 1858 of file op_financial.cxx.

std::string sc::opencl::GetDiffDateDecl
Initial value:
=
"int GetDiffDate( int nNullDate, int nStartDate, int nEndDate, int nMode,"
" int* pOptDaysIn1stYear );\n"

Definition at line 1247 of file op_financial.cxx.

std::string sc::opencl::getDiffDecl
Initial value:
=
"int getDiff(int rFrom,int rTo,int fDay,int fMonth,int fYear,int fbLastDayMode,"
"int fbLastDay,int fb30Days,int fbUSMode,int fnDay,int tDay,int tMonth,"
"int tYear,int tbLastDayMode,int tbLastDay,int tb30Days,"
"int tbUSMode,int tnDay);\n"

Definition at line 505 of file op_financial.cxx.

std::string sc::opencl::GetDuration
Initial value:
=
"double GetDuration( \n"
" int nNullDate, int nSettle, int nMat, double fCoup,\n"
" double fYield, int nFreq, int nBase )\n"
"{\n"
" double fYearfrac = GetYearFrac( nNullDate, nSettle, nMat, nBase );\n"
" double fNumOfCoups = lcl_Getcoupnum(nNullDate,nSettle,nMat,nFreq);\n"
" double fDur = 0.0;\n"
" double f100 = 100.0;\n"
" fCoup *= f100 / nFreq;\n"
" fYield /= nFreq;\n"
" fYield += 1.0;\n"
" double nDiff = fYearfrac * nFreq - fNumOfCoups;\n"
" int t;\n"
" for( t = 1 ; t < fNumOfCoups ; t++ )\n"
" fDur += ( t + nDiff ) * ( fCoup ) / pow( fYield, t + nDiff );\n"
" fDur += ( fNumOfCoups + nDiff ) * ( fCoup + f100 ) /"
" pow( fYield, fNumOfCoups + nDiff );\n"
" double p = 0.0;\n"
" for( t = 1 ; t < fNumOfCoups ; t++ )\n"
" p += fCoup / pow( fYield, t + nDiff );\n"
" p += ( fCoup + f100 ) / pow( fYield, fNumOfCoups + nDiff );\n"
" fDur /= p;\n"
" fDur /= nFreq;\n"
" return fDur;\n""}\n"

Definition at line 1382 of file op_financial.cxx.

Referenced by sc::opencl::OpDuration_ADD::BinInlineFun().

std::string sc::opencl::GetDuration_new

Definition at line 1413 of file op_financial.cxx.

std::string sc::opencl::GetDuration_newDecl
Initial value:
=
"double GetDuration_new( \n"
" int nNullDate, int nSettle, int nMat, double fCoup,\n"
" double fYield, int nFreq, int nBase );\n"

Definition at line 1408 of file op_financial.cxx.

std::string sc::opencl::GetDurationDecl
Initial value:
=
"double GetDuration( \n"
" int nNullDate, int nSettle, int nMat, double fCoup,\n"
" double fYield, int nFreq, int nBase );\n"

Definition at line 1377 of file op_financial.cxx.

std::string sc::opencl::GetFV
Initial value:
=
"double GetFV( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType )\n"
"{\n"
" double fFv;\n"
" if( fRate == 0.0 )\n"
" fFv = fPv + fPmt * fNper;\n"
" else\n"
" {\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fFv = fPv * fTerm + fPmt * ( 1.0 + fRate ) *( fTerm - 1.0 ) "
"/ fRate;\n"
" else\n"
" fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) / fRate;\n"
" }\n"
" return -fFv;\n"
"}\n"

Definition at line 87 of file op_financial.cxx.

std::string sc::opencl::GetFV_new
Initial value:
=
"double GetFV_new( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType )\n"
"{\n"
" double fFv;\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fFv = fPv * fTerm + fPmt * ( 1.0 + fRate ) *( fTerm - 1.0 ) "
"*pow( fRate,-1);\n"
" else\n"
" fFv = fPv * fTerm + fPmt * ( fTerm - 1.0 ) *pow( fRate,-1);\n"
" return -fFv;\n"
"}\n"

Definition at line 110 of file op_financial.cxx.

std::string sc::opencl::GetFV_newDecl
Initial value:
=
"double GetFV_new( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType );\n"

Definition at line 106 of file op_financial.cxx.

std::string sc::opencl::GetFVDecl
Initial value:
=
"double GetFV( double fRate, double fNper, double fPmt,"
"double fPv, int nPayType );\n"

Definition at line 83 of file op_financial.cxx.

std::string sc::opencl::GetNullDate
std::string sc::opencl::GetNullDate_new
Initial value:
=
"int GetNullDate_new()\n"
"{\n"
" return DateToDays_new(30,12,1899 );\n"
"}\n"

Definition at line 276 of file op_financial.cxx.

std::string sc::opencl::GetNullDate_newDecl
Initial value:
=
"int GetNullDate_new();\n"

Definition at line 273 of file op_financial.cxx.

std::string sc::opencl::GetNullDateDecl
Initial value:
=
"int GetNullDate();\n"

Definition at line 265 of file op_financial.cxx.

std::string sc::opencl::GetOddlprice
Initial value:
=
"double GetOddlprice( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fYield, double fRedemp, int nFreq, int nBase )\n"
"{\n"
" double fFreq = nFreq ;\n"
" double fDCi = GetYearFrac( nNullDate, nLastCoup,"
"nMat, nBase ) * fFreq;\n"
" double fDSCi = GetYearFrac( nNullDate, nSettle,"
"nMat, nBase ) * fFreq;\n"
" double fAi = GetYearFrac( nNullDate, nLastCoup,"
"nSettle, nBase ) * fFreq;\n"
" double p = fRedemp + fDCi * 100.0 * fRate / fFreq;\n"
" p /= fDSCi * fYield / fFreq + 1.0;\n"
" p -= fAi * 100.0 * fRate / fFreq;\n"
" return p;\n"
"}\n"

Definition at line 1587 of file op_financial.cxx.

Referenced by sc::opencl::OpOddlprice::BinInlineFun().

std::string sc::opencl::GetOddlpriceDecl
Initial value:
=
"double GetOddlprice( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fYield, double fRedemp, int nFreq, int nBase );\n"

Definition at line 1583 of file op_financial.cxx.

std::string sc::opencl::GetOddlyield
Initial value:
=
"double GetOddlyield( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fPrice, double fRedemp, int nFreq, int nBase ) \n"
"{\n"
" double fFreq = nFreq ;\n"
" double fDCi= GetYearFrac( nNullDate, nLastCoup, nMat, nBase ) * fFreq;\n"
" double fDSCi= GetYearFrac( nNullDate, nSettle, nMat, nBase ) * fFreq;\n"
" double fAi= GetYearFrac( nNullDate, nLastCoup, nSettle, nBase )*fFreq;\n"
" double y = fRedemp + fDCi * 100.0 * fRate / fFreq;\n"
" y /= fPrice + fAi * 100.0 * fRate / fFreq;\n"
" y -= 1.0;\n"
" y *= fFreq / fDSCi;\n"
" return y;\n"
"}\n"

Definition at line 1608 of file op_financial.cxx.

Referenced by sc::opencl::OpOddlyield::BinInlineFun().

std::string sc::opencl::GetOddlyieldDecl
Initial value:
=
"double GetOddlyield( int nNullDate, int nSettle, int nMat, int nLastCoup,\n"
" double fRate, double fPrice, double fRedemp, int nFreq, int nBase );\n"

Definition at line 1604 of file op_financial.cxx.

std::string sc::opencl::GetPMT
Initial value:
=
"double GetPMT( double fRate, double fNper, double fPv, double fFv, int nPayType )\n"
"{\n"
" double fPmt;\n"
" if( fRate == 0.0 )\n"
" fPmt = ( fPv + fFv ) / fNper;\n"
" else\n"
" {\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fPmt = ( fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate / ( 1.0 - 1."
"0 / fTerm ) ) / ( 1.0 + fRate );\n"
" else\n"
" fPmt = fFv * fRate / ( fTerm - 1.0 ) + fPv * fRate /( 1.0 - 1.0 "
"/ fTerm );\n"
" }\n"
" return -fPmt;\n"
"}\n"

Definition at line 47 of file op_financial.cxx.

std::string sc::opencl::GetPMT_new
Initial value:
=
"double GetPMT_new( double fRate, double fNper, double fPv, double fFv,"
"int nPayType)\n"
"{\n"
" double fPmt;\n"
" double fTerm = pow( 1.0 + fRate, fNper );\n"
" if( nPayType > 0 )\n"
" fPmt = ( fFv * fRate *pow ( fTerm - 1.0,-1 ) + fPv * fRate *pow( "
"( 1.0 - pow( fTerm,-1) ),-1) )* pow ( 1.0 + fRate,-1 );\n"
" else\n"
" fPmt = fFv * fRate *pow ( fTerm - 1.0 ,-1) + fPv * fRate *pow( "
"1.0 - pow( fTerm,-1),-1 );\n"
" return -fPmt;\n"
"}\n"

Definition at line 69 of file op_financial.cxx.

std::string sc::opencl::GetPMT_newDecl
Initial value:
=
"double GetPMT_new( double fRate, double fNper, double fPv, double fFv,"
"int nPayType );\n"

Definition at line 66 of file op_financial.cxx.

std::string sc::opencl::GetPMTDecl
Initial value:
=
"double GetPMT( double fRate, double fNper, double fPv, double fFv, int nPayType );\n"

Definition at line 44 of file op_financial.cxx.

std::string sc::opencl::getPrice_
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase )\n"
"{\n"
" double fFreq = nFreq;\n"
" double fE = coupdays( nSettle, nMat, nFreq, nBase );\n"
" double fDSC_E = coupdaysnc( nSettle, nMat, nFreq, nBase ) / fE;\n"
" double fN = coupnum( nSettle, nMat, nFreq, nBase );\n"
" double fA = coupdaybs( nSettle, nMat, nFreq, nBase );\n"
" double fRet = fRedemp / ( pow( 1.0 + fYield / fFreq, fN - 1.0 + "
"fDSC_E ) );\n"
" fRet -= 100.0 * fRate / fFreq * fA / fE;\n"
" double fT1 = 100.0 * fRate / fFreq;\n"
" double fT2 = 1.0 + fYield / fFreq;\n"
" for( double fK = 0.0 ; fK < fN ; fK+=1.0 )\n"
" fRet += fT1 / pow( fT2, fK + fDSC_E );\n"
" return fRet;\n"
"}\n"

Definition at line 996 of file op_financial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string sc::opencl::getPrice_Decl
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase );\n"

Definition at line 992 of file op_financial.cxx.

std::string sc::opencl::getPrice_new
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase )\n"
"{\n"
" double fFreq = nFreq;\n"
" double fE = coupdays_new( nSettle, nMat, nFreq, nBase );\n"
" double fDSC_E = coupdaysnc_new( nSettle, nMat, nFreq, nBase ) / fE;\n"
" double fN = coupnum_new( nSettle, nMat, nFreq, nBase );\n"
" double fA = coupdaybs_new( nSettle, nMat, nFreq, nBase );\n"
" double fRet = fRedemp / ( pow( 1.0 + fYield / fFreq, fN - 1.0 + "
"fDSC_E ) );\n"
" fRet -= 100.0 * fRate / fFreq * fA / fE;\n"
" double fT1 = 100.0 * fRate / fFreq;\n"
" double fT2 = 1.0 + fYield / fFreq;\n"
" for( double fK = 0.0 ; fK < fN ; fK+=1.0 )\n"
" fRet += fT1 / pow( fT2, fK + fDSC_E );\n"
" return fRet;\n"
"}\n"

Definition at line 1018 of file op_financial.cxx.

std::string sc::opencl::getPrice_new_Decl
Initial value:
=
"double getPrice_(int nSettle, int nMat, double fRate, double fYield,\n"
"double fRedemp, int nFreq, int nBase );\n"

Definition at line 1014 of file op_financial.cxx.

std::string sc::opencl::GetYearDiff
Initial value:
=
"double GetYearDiff( int nNullDate, int nStartDate, int nEndDate,"
"int nMode )\n"
"{\n"
" int nDays1stYear;\n"
" int nTotalDays = GetDiffDate( nNullDate, nStartDate, nEndDate,"
"nMode, &"
"nDays1stYear );\n"
" return (double)(nTotalDays)*pow((double)nDays1stYear,-1);\n"
"}\n"

Definition at line 1312 of file op_financial.cxx.

Referenced by sc::opencl::OpOddlprice::BinInlineFun(), sc::opencl::OpOddlyield::BinInlineFun(), sc::opencl::OpPriceDisc::BinInlineFun(), and sc::opencl::OpReceived::BinInlineFun().

std::string sc::opencl::GetYearDiff_new
Initial value:
=
"double GetYearDiff_new( int nNullDate, int nStartDate, int nEndDate,"
"int nMode )\n"
"{\n"
" int nDays1stYear;\n"
" int nTotalDays = GetDiffDate_new( nNullDate, nStartDate, nEndDate,"
"nMode, &"
"nDays1stYear );\n"
" return (double)(nTotalDays)* pow((double)nDays1stYear,-1);\n"
"}\n"

Definition at line 1847 of file op_financial.cxx.

std::string sc::opencl::GetYearDiff_newDecl
Initial value:
=
"double GetYearDiff_new( int nNullDate, int nStartDate, int nEndDate,"
"int nMode);\n"

Definition at line 1843 of file op_financial.cxx.

std::string sc::opencl::GetYearDiffDecl
Initial value:
=
"double GetYearDiff( int nNullDate, int nStartDate, int nEndDate,"
"int nMode);\n"

Definition at line 1308 of file op_financial.cxx.

std::string sc::opencl::GetYearFrac
std::string sc::opencl::GetYearFrac_new

Definition at line 1627 of file op_financial.cxx.

std::string sc::opencl::GetYearFrac_newDecl
Initial value:
=
"double GetYearFrac_new( int nNullDate, int nStartDate, int nEndDate,"
"int nMode );\n"

Definition at line 1623 of file op_financial.cxx.

std::string sc::opencl::GetYearFracDecl
Initial value:
=
"double GetYearFrac( int nNullDate, int nStartDate, int nEndDate,"
"int nMode );\n"

Definition at line 1091 of file op_financial.cxx.

std::string sc::opencl::getYield_

Definition at line 1041 of file op_financial.cxx.

Referenced by sc::opencl::OpYield::BinInlineFun().

std::string sc::opencl::getYield_Decl
Initial value:
=
"double getYield_( int nNullDate, int nSettle, int nMat, double fCoup,"
"double fPrice,double fRedemp, int nFreq, int nBase);\n"

Definition at line 1037 of file op_financial.cxx.

std::string sc::opencl::GetYieldmat
Initial value:
=
"double GetYieldmat( int nNullDate, int nSettle, int nMat, int nIssue,\n"
"double fRate, double fPrice, int nBase )\n"
"{\n"
" double fIssMat = GetYearFrac_new( nNullDate, nIssue, nMat, nBase );\n"
" double fIssSet = GetYearFrac_new( nNullDate, nIssue, nSettle, nBase );\n"
" double fSetMat = GetYearFrac_new( nNullDate, nSettle, nMat, nBase );\n"
" double y = 1.0 + fIssMat * fRate;\n"
" y =y * pow( (fPrice / 100.0 + fIssSet * fRate),-1);\n"
" y-=1.0;\n"
" y = y * pow(fSetMat,-1);\n"
" return y;\n"
"}\n"

Definition at line 1233 of file op_financial.cxx.

Referenced by sc::opencl::OpYieldmat::BinInlineFun().

std::string sc::opencl::GetYieldmatDecl
Initial value:
=
"double GetYieldmat( int nNullDate, int nSettle, int nMat, int nIssue,\n"
"double fRate, double fPrice, int nBase );\n"

Definition at line 1229 of file op_financial.cxx.

std::string sc::opencl::IsLeapYear
std::string sc::opencl::IsLeapYearDecl
Initial value:
=
"bool IsLeapYear( int n );\n"

Definition at line 124 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupdaybs
Initial value:
=
"int lcl_Getcoupdaybs(int nNullDate,int nSettle, int nMat,int nFreq,int nBase)\n"
"{\n"
" int aDate = nMat;\n"
" int rDay=0,rMonth=0, rYear=0;int mDay=0,mMonth=0, mYear=0;int sDay=0,"
"sMonth=0, sYear=0;\n"
" int rbLastDayMode=0, rbLastDay=0,rb30Days=0,rbUSMode=0,rnDay=0;\n"
" int sbLastDayMode=0, sbLastDay=0,sb30Days=0,sbUSMode=0,snDay=0;\n"
" ScaDate( nNullDate,aDate,nBase,&rDay,&rMonth,&rYear,&rbLastDayMode,&"
"rbLastDay,&rb30Days,&rbUSMode,&rnDay);\n"
" ScaDate( nNullDate,nSettle,nBase,&sDay,&sMonth,&sYear,&sbLastDayMode,&"
"sbLastDay,&sb30Days,&sbUSMode,&snDay);\n"
" rYear= sYear;\n"
" nSettle=nSettle+nNullDate;\n"
" aDate=DateToDays( rDay,rMonth,rYear );\n"
" if( aDate < nSettle )\n"
" {\n"
" rYear+= 1;\n"
" aDate=DateToDays( rDay,rMonth,rYear );\n"
" }\n"
" while(aDate > nSettle )\n"
" {\n"
" addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,-1*(12/nFreq),&rYear"
");\n"
" aDate=DateToDays( rDay,rMonth,rYear );\n"
" }\n"
" return getDiff( aDate, nSettle, rDay, rMonth, rYear, rbLastDayMode, "
"rbLastDay, rb30Days, rbUSMode, rnDay, sDay, sMonth, sYear, sbLastDayMode,"
"sbLastDay, sb30Days, sbUSMode, snDay);\n"
"}\n"

Definition at line 572 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupdaybs_new

Definition at line 607 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupdaybs_newDecl
Initial value:
=
"int lcl_Getcoupdaybs_new(int nNullDate,int nSettle,int nMat,int nFreq,"
"int nBase);\n"

Definition at line 603 of file op_financial.cxx.

std::string sc::opencl::lcl_GetcoupdaybsDecl
Initial value:
=
"int lcl_Getcoupdaybs(int nNullDate,int nSettle, int nMat,int nFreq,int nBase);\n"

Definition at line 569 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupdays

Definition at line 646 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupdays_new

Definition at line 686 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupdays_newDecl
Initial value:
=
"int lcl_Getcoupdays_new(int nNullDate,int nSettle, "
"int nMat,int nFreq,int nBase);\n"

Definition at line 682 of file op_financial.cxx.

std::string sc::opencl::lcl_GetcoupdaysDecl
Initial value:
=
"int lcl_Getcoupdays(int nNullDate,int nSettle, "
"int nMat,int nFreq,int nBase);\n"

Definition at line 642 of file op_financial.cxx.

std::string sc::opencl::lcl_GetCoupncd
Initial value:
=
"int lcl_GetCoupncd(int nNullDate,int nSettle, int nMat,int nFreq,int nBase)\n"
"{\n"
" int aDate = nMat;\n"
" int rDay=0,rMonth=0, rYear=0,rbLastDayMode=0, rbLastDay=0,rb30Days=0,"
"rbUSMode=0,rnDay=0;\n"
" int sDay=0,sMonth=0, sYear=0,sbLastDayMode=0, sbLastDay=0,sb30Days=0,"
"sbUSMode=0,snDay=0;\n"
" ScaDate( nNullDate,nSettle,nBase,&sDay,&sMonth,&sYear,&sbLastDayMode,"
"&sbLastDay,&sb30Days,&sbUSMode,&snDay);\n"
" ScaDate( nNullDate,aDate,nBase,&rDay,&rMonth,&rYear,&rbLastDayMode,"
"&rbLastDay,&rb30Days,&rbUSMode,&rnDay);\n"
" rYear=sYear;\n"
" setDay(rDay,rMonth,rYear,rbLastDay,rb30Days,&rnDay);\n"
" if(checklessthan(sYear,rYear,sMonth,rMonth,snDay,rnDay,sbLastDay,rbLastDay"
",sDay,rDay))\n"
" {\n"
" rYear-=1;\n"
" setDay(rDay,rMonth,rYear,rbLastDay,rb30Days,&rnDay);\n"
" }\n"
" while(!checklessthan(sYear,rYear,sMonth,rMonth,snDay,rnDay,sbLastDay,"
"rbLastDay,sDay,rDay))\n"
" {\n"
" addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,12/nFreq,&rYear);\n"
" }\n"
" int nLastDay = DaysInMonth( rMonth, rYear );\n"
" int nRealDay = (rbLastDayMode && rbLastDay) ? nLastDay :"
"min( nLastDay, rDay );\n"
" return DateToDays( nRealDay, rMonth, rYear ) - nNullDate;\n"
"}\n"

Definition at line 364 of file op_financial.cxx.

std::string sc::opencl::lcl_GetCoupncdDecl
Initial value:
=
"int lcl_GetCoupncd(int nNullDate,int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 361 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupnum

Definition at line 729 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupnum_new

Definition at line 770 of file op_financial.cxx.

std::string sc::opencl::lcl_Getcoupnum_newDecl
Initial value:
=
"double lcl_Getcoupnum_new(int nNullDate,int nSettle,int nMat,int nFreq,int"
" nBase);\n"

Definition at line 767 of file op_financial.cxx.

std::string sc::opencl::lcl_GetcoupnumDecl
Initial value:
=
"int lcl_Getcoupnum(int nNullDate,int nSettle, int nMat,int nFreq);\n"

Definition at line 726 of file op_financial.cxx.

std::string sc::opencl::lcl_GetCouppcd

Definition at line 329 of file op_financial.cxx.

std::string sc::opencl::lcl_GetCouppcdDecl
Initial value:
=
"int lcl_GetCouppcd(int nNullDate,int nSettle,int nMat,int nFreq,int nBase);\n"

Definition at line 326 of file op_financial.cxx.

std::string sc::opencl::nCorrValDecl
Initial value:
="double constant nCorrVal[]"
"= {0, 9e-1, 9e-2, 9e-3, 9e-4, 9e-5, 9e-6, 9e-7, "
"9e-8,9e-9, 9e-10, 9e-11, 9e-12, 9e-13, 9e-14, 9e-15};\n"

Definition at line 14 of file op_financial.cxx.

std::string sc::opencl::Round
Initial value:
=
"double Round(double fValue)\n"
"{\n"
" if ( fValue == 0.0 )\n"
" return fValue;\n"
"\n"
" double fFac = 0;\n"
" int nExp;\n"
" if ( fValue > 0.0 )\n"
" nExp = ( floor( log10( fValue ) ) );\n"
" else\n"
" nExp = 0;\n"
" int nIndex = 15 - nExp;\n"
" if ( nIndex > 15 )\n"
" nIndex = 15;\n"
" else if ( nIndex <= 1 )\n"
" nIndex = 0;\n"
" fValue = floor( fValue + 0.5 + nCorrVal[nIndex] );\n"
" return fValue;\n"
"}\n"

Definition at line 23 of file op_financial.cxx.

Referenced by sc::opencl::OpAmordegrc::BinInlineFun(), sc::opencl::OpAmorlinc::BinInlineFun(), and sc::opencl::RATE::BinInlineFun().

std::string sc::opencl::RoundDecl = "double Round(double fValue);\n"

Definition at line 21 of file op_financial.cxx.

std::string sc::opencl::ScaDate
Initial value:
=
"void ScaDate( int nNullDate, int nDate, int nBase,int *nOrigDay, "
"int *nMonth,int *nYear,int *bLastDayMode,int *bLastDay,"
"int *b30Days,int *bUSMode,int *nDay)\n"
"{\n"
" DaysToDate( nNullDate + nDate, nOrigDay, nMonth, nYear );\n"
" *bLastDayMode = (nBase != 5);\n"
" *bLastDay = (*nOrigDay >= DaysInMonth( *nMonth, *nYear ));\n"
" *b30Days = (nBase == 0) || (nBase == 4);\n"
" *bUSMode = (nBase == 0);\n"
" if( *b30Days)\n"
" {\n"
" *nDay = min( *nOrigDay, 30);\n"
" if( *bLastDay || (*nDay >=DaysInMonth( *nMonth, *nYear )) )\n"
" *nDay = 30;\n"
" }\n"
" else\n"
" {\n"
" int nLastDay = DaysInMonth( *nMonth, *nYear );\n"
" *nDay = *bLastDay ? nLastDay : min( *nOrigDay, nLastDay );\n"
" }\n"
"}\n"

Definition at line 287 of file op_financial.cxx.

std::string sc::opencl::ScaDate2
Initial value:
=
"void ScaDate2( int nNullDate, int nDate, int nBase,int *bLastDayMode,int *"
"bLastDay,int *b30Days,int *bUSMode)\n"
"{\n"
" int nOrigDay=0, nMonth=0, nYear=0;\n"
" DaysToDate( nNullDate + nDate, &nOrigDay, &nMonth, &nYear );\n"
" *bLastDayMode = (nBase != 5);\n"
" *bLastDay = (nOrigDay >= DaysInMonth( nMonth, nYear ));\n"
" *b30Days = (nBase == 0) || (nBase == 4);\n"
" *bUSMode = (nBase == 0);\n"
"}\n"

Definition at line 314 of file op_financial.cxx.

std::string sc::opencl::ScaDate2Decl
Initial value:
=
"void ScaDate2( int nNullDate, int nDate, int nBase,int *bLastDayMode,int *"
"bLastDay,int *b30Days,int *bUSMode);\n"

Definition at line 310 of file op_financial.cxx.

std::string sc::opencl::ScaDateDecl
Initial value:
=
"void ScaDate( int nNullDate, int nDate, int nBase,int *nOrigDay, "
"int *nMonth,int *nYear,int *bLastDayMode,int *bLastDay,"
"int *b30Days,int *bUSMode,int *nDay);\n"

Definition at line 282 of file op_financial.cxx.

std::string sc::opencl::SCdEpsilonDecl
Initial value:
=
"constant double SCdEpsilon = 1.0E-7;\n"

Definition at line 18 of file op_financial.cxx.

std::string sc::opencl::ScGetDDB
Initial value:
=
"double ScGetDDB(double fCost, double fSalvage, double fLife, double fPeriod,"
"double fFactor)\n"
"{\n"
" double fDdb, fRate, fOldValue, fNewValue;\n"
" fRate = fFactor / fLife;\n"
" if (fRate >= 1.0)\n"
" {\n"
" fRate = 1.0;\n"
" if (fPeriod == 1.0)\n"
" fOldValue = fCost;\n"
" else\n"
" fOldValue = 0.0;\n"
" }\n"
" else\n"
" fOldValue = fCost * pow(1.0 - fRate, fPeriod - 1.0);\n"
" fNewValue = fCost * pow(1.0 - fRate, fPeriod);\n"
" if (fNewValue < fSalvage)\n"
" fDdb = fOldValue - fSalvage;\n"
" else\n"
" fDdb = fOldValue - fNewValue;\n"
" if (fDdb < 0.0)\n"
" fDdb = 0.0;\n"
" return fDdb;\n"
"}\n"

Definition at line 1450 of file op_financial.cxx.

std::string sc::opencl::ScGetDDBDecl
Initial value:
=
"double ScGetDDB(double fCost, double fSalvage, double fLife, double fPeriod,"
"double fFactor);\n"

Definition at line 1446 of file op_financial.cxx.

std::string sc::opencl::ScInterVDB

Definition at line 1490 of file op_financial.cxx.

std::string sc::opencl::ScInterVDBDecl
Initial value:
=
"double ScInterVDB(double fCost, double fSalvage, double fLife, double fLife1,"
"double fPeriod, double fFactor);\n"

Definition at line 1486 of file op_financial.cxx.

std::string sc::opencl::setDay
Initial value:
=
"void setDay(int nOrigDay, int nMonth,int nYear,int bLastDay,int b30Days,"
"int *nDay)\n"
"{\n"
" if( b30Days )\n"
" {\n"
" *nDay = min( nOrigDay, 30);\n"
" if( bLastDay || (*nDay >= DaysInMonth( nMonth, nYear )) )\n"
" *nDay = 30;\n"
" }\n"
" else\n"
" {\n"
" int nLastDay = DaysInMonth( nMonth, nYear );\n"
" *nDay = bLastDay ? nLastDay : min( nOrigDay, nLastDay );\n"
" }\n"
"}\n"

Definition at line 810 of file op_financial.cxx.

std::string sc::opencl::setDayDecl
Initial value:
=
"void setDay(int nOrigDay, int nMonth,int nYear,int bLastDay,int b30Days,"
"int *nDay);\n"

Definition at line 807 of file op_financial.cxx.

std::string sc::opencl::VDBImplement

Definition at line 1538 of file op_financial.cxx.

std::string sc::opencl::VDBImplementDecl
Initial value:
=
"double VDBImplement(double fCost, double fSalvage, double fLife, double fStart"
", double fEnd, double fFactor, bool bNoSwitch);\n"

Definition at line 1534 of file op_financial.cxx.