I am trying to use CUDA C for GPU computing, in particular matrix inversion problem. Meanwhile at the beginning of my code I have defined function. But, that seems to give me an error of "expected declation" at the line where I initiate "do".
I am new to C++ so haven't tried much.
#include<cublas_v2.h>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#define cudacall(call)
do
{
cudaError_t err = (call);
if (cudaSuccess != err)
{
fprintf(stderr, "CUDA Error:\nFile = %s\nLine = %d\nReason = %s\n", __FILE__, __LINE__, cudaGetErrorString(err));
cudaDeviceReset();
exit(EXIT_FAILURE)
}
}
while (0);
"Expected Declaration"