Make init arrays 1.0f, etc if float

This commit is contained in:
Tom Deakin 2015-07-29 14:47:37 +01:00
parent e3de82d63c
commit 0bd4bbe82d
2 changed files with 6 additions and 6 deletions

View File

@ -131,9 +131,9 @@ int main(int argc, char *argv[])
{
if (useFloat)
{
((float*)h_a)[i] = 1.0;
((float*)h_b)[i] = 2.0;
((float*)h_c)[i] = 0.0;
((float*)h_a)[i] = 1.0f;
((float*)h_b)[i] = 2.0f;
((float*)h_c)[i] = 0.0f;
}
else
{

View File

@ -163,9 +163,9 @@ int main(int argc, char *argv[])
{
if (useFloat)
{
((float*)h_a)[i] = 1.0;
((float*)h_b)[i] = 2.0;
((float*)h_c)[i] = 0.0;
((float*)h_a)[i] = 1.0f;
((float*)h_b)[i] = 2.0f;
((float*)h_c)[i] = 0.0f;
}
else
{