Skip to content
Snippets Groups Projects
Verified Commit 43d9e813 authored by Dorian Stoll's avatar Dorian Stoll
Browse files

rodinia-srad: c: Output unconditionally

parent d195daa9
No related branches found
No related tags found
No related merge requests found
option(
'rodinia_srad_output',
type: 'boolean',
value: false,
)
...@@ -10,16 +10,9 @@ options = [ ...@@ -10,16 +10,9 @@ options = [
'c_std=c99', 'c_std=c99',
] ]
cxxflags = []
if get_option('rodinia_srad_output')
cxxflags += ['-DOUTPUT']
endif
executable( executable(
'rodinia-srad-c', 'rodinia-srad-c',
sources, sources,
cpp_args: cxxflags,
dependencies: dependencies, dependencies: dependencies,
override_options: options, override_options: options,
) )
// srad.cpp : Defines the entry point for the console application. // srad.cpp : Defines the entry point for the console application.
// //
//#define OUTPUT
#define OPEN #define OPEN
#define ITERATION #define ITERATION
...@@ -184,13 +182,7 @@ int main(int argc, char *argv[]) { ...@@ -184,13 +182,7 @@ int main(int argc, char *argv[]) {
// image update (equ 61) // image update (equ 61)
J[k] = J[k] + 0.25 * lambda * D; J[k] = J[k] + 0.25 * lambda * D;
#ifdef OUTPUT
// printf("%.5f ", J[k]);
#endif // output
} }
#ifdef OUTPUT
// printf("\n");
#endif // output
} }
#ifdef ITERATION #ifdef ITERATION
...@@ -198,7 +190,6 @@ int main(int argc, char *argv[]) { ...@@ -198,7 +190,6 @@ int main(int argc, char *argv[]) {
#endif #endif
#ifdef OUTPUT
for (int i = 0; i < rows; i++) { for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) { for (int j = 0; j < cols; j++) {
...@@ -206,7 +197,6 @@ int main(int argc, char *argv[]) { ...@@ -206,7 +197,6 @@ int main(int argc, char *argv[]) {
} }
printf("\n"); printf("\n");
} }
#endif
printf("Computation Done\n"); printf("Computation Done\n");
...@@ -233,12 +223,6 @@ void random_matrix(float *I, int rows, int cols) { ...@@ -233,12 +223,6 @@ void random_matrix(float *I, int rows, int cols) {
for (int i = 0; i < rows; i++) { for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) { for (int j = 0; j < cols; j++) {
I[i * cols + j] = rand() / (float)RAND_MAX; I[i * cols + j] = rand() / (float)RAND_MAX;
#ifdef OUTPUT
// printf("%g ", I[i * cols + j]);
#endif
} }
#ifdef OUTPUT
// printf("\n");
#endif
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment