Display precision in the header output

This commit is contained in:
Tom Deakin 2015-07-27 17:19:19 +01:00
parent 80955ff2dc
commit 7ba0b8fc18
2 changed files with 14 additions and 2 deletions

View File

@ -162,7 +162,7 @@ int main(int argc, char *argv[])
std::cout
<< "GPU-STREAM" << std::endl
<< "Version: " << VERSION_STRING << std::endl
<< "Implementation: CUDA" << std::endl << std::endl;
<< "Implementation: CUDA" << std::endl;
try
{
@ -170,6 +170,11 @@ int main(int argc, char *argv[])
if (NTIMES < 2) throw badntimes();
std::cout << "Precision: ";
if (useFloat) std::cout << "float";
else std::cout << "double";
std::cout << std::endl << std::endl;
if (ARRAY_SIZE % 1024 != 0)
{
unsigned int OLD_ARRAY_SIZE = ARRAY_SIZE;

View File

@ -127,7 +127,7 @@ int main(int argc, char *argv[])
std::cout
<< "GPU-STREAM" << std::endl
<< "Version: " << VERSION_STRING << std::endl
<< "Implementation: OpenCL" << std::endl << std::endl;
<< "Implementation: OpenCL" << std::endl;
try
{
@ -135,6 +135,13 @@ int main(int argc, char *argv[])
if (NTIMES < 2) throw badntimes();
std::cout << "Precision: ";
if (useFloat) std::cout << "float";
else std::cout << "double";
std::cout << std::endl << std::endl;
// Open the Kernel source
std::ifstream in("ocl-stream-kernels.cl");
if (!in.is_open()) throw badfile();