mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-22 16:14:24 +00:00
Gate CUDA usage behind the POLYBENCH_USE_CUDA
flag
This commit is contained in:
parent
f7cbdba3a2
commit
b526108132
1 changed files with 32 additions and 24 deletions
|
@ -108,6 +108,8 @@ __host__ static void kernel_atax(DATA_TYPE** A, DATA_TYPE* X, DATA_TYPE* Y)
|
|||
*/
|
||||
__host__ int main(int argc, char** argv)
|
||||
{
|
||||
#ifndef POLYBENCH_USE_CUDA
|
||||
|
||||
// A[NX][NY]
|
||||
DATA_TYPE** A = new DATA_TYPE*[NX] {};
|
||||
for(unsigned int x = 0; x < NX; x++)
|
||||
|
@ -136,5 +138,11 @@ __host__ int main(int argc, char** argv)
|
|||
/* Prevent dead-code elimination. All live-out data must be printed by the function call in argument. */
|
||||
polybench_prevent_dce(print_array(y));
|
||||
|
||||
#else
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue