Merge pull request #22 from gh2k/opencl-hole

Fix opencl crash in 'hole' variation
This commit is contained in:
Matt Feemster 2015-07-24 06:41:42 -07:00
commit ad7d4a3b4f

View File

@ -2726,7 +2726,7 @@ public:
string inside = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
ss << "\t{\n"
<< "\t\treal_t r, delta = pow(precalcAtanyx / M_PI + 1, " << a << ");\n"
<< "\t\treal_t r, delta = pow(precalcAtanyx / (real_t)M_PI + 1, " << a << ");\n"
<< "\n"
<< "\t\tif (" << inside << " != 0)\n"
<< "\t\t r = xform->m_VariationWeights[" << varIndex << "] * delta / (precalcSqrtSumSquares + delta);\n"