Kaydet (Commit) 374ef1d2 authored tarafından haochen's avatar haochen Kaydeden (comit) Kohei Yoshida

Fix compilation problems on AMD OCL of finaancial functions

In AMD(HSA/NHSA) GPU compiler not support expressions like -double/double,
must generate as -1*(double/double). Changed functions: COUPDAYS,
COUPDAYBS, YIELD.

Change-Id: I8aeedd62073283375c46e97d60db36a1aad85170
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 86d0f46b
......@@ -316,7 +316,7 @@ char* finacialFunc =
"}\n"
"while(aDate > nSettle )\n"
"{\n"
"addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,-12/nFreq,&rYear);\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,\n"
......@@ -341,7 +341,7 @@ char* finacialFunc =
"}\n"
"while(aDate > nSettle )\n"
"{\n"
"addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,-12/nFreq,&rYear);\n"
"addMonths(rb30Days,rbLastDay,&rnDay,rDay,&rMonth,-1*(12/nFreq),&rYear);\n"
"aDate=DateToDays( rDay,rMonth,rYear );\n"
"}\n"
"int aNextDate=aDate;int aDay=rDay,aMonth=rMonth, aYear=rYear;\n"
......@@ -364,7 +364,7 @@ char* finacialFunc =
"if( aDate < nSettle )\n"
"rYear+= 1;\n"
"int d=DateToDays( rDay,rMonth,rYear );\n"
"int nMonthCount=-12 / nFreq;\n"
"int nMonthCount=-1*(12 / nFreq);\n"
"while(d > nSettle )\n"
"{\n"
"int nNewMonth = nMonthCount + rMonth;\n"
......@@ -419,7 +419,7 @@ char* finacialFunc =
"aDate=DateToDays( rDay,rMonth,rYear );\n"
"if( aDate > nSettle )\n"
"{\n"
"rYear+= -1;\n"
"rYear-= 1;\n"
"aDate=DateToDays( rDay,rMonth,rYear );\n"
"}\n"
"while(aDate <= nSettle )\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment