I was using cuBLAS and notice that, in some functions, you are allowed to pass parameters in either device or host memory just using a pointer.
For example cublasSgemv:
cublasStatus_t cublasSgemv(cublasHandle_t handle, cublasOperation_t trans, int m, int n, const float *alpha, const float *A, int lda, const float *x, int incx, const float *beta, float *y, int incy)
The documentation states that both alpha and beta pointers can be pointers to either device or host memory.
This function must have a way to tell apart both scenarios, right?
How can I tell if an address is in the device or host memory?