mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
Merged in warning_fix (pull request #62)
Converted AtomicString to constexpr char[] Approved-by: Matt Feemster
This commit is contained in:
commit
24db55010c
@ -249,10 +249,7 @@ static constexpr char CarToRasFunctionString[] =
|
|||||||
"}\n"
|
"}\n"
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
static string AtomicString()
|
static constexpr char AtomicString[] =
|
||||||
{
|
|
||||||
ostringstream os;
|
|
||||||
os <<
|
|
||||||
"void AtomicAdd(volatile __global real_bucket_t* source, const real_bucket_t operand)\n"
|
"void AtomicAdd(volatile __global real_bucket_t* source, const real_bucket_t operand)\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
" union\n"
|
" union\n"
|
||||||
@ -273,6 +270,5 @@ static string AtomicString()
|
|||||||
" newVal.realVal = prevVal.realVal + operand;\n"
|
" newVal.realVal = prevVal.realVal + operand;\n"
|
||||||
" } while (atomic_cmpxchg((volatile __global atomi*)source, prevVal.intVal, newVal.intVal) != prevVal.intVal);\n"
|
" } while (atomic_cmpxchg((volatile __global atomi*)source, prevVal.intVal, newVal.intVal) != prevVal.intVal);\n"
|
||||||
"}\n";
|
"}\n";
|
||||||
return os.str();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(const Ember<T>& ember,
|
|||||||
CarToRasFunctionString;
|
CarToRasFunctionString;
|
||||||
|
|
||||||
if (lockAccum)
|
if (lockAccum)
|
||||||
os << AtomicString();
|
os << AtomicString;
|
||||||
|
|
||||||
os <<
|
os <<
|
||||||
xformFuncs.str() <<
|
xformFuncs.str() <<
|
||||||
|
Loading…
Reference in New Issue
Block a user