Using cublasIsamax with 0 based indexing

Hi. I have the following code:

cublasSetPointerMode(handle, CUBLAS_POINTER_MODE_DEVICE);
for (int e = 0; e < npixel; e++) {
       kernel_func<<<block, thread>>> (classDev)
       cublasIsamax(handle, nclass, classDev, 1, &maxDev[e]);

when I do the copy of the vector maxDev to the host, the maximum indexes are 1-based but I want them 0-based. Do you know how to decrease the values contained in maxDev by 1?

See documentation.

Notice that the last equation reflects 1-based indexing used for compatibility with Fortran.
the resulting index, which is 0 if n,incx<=0 .

I think you’ll need to do any modifications manually