Skip to content

Commit e5cc6a6

Browse files
committed
fix headers, add meaningful defaults
1 parent 01460d8 commit e5cc6a6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

samples/99_aluperf/main.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#include <algorithm>
1212
#include <cinttypes>
13-
#include <strstream>
13+
#include <sstream>
1414
#include <vector>
1515

1616
int main(
@@ -26,8 +26,8 @@ int main(
2626
size_t ops = 1024;
2727
uint32_t seed = 0;
2828

29-
std::string datatype;
30-
std::string operation;
29+
std::string datatype("float");
30+
std::string operation("z = z + x");
3131
std::string buildOptions;
3232

3333
{
@@ -144,13 +144,14 @@ int main(
144144
maxTime = std::max(time, maxTime);
145145
}
146146

147-
double rate = (double)gws * ops / (minTime * 1024 * 1024 * 1024);
147+
//double rate = (double)gws * ops / (minTime * 1024 * 1024 * 1024);
148+
double rate = (double)gws * ops / (minTime * 1e9);
148149

149150
std::stringstream fnty;
150151
fnty << operation << " (" << datatype << ")";
151152

152153
printf("\n");
153-
printf("%32s %10s %10s %12s\n", "Function", "Min Time", "Max Time", "Max Ops/s");
154+
printf("%32s %10s %10s %12s\n", "Function", "Min Time", "Max Time", "Max GOps/s");
154155
printf("%32s %10f %10f %12f\n", fnty.str().c_str(), minTime, maxTime, rate);
155156

156157
return 0;

0 commit comments

Comments
 (0)