I tried to use the following recursive function
function gen_laguerre(n::Integer, alpha::Number, x::T)::T where T <: BlasFloat
n == 0 && return 1
n == 1 && return 1 + alpha - x
return ((2*n-1+alpha-x)*gen_laguerre(n-1,alpha,x)-(n-1+alpha)*gen_laguerre(n-2,alpha,x))/n
end
but, as discussed here, it returns illegal memory indexing when using the GPU. Moreover, trying it with che CPU, I noticed that it is very slow compared to the HypergeometricFunctions.jl solution.