I’m trying to use cublasDasum to sum a vector. I can get it to work properly if it returns the result to a host variable. I then tried to allocate a double on the device and returning the result to the device but it results in a segmentation fault. The documentation says this function supports returns to the host or device. The function declaration looks like:
cublasDasum(cublasHandle_t handle, int n, const double *x, int incx, double *result);