mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 00:09:02 +00:00
basic: workaround MSVC compiler bug with post-increment operator (#1939)
Prevent the compiler from optimizing away initialization loops
This commit is contained in:
committed by
GitHub
parent
b377b8537b
commit
5ce18c3f5a
@@ -516,8 +516,7 @@ static void makeReference(std::vector<T>& ref)
|
|||||||
// single channel lvalue
|
// single channel lvalue
|
||||||
for (size_t i = 0; i < N; i++)
|
for (size_t i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
ref[dstIndex * S + i] = 0;
|
ref[dstIndex++ * S + i] = 0;
|
||||||
++dstIndex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// normal lvalue
|
// normal lvalue
|
||||||
|
|||||||
Reference in New Issue
Block a user