Looking for a gpu Biconjugate Gradient code which can accept a function

As Biconjugate Gradient try to solve AX = b, I don’t know if any cuda c implementation can let it accept a function rather than a specific ‘A’.
In matlab, I can input the handle of a function which can compute A
I instead of a specific matrix A.
like the introduction of the bicg function in matlab said:
“X = BICG(AFUN,B) accepts a function handle AFUN instead of the matrix A.
AFUN(X,‘notransp’) accepts a vector input X and returns the
matrix-vector product A*X while AFUN(X,‘transp’) returns A’*X. In all
of the following syntaxes, you can replace A by AFUN.”
I found no cuda c Biconjugate Gradient code mention this thing, if any code implemented that?