text:
# Julia wrapper for header: /home/shindo/cuda/include/cublas_v2.h
# Automatically generated using Clang.jl wrap_c, version 0.0.0

function cublasCreate_v2(handle)
    check_cublasstatus(ccall((:cublasCreate_v2,libcublas),cublasStatus_t,(Ptr{cublasHandle_t},),handle))
end

function cublasDestroy_v2(handle)
    check_cublasstatus(ccall((:cublasDestroy_v2,libcublas),cublasStatus_t,(cublasHandle_t,),handle))
end

function cublasGetVersion_v2(handle,version)
    check_cublasstatus(ccall((:cublasGetVersion_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{Cint}),handle,version))
end

function cublasSetStream_v2(handle,streamId)
    check_cublasstatus(ccall((:cublasSetStream_v2,libcublas),cublasStatus_t,(cublasHandle_t,cudaStream_t),handle,streamId))
end

function cublasGetStream_v2(handle,streamId)
    check_cublasstatus(ccall((:cublasGetStream_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{cudaStream_t}),handle,streamId))
end

function cublasGetPointerMode_v2(handle,mode)
    check_cublasstatus(ccall((:cublasGetPointerMode_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{cublasPointerMode_t}),handle,mode))
end

function cublasSetPointerMode_v2(handle,mode)
    check_cublasstatus(ccall((:cublasSetPointerMode_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasPointerMode_t),handle,mode))
end

function cublasGetAtomicsMode(handle,mode)
    check_cublasstatus(ccall((:cublasGetAtomicsMode,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{cublasAtomicsMode_t}),handle,mode))
end

function cublasSetAtomicsMode(handle,mode)
    check_cublasstatus(ccall((:cublasSetAtomicsMode,libcublas),cublasStatus_t,(cublasHandle_t,cublasAtomicsMode_t),handle,mode))
end

function cublasSetVector(n,elemSize,x,incx,devicePtr,incy)
    check_cublasstatus(ccall((:cublasSetVector,libcublas),cublasStatus_t,(Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint),n,elemSize,x,incx,devicePtr,incy))
end

function cublasGetVector(n,elemSize,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasGetVector,libcublas),cublasStatus_t,(Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint),n,elemSize,x,incx,y,incy))
end

function cublasSetMatrix(rows,cols,elemSize,A,lda,B,ldb)
    check_cublasstatus(ccall((:cublasSetMatrix,libcublas),cublasStatus_t,(Cint,Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint),rows,cols,elemSize,A,lda,B,ldb))
end

function cublasGetMatrix(rows,cols,elemSize,A,lda,B,ldb)
    check_cublasstatus(ccall((:cublasGetMatrix,libcublas),cublasStatus_t,(Cint,Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint),rows,cols,elemSize,A,lda,B,ldb))
end

function cublasSetVectorAsync(n,elemSize,hostPtr,incx,devicePtr,incy,stream)
    check_cublasstatus(ccall((:cublasSetVectorAsync,libcublas),cublasStatus_t,(Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint,cudaStream_t),n,elemSize,hostPtr,incx,devicePtr,incy,stream))
end

function cublasGetVectorAsync(n,elemSize,devicePtr,incx,hostPtr,incy,stream)
    check_cublasstatus(ccall((:cublasGetVectorAsync,libcublas),cublasStatus_t,(Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint,cudaStream_t),n,elemSize,devicePtr,incx,hostPtr,incy,stream))
end

function cublasSetMatrixAsync(rows,cols,elemSize,A,lda,B,ldb,stream)
    check_cublasstatus(ccall((:cublasSetMatrixAsync,libcublas),cublasStatus_t,(Cint,Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint,cudaStream_t),rows,cols,elemSize,A,lda,B,ldb,stream))
end

function cublasGetMatrixAsync(rows,cols,elemSize,A,lda,B,ldb,stream)
    check_cublasstatus(ccall((:cublasGetMatrixAsync,libcublas),cublasStatus_t,(Cint,Cint,Cint,Ptr{Void},Cint,Ptr{Void},Cint,cudaStream_t),rows,cols,elemSize,A,lda,B,ldb,stream))
end

function cublasXerbla(srName,info)
    ccall((:cublasXerbla,libcublas),Void,(Cstring,Cint),srName,info)
end

function cublasSnrm2_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasSnrm2_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,n,x,incx,result))
end

function cublasDnrm2_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasDnrm2_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,n,x,incx,result))
end

function cublasScnrm2_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasScnrm2_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{Cfloat}),handle,n,x,incx,result))
end

function cublasDznrm2_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasDznrm2_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cdouble}),handle,n,x,incx,result))
end

function cublasSdot_v2(handle,n,x,incx,y,incy,result)
    check_cublasstatus(ccall((:cublasSdot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,n,x,incx,y,incy,result))
end

function cublasDdot_v2(handle,n,x,incx,y,incy,result)
    check_cublasstatus(ccall((:cublasDdot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,n,x,incx,y,incy,result))
end

function cublasCdotu_v2(handle,n,x,incx,y,incy,result)
    check_cublasstatus(ccall((:cublasCdotu_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex}),handle,n,x,incx,y,incy,result))
end

function cublasCdotc_v2(handle,n,x,incx,y,incy,result)
    check_cublasstatus(ccall((:cublasCdotc_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex}),handle,n,x,incx,y,incy,result))
end

function cublasZdotu_v2(handle,n,x,incx,y,incy,result)
    check_cublasstatus(ccall((:cublasZdotu_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex}),handle,n,x,incx,y,incy,result))
end

function cublasZdotc_v2(handle,n,x,incx,y,incy,result)
    check_cublasstatus(ccall((:cublasZdotc_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex}),handle,n,x,incx,y,incy,result))
end

function cublasSscal_v2(handle,n,alpha,x,incx)
    check_cublasstatus(ccall((:cublasSscal_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,n,alpha,x,incx))
end

function cublasDscal_v2(handle,n,alpha,x,incx)
    check_cublasstatus(ccall((:cublasDscal_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,n,alpha,x,incx))
end

function cublasCscal_v2(handle,n,alpha,x,incx)
    check_cublasstatus(ccall((:cublasCscal_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,n,alpha,x,incx))
end

function cublasCsscal_v2(handle,n,alpha,x,incx)
    check_cublasstatus(ccall((:cublasCsscal_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Ptr{cuComplex},Cint),handle,n,alpha,x,incx))
end

function cublasZscal_v2(handle,n,alpha,x,incx)
    check_cublasstatus(ccall((:cublasZscal_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,n,alpha,x,incx))
end

function cublasZdscal_v2(handle,n,alpha,x,incx)
    check_cublasstatus(ccall((:cublasZdscal_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint),handle,n,alpha,x,incx))
end

function cublasSaxpy_v2(handle,n,alpha,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasSaxpy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,n,alpha,x,incx,y,incy))
end

function cublasDaxpy_v2(handle,n,alpha,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasDaxpy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,n,alpha,x,incx,y,incy))
end

function cublasCaxpy_v2(handle,n,alpha,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasCaxpy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,n,alpha,x,incx,y,incy))
end

function cublasZaxpy_v2(handle,n,alpha,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasZaxpy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,n,alpha,x,incx,y,incy))
end

function cublasScopy_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasScopy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,n,x,incx,y,incy))
end

function cublasDcopy_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasDcopy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,n,x,incx,y,incy))
end

function cublasCcopy_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasCcopy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,n,x,incx,y,incy))
end

function cublasZcopy_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasZcopy_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,n,x,incx,y,incy))
end

function cublasSswap_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasSswap_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,n,x,incx,y,incy))
end

function cublasDswap_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasDswap_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,n,x,incx,y,incy))
end

function cublasCswap_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasCswap_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,n,x,incx,y,incy))
end

function cublasZswap_v2(handle,n,x,incx,y,incy)
    check_cublasstatus(ccall((:cublasZswap_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,n,x,incx,y,incy))
end

function cublasIsamax_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIsamax_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIdamax_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIdamax_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIcamax_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIcamax_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIzamax_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIzamax_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIsamin_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIsamin_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIdamin_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIdamin_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIcamin_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIcamin_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasIzamin_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasIzamin_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cint}),handle,n,x,incx,result))
end

function cublasSasum_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasSasum_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,n,x,incx,result))
end

function cublasDasum_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasDasum_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,n,x,incx,result))
end

function cublasScasum_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasScasum_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{Cfloat}),handle,n,x,incx,result))
end

function cublasDzasum_v2(handle,n,x,incx,result)
    check_cublasstatus(ccall((:cublasDzasum_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cdouble}),handle,n,x,incx,result))
end

function cublasSrot_v2(handle,n,x,incx,y,incy,c,s)
    check_cublasstatus(ccall((:cublasSrot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat}),handle,n,x,incx,y,incy,c,s))
end

function cublasDrot_v2(handle,n,x,incx,y,incy,c,s)
    check_cublasstatus(ccall((:cublasDrot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble}),handle,n,x,incx,y,incy,c,s))
end

function cublasCrot_v2(handle,n,x,incx,y,incy,c,s)
    check_cublasstatus(ccall((:cublasCrot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{Cfloat},Ptr{cuComplex}),handle,n,x,incx,y,incy,c,s))
end

function cublasCsrot_v2(handle,n,x,incx,y,incy,c,s)
    check_cublasstatus(ccall((:cublasCsrot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{Cfloat},Ptr{Cfloat}),handle,n,x,incx,y,incy,c,s))
end

function cublasZrot_v2(handle,n,x,incx,y,incy,c,s)
    check_cublasstatus(ccall((:cublasZrot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cdouble},Ptr{cuDoubleComplex}),handle,n,x,incx,y,incy,c,s))
end

function cublasZdrot_v2(handle,n,x,incx,y,incy,c,s)
    check_cublasstatus(ccall((:cublasZdrot_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cdouble},Ptr{Cdouble}),handle,n,x,incx,y,incy,c,s))
end

function cublasSrotg_v2(handle,a,b,c,s)
    check_cublasstatus(ccall((:cublasSrotg_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{Cfloat},Ptr{Cfloat},Ptr{Cfloat},Ptr{Cfloat}),handle,a,b,c,s))
end

function cublasDrotg_v2(handle,a,b,c,s)
    check_cublasstatus(ccall((:cublasDrotg_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{Cdouble},Ptr{Cdouble},Ptr{Cdouble},Ptr{Cdouble}),handle,a,b,c,s))
end

function cublasCrotg_v2(handle,a,b,c,s)
    check_cublasstatus(ccall((:cublasCrotg_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{cuComplex},Ptr{cuComplex},Ptr{Cfloat},Ptr{cuComplex}),handle,a,b,c,s))
end

function cublasZrotg_v2(handle,a,b,c,s)
    check_cublasstatus(ccall((:cublasZrotg_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Ptr{Cdouble},Ptr{cuDoubleComplex}),handle,a,b,c,s))
end

function cublasSrotm_v2(handle,n,x,incx,y,incy,param)
    check_cublasstatus(ccall((:cublasSrotm_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,n,x,incx,y,incy,param))
end

function cublasDrotm_v2(handle,n,x,incx,y,incy,param)
    check_cublasstatus(ccall((:cublasDrotm_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,n,x,incx,y,incy,param))
end

function cublasSrotmg_v2(handle,d1,d2,x1,y1,param)
    check_cublasstatus(ccall((:cublasSrotmg_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{Cfloat},Ptr{Cfloat},Ptr{Cfloat},Ptr{Cfloat},Ptr{Cfloat}),handle,d1,d2,x1,y1,param))
end

function cublasDrotmg_v2(handle,d1,d2,x1,y1,param)
    check_cublasstatus(ccall((:cublasDrotmg_v2,libcublas),cublasStatus_t,(cublasHandle_t,Ptr{Cdouble},Ptr{Cdouble},Ptr{Cdouble},Ptr{Cdouble},Ptr{Cdouble}),handle,d1,d2,x1,y1,param))
end

function cublasSgemv_v2(handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasSgemv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasDgemv_v2(handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasDgemv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasCgemv_v2(handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasCgemv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasZgemv_v2(handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasZgemv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,trans,m,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasSgbmv_v2(handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasSgbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasDgbmv_v2(handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasDgbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasCgbmv_v2(handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasCgbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasZgbmv_v2(handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasZgbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,trans,m,n,kl,ku,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasStrmv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasStrmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasDtrmv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasDtrmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasCtrmv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasCtrmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasZtrmv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasZtrmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasStbmv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasStbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasDtbmv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasDtbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasCtbmv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasCtbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasZtbmv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasZtbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasStpmv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasStpmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasDtpmv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasDtpmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasCtpmv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasCtpmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasZtpmv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasZtpmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasStrsv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasStrsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasDtrsv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasDtrsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasCtrsv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasCtrsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasZtrsv_v2(handle,uplo,trans,diag,n,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasZtrsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,trans,diag,n,A,lda,x,incx))
end

function cublasStpsv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasStpsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasDtpsv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasDtpsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasCtpsv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasCtpsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasZtpsv_v2(handle,uplo,trans,diag,n,AP,x,incx)
    check_cublasstatus(ccall((:cublasZtpsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,diag,n,AP,x,incx))
end

function cublasStbsv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasStbsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasDtbsv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasDtbsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasCtbsv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasCtbsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasZtbsv_v2(handle,uplo,trans,diag,n,k,A,lda,x,incx)
    check_cublasstatus(ccall((:cublasZtbsv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,trans,diag,n,k,A,lda,x,incx))
end

function cublasSsymv_v2(handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasSsymv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasDsymv_v2(handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasDsymv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasCsymv_v2(handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasCsymv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasZsymv_v2(handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasZsymv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasChemv_v2(handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasChemv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasZhemv_v2(handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasZhemv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasSsbmv_v2(handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasSsbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasDsbmv_v2(handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasDsbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasChbmv_v2(handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasChbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasZhbmv_v2(handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasZhbmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,n,k,alpha,A,lda,x,incx,beta,y,incy))
end

function cublasSspmv_v2(handle,uplo,n,alpha,AP,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasSspmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,n,alpha,AP,x,incx,beta,y,incy))
end

function cublasDspmv_v2(handle,uplo,n,alpha,AP,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasDspmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,n,alpha,AP,x,incx,beta,y,incy))
end

function cublasChpmv_v2(handle,uplo,n,alpha,AP,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasChpmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,n,alpha,AP,x,incx,beta,y,incy))
end

function cublasZhpmv_v2(handle,uplo,n,alpha,AP,x,incx,beta,y,incy)
    check_cublasstatus(ccall((:cublasZhpmv_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,AP,x,incx,beta,y,incy))
end

function cublasSger_v2(handle,m,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasSger_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,m,n,alpha,x,incx,y,incy,A,lda))
end

function cublasDger_v2(handle,m,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasDger_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,m,n,alpha,x,incx,y,incy,A,lda))
end

function cublasCgeru_v2(handle,m,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasCgeru_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,m,n,alpha,x,incx,y,incy,A,lda))
end

function cublasCgerc_v2(handle,m,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasCgerc_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,m,n,alpha,x,incx,y,incy,A,lda))
end

function cublasZgeru_v2(handle,m,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasZgeru_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,m,n,alpha,x,incx,y,incy,A,lda))
end

function cublasZgerc_v2(handle,m,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasZgerc_v2,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,m,n,alpha,x,incx,y,incy,A,lda))
end

function cublasSsyr_v2(handle,uplo,n,alpha,x,incx,A,lda)
    check_cublasstatus(ccall((:cublasSsyr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,uplo,n,alpha,x,incx,A,lda))
end

function cublasDsyr_v2(handle,uplo,n,alpha,x,incx,A,lda)
    check_cublasstatus(ccall((:cublasDsyr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,uplo,n,alpha,x,incx,A,lda))
end

function cublasCsyr_v2(handle,uplo,n,alpha,x,incx,A,lda)
    check_cublasstatus(ccall((:cublasCsyr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,n,alpha,x,incx,A,lda))
end

function cublasZsyr_v2(handle,uplo,n,alpha,x,incx,A,lda)
    check_cublasstatus(ccall((:cublasZsyr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,x,incx,A,lda))
end

function cublasCher_v2(handle,uplo,n,alpha,x,incx,A,lda)
    check_cublasstatus(ccall((:cublasCher_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,n,alpha,x,incx,A,lda))
end

function cublasZher_v2(handle,uplo,n,alpha,x,incx,A,lda)
    check_cublasstatus(ccall((:cublasZher_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,x,incx,A,lda))
end

function cublasSspr_v2(handle,uplo,n,alpha,x,incx,AP)
    check_cublasstatus(ccall((:cublasSspr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,uplo,n,alpha,x,incx,AP))
end

function cublasDspr_v2(handle,uplo,n,alpha,x,incx,AP)
    check_cublasstatus(ccall((:cublasDspr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,uplo,n,alpha,x,incx,AP))
end

function cublasChpr_v2(handle,uplo,n,alpha,x,incx,AP)
    check_cublasstatus(ccall((:cublasChpr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{cuComplex},Cint,Ptr{cuComplex}),handle,uplo,n,alpha,x,incx,AP))
end

function cublasZhpr_v2(handle,uplo,n,alpha,x,incx,AP)
    check_cublasstatus(ccall((:cublasZhpr_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex}),handle,uplo,n,alpha,x,incx,AP))
end

function cublasSsyr2_v2(handle,uplo,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasSsyr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,uplo,n,alpha,x,incx,y,incy,A,lda))
end

function cublasDsyr2_v2(handle,uplo,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasDsyr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,uplo,n,alpha,x,incx,y,incy,A,lda))
end

function cublasCsyr2_v2(handle,uplo,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasCsyr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,n,alpha,x,incx,y,incy,A,lda))
end

function cublasZsyr2_v2(handle,uplo,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasZsyr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,x,incx,y,incy,A,lda))
end

function cublasCher2_v2(handle,uplo,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasCher2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,uplo,n,alpha,x,incx,y,incy,A,lda))
end

function cublasZher2_v2(handle,uplo,n,alpha,x,incx,y,incy,A,lda)
    check_cublasstatus(ccall((:cublasZher2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,uplo,n,alpha,x,incx,y,incy,A,lda))
end

function cublasSspr2_v2(handle,uplo,n,alpha,x,incx,y,incy,AP)
    check_cublasstatus(ccall((:cublasSspr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,uplo,n,alpha,x,incx,y,incy,AP))
end

function cublasDspr2_v2(handle,uplo,n,alpha,x,incx,y,incy,AP)
    check_cublasstatus(ccall((:cublasDspr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,uplo,n,alpha,x,incx,y,incy,AP))
end

function cublasChpr2_v2(handle,uplo,n,alpha,x,incx,y,incy,AP)
    check_cublasstatus(ccall((:cublasChpr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex}),handle,uplo,n,alpha,x,incx,y,incy,AP))
end

function cublasZhpr2_v2(handle,uplo,n,alpha,x,incx,y,incy,AP)
    check_cublasstatus(ccall((:cublasZhpr2_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex}),handle,uplo,n,alpha,x,incx,y,incy,AP))
end

function cublasSgemm_v2(handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasSgemm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasDgemm_v2(handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasDgemm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasCgemm_v2(handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCgemm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZgemm_v2(handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZgemm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasHgemm(handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasHgemm,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{__half},Ptr{__half},Cint,Ptr{__half},Cint,Ptr{__half},Ptr{__half},Cint),handle,transa,transb,m,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasSgemmEx(handle,transa,transb,m,n,k,alpha,A,Atype,lda,B,Btype,ldb,beta,C,Ctype,ldc)
    check_cublasstatus(ccall((:cublasSgemmEx,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Cfloat},Ptr{Void},cublasDataType_t,Cint,Ptr{Void},cublasDataType_t,Cint,Ptr{Cfloat},Ptr{Void},cublasDataType_t,Cint),handle,transa,transb,m,n,k,alpha,A,Atype,lda,B,Btype,ldb,beta,C,Ctype,ldc))
end

function cublasSsyrk_v2(handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc)
    check_cublasstatus(ccall((:cublasSsyrk_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc))
end

function cublasDsyrk_v2(handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc)
    check_cublasstatus(ccall((:cublasDsyrk_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc))
end

function cublasCsyrk_v2(handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCsyrk_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc))
end

function cublasZsyrk_v2(handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZsyrk_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc))
end

function cublasCherk_v2(handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCherk_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cfloat},Ptr{cuComplex},Cint,Ptr{Cfloat},Ptr{cuComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc))
end

function cublasZherk_v2(handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZherk_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,beta,C,ldc))
end

function cublasSsyr2k_v2(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasSsyr2k_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasDsyr2k_v2(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasDsyr2k_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasCsyr2k_v2(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCsyr2k_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZsyr2k_v2(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZsyr2k_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasCher2k_v2(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCher2k_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{Cfloat},Ptr{cuComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZher2k_v2(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZher2k_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasSsyrkx(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasSsyrkx,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasDsyrkx(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasDsyrkx,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasCsyrkx(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCsyrkx,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZsyrkx(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZsyrkx,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasCherkx(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCherkx,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{Cfloat},Ptr{cuComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZherkx(handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZherkx,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{Cdouble},Ptr{cuDoubleComplex},Cint),handle,uplo,trans,n,k,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasSsymm_v2(handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasSsymm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasDsymm_v2(handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasDsymm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasCsymm_v2(handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasCsymm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZsymm_v2(handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZsymm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasChemm_v2(handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasChemm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasZhemm_v2(handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc)
    check_cublasstatus(ccall((:cublasZhemm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,side,uplo,m,n,alpha,A,lda,B,ldb,beta,C,ldc))
end

function cublasStrsm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb)
    check_cublasstatus(ccall((:cublasStrsm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb))
end

function cublasDtrsm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb)
    check_cublasstatus(ccall((:cublasDtrsm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb))
end

function cublasCtrsm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb)
    check_cublasstatus(ccall((:cublasCtrsm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb))
end

function cublasZtrsm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb)
    check_cublasstatus(ccall((:cublasZtrsm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb))
end

function cublasStrmm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasStrmm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc))
end

function cublasDtrmm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasDtrmm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc))
end

function cublasCtrmm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasCtrmm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc))
end

function cublasZtrmm_v2(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasZtrmm_v2,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,C,ldc))
end

function cublasSgemmBatched(handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount)
    check_cublasstatus(ccall((:cublasSgemmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Cfloat},Ptr{Ptr{Cfloat}},Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Cfloat},Ptr{Ptr{Cfloat}},Cint,Cint),handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount))
end

function cublasDgemmBatched(handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount)
    check_cublasstatus(ccall((:cublasDgemmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Cdouble},Ptr{Ptr{Cdouble}},Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Cdouble},Ptr{Ptr{Cdouble}},Cint,Cint),handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount))
end

function cublasCgemmBatched(handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount)
    check_cublasstatus(ccall((:cublasCgemmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{cuComplex},Ptr{Ptr{cuComplex}},Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{cuComplex},Ptr{Ptr{cuComplex}},Cint,Cint),handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount))
end

function cublasZgemmBatched(handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount)
    check_cublasstatus(ccall((:cublasZgemmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Cint,Ptr{cuDoubleComplex},Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{cuDoubleComplex},Ptr{Ptr{cuDoubleComplex}},Cint,Cint),handle,transa,transb,m,n,k,alpha,Aarray,lda,Barray,ldb,beta,Carray,ldc,batchCount))
end

function cublasSgeam(handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasSgeam,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc))
end

function cublasDgeam(handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasDgeam,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc))
end

function cublasCgeam(handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasCgeam,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc))
end

function cublasZgeam(handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc)
    check_cublasstatus(ccall((:cublasZgeam,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,cublasOperation_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,transa,transb,m,n,alpha,A,lda,beta,B,ldb,C,ldc))
end

function cublasSgetrfBatched(handle,n,A,lda,P,info,batchSize)
    check_cublasstatus(ccall((:cublasSgetrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,n,A,lda,P,info,batchSize))
end

function cublasDgetrfBatched(handle,n,A,lda,P,info,batchSize)
    check_cublasstatus(ccall((:cublasDgetrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,n,A,lda,P,info,batchSize))
end

function cublasCgetrfBatched(handle,n,A,lda,P,info,batchSize)
    check_cublasstatus(ccall((:cublasCgetrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,n,A,lda,P,info,batchSize))
end

function cublasZgetrfBatched(handle,n,A,lda,P,info,batchSize)
    check_cublasstatus(ccall((:cublasZgetrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,n,A,lda,P,info,batchSize))
end

function cublasSgetriBatched(handle,n,A,lda,P,C,ldc,info,batchSize)
    check_cublasstatus(ccall((:cublasSgetriBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Cint),handle,n,A,lda,P,C,ldc,info,batchSize))
end

function cublasDgetriBatched(handle,n,A,lda,P,C,ldc,info,batchSize)
    check_cublasstatus(ccall((:cublasDgetriBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Cint),handle,n,A,lda,P,C,ldc,info,batchSize))
end

function cublasCgetriBatched(handle,n,A,lda,P,C,ldc,info,batchSize)
    check_cublasstatus(ccall((:cublasCgetriBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Cint),handle,n,A,lda,P,C,ldc,info,batchSize))
end

function cublasZgetriBatched(handle,n,A,lda,P,C,ldc,info,batchSize)
    check_cublasstatus(ccall((:cublasZgetriBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Cint),handle,n,A,lda,P,C,ldc,info,batchSize))
end

function cublasSgetrsBatched(handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize)
    check_cublasstatus(ccall((:cublasSgetrsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Cint),handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize))
end

function cublasDgetrsBatched(handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize)
    check_cublasstatus(ccall((:cublasDgetrsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Cint),handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize))
end

function cublasCgetrsBatched(handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize)
    check_cublasstatus(ccall((:cublasCgetrsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Cint),handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize))
end

function cublasZgetrsBatched(handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize)
    check_cublasstatus(ccall((:cublasZgetrsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Cint),handle,trans,n,nrhs,Aarray,lda,devIpiv,Barray,ldb,info,batchSize))
end

function cublasStrsmBatched(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount)
    check_cublasstatus(ccall((:cublasStrsmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cfloat},Ptr{Ptr{Cfloat}},Cint,Ptr{Ptr{Cfloat}},Cint,Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount))
end

function cublasDtrsmBatched(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount)
    check_cublasstatus(ccall((:cublasDtrsmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{Cdouble},Ptr{Ptr{Cdouble}},Cint,Ptr{Ptr{Cdouble}},Cint,Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount))
end

function cublasCtrsmBatched(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount)
    check_cublasstatus(ccall((:cublasCtrsmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuComplex},Ptr{Ptr{cuComplex}},Cint,Ptr{Ptr{cuComplex}},Cint,Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount))
end

function cublasZtrsmBatched(handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount)
    check_cublasstatus(ccall((:cublasZtrsmBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,cublasFillMode_t,cublasOperation_t,cublasDiagType_t,Cint,Cint,Ptr{cuDoubleComplex},Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Cint),handle,side,uplo,trans,diag,m,n,alpha,A,lda,B,ldb,batchCount))
end

function cublasSmatinvBatched(handle,n,A,lda,Ainv,lda_inv,info,batchSize)
    check_cublasstatus(ccall((:cublasSmatinvBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Cint),handle,n,A,lda,Ainv,lda_inv,info,batchSize))
end

function cublasDmatinvBatched(handle,n,A,lda,Ainv,lda_inv,info,batchSize)
    check_cublasstatus(ccall((:cublasDmatinvBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Cint),handle,n,A,lda,Ainv,lda_inv,info,batchSize))
end

function cublasCmatinvBatched(handle,n,A,lda,Ainv,lda_inv,info,batchSize)
    check_cublasstatus(ccall((:cublasCmatinvBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Cint),handle,n,A,lda,Ainv,lda_inv,info,batchSize))
end

function cublasZmatinvBatched(handle,n,A,lda,Ainv,lda_inv,info,batchSize)
    check_cublasstatus(ccall((:cublasZmatinvBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Cint),handle,n,A,lda,Ainv,lda_inv,info,batchSize))
end

function cublasSgeqrfBatched(handle,m,n,Aarray,lda,TauArray,info,batchSize)
    check_cublasstatus(ccall((:cublasSgeqrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Ptr{Cfloat}},Ptr{Cint},Cint),handle,m,n,Aarray,lda,TauArray,info,batchSize))
end

function cublasDgeqrfBatched(handle,m,n,Aarray,lda,TauArray,info,batchSize)
    check_cublasstatus(ccall((:cublasDgeqrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Ptr{Cdouble}},Ptr{Cint},Cint),handle,m,n,Aarray,lda,TauArray,info,batchSize))
end

function cublasCgeqrfBatched(handle,m,n,Aarray,lda,TauArray,info,batchSize)
    check_cublasstatus(ccall((:cublasCgeqrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Ptr{cuComplex}},Ptr{Cint},Cint),handle,m,n,Aarray,lda,TauArray,info,batchSize))
end

function cublasZgeqrfBatched(handle,m,n,Aarray,lda,TauArray,info,batchSize)
    check_cublasstatus(ccall((:cublasZgeqrfBatched,libcublas),cublasStatus_t,(cublasHandle_t,Cint,Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Ptr{cuDoubleComplex}},Ptr{Cint},Cint),handle,m,n,Aarray,lda,TauArray,info,batchSize))
end

function cublasSgelsBatched(handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize)
    check_cublasstatus(ccall((:cublasSgelsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Ptr{Cfloat}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize))
end

function cublasDgelsBatched(handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize)
    check_cublasstatus(ccall((:cublasDgelsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Ptr{Cdouble}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize))
end

function cublasCgelsBatched(handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize)
    check_cublasstatus(ccall((:cublasCgelsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Ptr{cuComplex}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize))
end

function cublasZgelsBatched(handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize)
    check_cublasstatus(ccall((:cublasZgelsBatched,libcublas),cublasStatus_t,(cublasHandle_t,cublasOperation_t,Cint,Cint,Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Ptr{cuDoubleComplex}},Cint,Ptr{Cint},Ptr{Cint},Cint),handle,trans,m,n,nrhs,Aarray,lda,Carray,ldc,info,devInfoArray,batchSize))
end

function cublasSdgmm(handle,mode,m,n,A,lda,x,incx,C,ldc)
    check_cublasstatus(ccall((:cublasSdgmm,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,Cint,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint,Ptr{Cfloat},Cint),handle,mode,m,n,A,lda,x,incx,C,ldc))
end

function cublasDdgmm(handle,mode,m,n,A,lda,x,incx,C,ldc)
    check_cublasstatus(ccall((:cublasDdgmm,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,Cint,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint,Ptr{Cdouble},Cint),handle,mode,m,n,A,lda,x,incx,C,ldc))
end

function cublasCdgmm(handle,mode,m,n,A,lda,x,incx,C,ldc)
    check_cublasstatus(ccall((:cublasCdgmm,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,Cint,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint,Ptr{cuComplex},Cint),handle,mode,m,n,A,lda,x,incx,C,ldc))
end

function cublasZdgmm(handle,mode,m,n,A,lda,x,incx,C,ldc)
    check_cublasstatus(ccall((:cublasZdgmm,libcublas),cublasStatus_t,(cublasHandle_t,cublasSideMode_t,Cint,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex},Cint),handle,mode,m,n,A,lda,x,incx,C,ldc))
end

function cublasStpttr(handle,uplo,n,AP,A,lda)
    check_cublasstatus(ccall((:cublasStpttr,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Ptr{Cfloat},Cint),handle,uplo,n,AP,A,lda))
end

function cublasDtpttr(handle,uplo,n,AP,A,lda)
    check_cublasstatus(ccall((:cublasDtpttr,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Ptr{Cdouble},Cint),handle,uplo,n,AP,A,lda))
end

function cublasCtpttr(handle,uplo,n,AP,A,lda)
    check_cublasstatus(ccall((:cublasCtpttr,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Ptr{cuComplex},Cint),handle,uplo,n,AP,A,lda))
end

function cublasZtpttr(handle,uplo,n,AP,A,lda)
    check_cublasstatus(ccall((:cublasZtpttr,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Ptr{cuDoubleComplex},Cint),handle,uplo,n,AP,A,lda))
end

function cublasStrttp(handle,uplo,n,A,lda,AP)
    check_cublasstatus(ccall((:cublasStrttp,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cfloat},Cint,Ptr{Cfloat}),handle,uplo,n,A,lda,AP))
end

function cublasDtrttp(handle,uplo,n,A,lda,AP)
    check_cublasstatus(ccall((:cublasDtrttp,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{Cdouble},Cint,Ptr{Cdouble}),handle,uplo,n,A,lda,AP))
end

function cublasCtrttp(handle,uplo,n,A,lda,AP)
    check_cublasstatus(ccall((:cublasCtrttp,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuComplex},Cint,Ptr{cuComplex}),handle,uplo,n,A,lda,AP))
end

function cublasZtrttp(handle,uplo,n,A,lda,AP)
    check_cublasstatus(ccall((:cublasZtrttp,libcublas),cublasStatus_t,(cublasHandle_t,cublasFillMode_t,Cint,Ptr{cuDoubleComplex},Cint,Ptr{cuDoubleComplex}),handle,uplo,n,A,lda,AP))
end


text:
module AuctionSimulator

#=
So I'm still getting up to speed in Julia. And I'm reading up a little on
auction theory, because why not.  So therefore I'm making a simple little
auction simulator.

We'll be simulating a sequence of "first price sealed bid" auctions,
where each of the actors will have some probability distribution
of utility for the item being auctioned, and based on that will
place bids.

When all bids are placed, the auction runs it course, the winner gets
the bid, and based on their utility function they will then get a
win or a loss.  Wins and losses are tallied for all actors for all
rounds, and in the end we compare the actors.

The actors each have a strategy that will give them a price to put
in their bid.

The question I'm asking myself is, can this kind of simulator be used
to compare the strategies of the various actors to see which one is the
better?   The actual strategis I'll be implementing will be so simple
as to be essentially useless in real life, but hopefully they will not be
identical in outcome over many rounds of simulations, because that
would mean that they were also useless to me today.

Maybe I should read https://arxiv.org/pdf/1907.08611.pdf To get inspired
about how to manage probability distributions?

I've tested this in Julia 1.3.1 on macOS 10.15.2. It mostly works for me :-)
=#

using Test
import Random
import KernelDensity
using Distributions
using Printf

struct UtilityExpectations
    # This is a distribution where each index represents a probability
    # for the utility of that value (so index 1 has the probability of
    # utility 1, index 2 the probability of utility 2, etc.)  We are also
    # assuming that  the actual utility is defined by a stochastic process,
    # where a dice is rolled, and one index in the distribution is chosen,
    # and the utility for that value, is the cumulated utilities up to
    # the value chosen.
    distribution:: Array{Float64, 1}

    # The utility values
    utilities:: Array{Float64, 1}
end

mutable struct Actor

    id::Int

    utility::UtilityExpectations

    # The strategy we'll use is: For the utilty function used by
    # the actor, this is the perentile at which we will make our bid.
    # If the price.  It's a very simple strategy.  The fraction
    # needs to be in the closed interval[0,1]
    fraction::Float64

    # The latest bid
    bid::Float64

    # The cumulated profit for this actor
    cumulatedProfit :: Float64

    # number of wins
    wins :: Float64
end

# XXX A kludge
expected_utility(u::UtilityExpectations) = sum(u.distribution[i] * u.utilities[i] for i in 1:length(u.utilities))
expected_utility(a::Actor) = expected_utility(a.utility)

initialize_actors_with_fixed_pdf(numOfActors, pdf, utilities) = [Actor(i, UtilityExpectations(pdf, utilities), 1/i, 0.0, 0.0, 0.0 ) for i in 1:numOfActors]

@test 300 == length(initialize_actors_with_fixed_pdf(300, [1.0], [3.0]))

find_highest_bidder(agents) = reduce(agents) do a,b
    a.bid > b.bid ? a : b
end

find_highest_bid(agents) = find_highest_bidder(agents).bid

function find_highest_bidders(agents)
    highest_bid = find_highest_bid(agents)
    return filter(a -> a.bid ==  highest_bid, agents)
end

function find_random_highest_bidder(agents)
    highest_bidders = find_highest_bidders(agents)
    return highest_bidders[rand(1:length(highest_bidders) )]
end

# Generate a random utility for an actor. The utility is a pair of vectors, the first
# giving utility values, the second giving the probabilities of those values.
# This isn't founded in any reasonable theory, it was just an assumption I made
# to be able to experiment a bit with mixture models, the Distributions
# library and in general mess about a little.  No deep thinking has gone into it
# but the direction I was thinking was that perhaps the various actors could
# be modelled using some external (to this simulator) modelling tool, and
# the input to the simulator is a simple utility/expectation function like this,
# and then interesting things could be made to happen. So far that hasn't turned out
# to be true, but it may still be a good idea :-)
function new_random_utility()
    # Give the actor a probability distribution and some
    # actual values to range over.  Eventually they will be
    # somewhat different for the different actors, but we start out by
    # them being exactly the same.
    gmm = MixtureModel(
	Normal.([-1.0, 0.0, 3.0], # mean vector
	        [0.3, 0.5, 1.0]), # std vector
	[0.25, 0.25, 0.5] # component weights
    )

    lowerLimit = -3 + 4*rand()
    span =  1 * rand()
    upperLimit =  lowerLimit + span
    utilities =  lowerLimit:0.01:upperLimit

    return UtilityExpectations(lowerLimit:0.01:upperLimit, pdf.(gmm, utilities))
end

function assign_new_random_utilities!(actors)
    for a in actors

      	# Assign a new utility function
        a.utility = new_random_utility()

	# Then set up the bid
 	a.bid = max(0.0,  a.fraction * expected_utility(a))
    end
end

function update_winners_profit!(winner::Actor)
    expectedUtility =  expected_utility(winner)
    estimatedProfit = expectedUtility - winner.bid
    winner.cumulatedProfit += estimatedProfit
    winner.wins += 1
    return expectedUtility, estimatedProfit
end

function run_auction(numOfActors::Int, noOfEpisodes::Int)

    actors = initialize_actors_with_fixed_pdf(numOfActors, [1], [1])
    result = zeros(noOfEpisodes, numOfActors * 3)

    for episode in 1:noOfEpisodes

        assign_new_random_utilities!(actors)

        # Find a winner. There may be more than one with the same
        # highest bid, and if there is, chose one at random.
        winner = find_random_highest_bidder(actors)

        # If there was an actual winner, award the profits to that winner
        #
        if (winner.bid != 0.0)
            expectedUtility, estimatedProfit = update_winners_profit!(winner)
            #	   @printf("Episode %5d  Winner = %d, bid = %6.2f, utility = %6.2f, profit = %6.2f\n", episode,  winner.id, winner.bid, expectedUtility, estimatedProfit)
            #	   println("Winner wins = ", winner.wins)
        else
            #         @printf("Episode %5d  had no winner, highest bid was zero\n", episode)
        end

        # Update the result
        for i in 1:numOfActors
      	    a = actors[i]
            id = Int(a.id)
	    cp = a.cumulatedProfit
	    bid = a.bid
	    wins = a.wins
	    cumulatedProfit =
     	        # @printf("recording episode = %f, actor %d, cp = %f, bid =%f, wins=%f\n", episode,  id , cp, bid, wins)
	        result[episode, 3(id - 1) + 1] = cp
	    result[episode, 3(id - 1) + 2] = bid
	    result[episode, 3(id - 1) + 3] = wins
	    # println(result[episode,:])
        end
    end
    return result
end

#  For the module
end

ext: jl


text:
@testset "Change bounds" begin
    cp = test_LP()
    change_bounds!(cp, [3; 1], xl = [-10.0; -20], xu = [10.0; 20])
    @test cp.xl == [-20; 1; -10]
    @test cp.xu == [20; 1; 10]
    change_bounds!(
        cp,
        ["gibberish1"; "r3"; "r1"; "gibberish2"],
        xl = [0; -30.0; -40; 0],
        xu = [0; 30.0; 40; 0],
    )
    @test cp.xl == [-40; 1; -30]
    @test cp.xu == [40; 1; 30]
    change_bounds!(cp, ["r1"; "r3"], xl = [-50.0; -60])
    @test cp.xl == [-50; 1; -60]
end

@testset "Verify consistency" begin
    cp = test_LP()
    @test size(cp.S) == (4, 3)
    (new_reactions, new_mets) = verify_consistency(
        cp,
        reshape(cp.S[:, end], :, 1),
        [1.0, 2.0, 3.0, 4.0],
        [2.0],
        [-1.0],
        [1.0],
        ["r4"],
        ["m1", "m2", "m3", "m6"],
        [1],
        [4],
    )
    @test new_reactions == [1]
    @test new_mets == [4]

    (new_reactions, new_mets) = verify_consistency(
        cp,
        reshape(cp.S[:, end], :, 1),
        [1.0, 2.0, 3.0, 4.0],
        [2.0],
        [-1.0],
        [1.0],
        ["r1"],
        ["m1", "m2", "m3", "m6"],
        [],
        [4],
    )
    @test new_reactions == []
    @test new_mets == [4]
end

@testset "Add reactions (checking existence and consistency)" begin
    cp = test_LP()
    @test size(cp.S) == (4, 3)
    (new_cp, new_reactions, new_mets) = add_reactions(
        cp,
        cp.S[:, end],
        [1.0, 2.0, 3.0, 4.0],
        2.0,
        -1.0,
        1.0,
        check_consistency = true,
    )
    @test n_reactions(cp) + 1 == n_reactions(new_cp)

    (new_cp, new_reactions, new_mets) = add_reactions(
        cp,
        cp.S[:, end],
        [1.0, 2.0, 3.0, 4.0],
        2.0,
        -1.0,
        1.0,
        "r1",
        ["m1", "m2", "m3", "m6"],
        check_consistency = true,
    )
    @test n_reactions(cp) == n_reactions(new_cp)
    @test n_metabolites(cp) + 1 == n_metabolites(new_cp)
end

@testset "Add reactions" begin
    cp = test_LP()
    @test size(cp.S) == (4, 3)
    cp = add_reactions(cp, 2.0 * ones(4), 3 .* ones(4), 2.0, -1.0, 1.0)
    @test size(cp.S) == (8, 4)
    cp = add_reactions(cp, 2.0 * ones(4, 1), 3 .* ones(4), 2 .* ones(1), -ones(1), ones(1))
    @test size(cp.S) == (12, 5)
    cp = add_reactions(
        cp,
        2.0 * ones(4, 10),
        3 .* ones(4),
        2 .* ones(10),
        -ones(10),
        ones(10),
    )
    @test size(cp.S) == (16, 15)

    cp = test_sparseLP()
    @test size(cp.S) == (4000, 3000)
    cp = add_reactions(cp, 2.0 * sprand(4000, 0.5), 3 .* sprand(4000, 0.5), 2.0, -1.0, 1.0)
    @test size(cp.S) == (8000, 3001)
    cp = add_reactions(
        cp,
        2.0 * sprand(4000, 1, 0.5),
        3 .* sprand(4000, 0.5),
        2 .* sprand(1, 0.5),
        -sprand(1, 0.5),
        sprand(1, 0.5),
    )
    @test size(cp.S) == (12000, 3002)
    cp = add_reactions(
        cp,
        2.0 * sprand(4000, 1000, 0.5),
        3 .* sprand(4000, 0.5),
        2 .* sprand(1000, 0.5),
        -sprand(1000, 0.5),
        sprand(1000, 0.5),
    )
    @test size(cp.S) == (16000, 4002)

    cp = test_sparseLP()
    @test size(cp.S) == (4000, 3000)
    cp = add_reactions(cp, 2.0 * ones(4000), 3 .* ones(4000), 2.0, -1.0, 1.0)
    @test size(cp.S) == (8000, 3001)
    cp = add_reactions(
        cp,
        2.0 * ones(4000, 1),
        3 .* ones(4000),
        2 .* ones(1),
        -ones(1),
        ones(1),
    )
    @test size(cp.S) == (12000, 3002)
    cp = add_reactions(
        cp,
        2.0 * ones(4000, 1000),
        3 .* ones(4000),
        2 .* ones(1000),
        -ones(1000),
        ones(1000),
    )
    @test size(cp.S) == (16000, 4002)

    # proper subset of existing metabolites
    cp = test_LP()
    new_cp = add_reactions(cp, [-1.0], zeros(1), 1.0, 0.0, 1.0, "r4", ["m1"])
    @test n_reactions(cp) + 1 == n_reactions(new_cp)

    @test_throws DimensionMismatch add_reactions(
        cp,
        2.0 * ones(4000, 1),
        3 .* ones(4000),
        2 .* ones(2),
        -ones(1),
        ones(1),
    )
end

@testset "Remove reactions" begin
    cp = test_LP()
    @test size(cp.S) == (4, 3)
    cp = remove_reactions(cp, 2)
    @test size(cp.S) == (0, 2)
    cp = remove_reactions(cp, [2, 1])
    @test size(cp.S) == (0, 0)

    cp = test_LP()
    @test size(cp.S) == (4, 3)
    cp = remove_reactions(cp, "r0")
    @test size(cp.S) == (4, 3)
    cp = remove_reactions(cp, "r1")
    @test size(cp.S) == (0, 2)
    cp = remove_reactions(cp, ["r2"])
    @test size(cp.S) == (0, 1)

    lp = CoreModel(
        [1.0 1 1 0; 1 1 1 0; 1 1 1 0; 0 0 0 1],
        collect(1.0:4),
        collect(1.0:4),
        collect(1.0:4),
        collect(1.0:4),
        ["r1"; "r2"; "r3"; "r4"],
        ["m1"; "m2"; "m3"; "m4"],
    )

    modLp = remove_reactions(lp, [4; 1])
    @test stoichiometry(modLp) == stoichiometry(lp)[1:3, 2:3]
    @test balance(modLp) == balance(lp)[1:3]
    @test objective(modLp) == objective(lp)[2:3]
    @test bounds(modLp)[1] == bounds(lp)[1][2:3]
    @test bounds(modLp)[2] == bounds(lp)[2][2:3]
    @test reactions(modLp) == reactions(lp)[2:3]
    @test metabolites(modLp) == metabolites(lp)[1:3]
end

@testset "Remove metabolites" begin
    model = load_model(CoreModel, model_paths["e_coli_core.json"])

    m1 = remove_metabolites(model, ["glc__D_e", "for_c"])
    m2 = remove_metabolites(model, "glc__D_e")
    m3 = remove_metabolites(model, indexin(["glc__D_e", "for_c"], metabolites(model)))
    m4 = remove_metabolites(model, first(indexin(["glc__D_e"], metabolites(model))))

    @test size(stoichiometry(m1)) == (70, 94)
    @test size(stoichiometry(m2)) == (71, 94)
    @test size(stoichiometry(m3)) == (70, 94)
    @test size(stoichiometry(m4)) == (71, 94)
    @test any(["glc__D_e", "for_c"] .∉ Ref(metabolites(m1)))
    @test any(["glc__D_e"] .∉ Ref(metabolites(m2)))
    @test any(["glc__D_e", "for_c"] .∉ Ref(metabolites(m3)))
    @test any(["glc__D_e"] .∉ Ref(metabolites(m4)))
end


text:
"""
GenX: An Configurable Capacity Expansion Model
Copyright (C) 2021,  Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
A complete copy of the GNU General Public License v2 (GPLv2) is available
in LICENSE.txt.  Users uncompressing this from an archive may not have
received this license file.  If not, see <http://www.gnu.org/licenses/>.
"""

function write_transmission_losses(path::AbstractString, inputs::Dict, setup::Dict, EP::Model)
	T = inputs["T"]     # Number of time steps (hours)
	Z = inputs["Z"]     # Number of zones
	L = inputs["L"]     # Number of transmission lines

	# Power losses for transmission between zones at each time step
	dfTLosses = DataFrame(Line = 1:L, Sum = Array{Union{Missing,Float32}}(undef, L))
	tlosses = zeros(L,T)
	if setup["ParameterScale"] == 1
		for i in 1:L
			if i in inputs["LOSS_LINES"]
				tlosses[i,:] = value.(EP[:vTLOSS])[i,:] * ModelScalingFactor
			end
			dfTLosses[!,:Sum][i] = sum(inputs["omega"].* tlosses[i,:]) * ModelScalingFactor
		end
		dfTLosses = hcat(dfTLosses, DataFrame(tlosses * ModelScalingFactor, :auto))
	else
		for i in 1:L
			if i in inputs["LOSS_LINES"]
				tlosses[i,:] = value.(EP[:vTLOSS])[i,:]
			end
			dfTLosses[!,:Sum][i] = sum(inputs["omega"].* tlosses[i,:])
		end
		dfTLosses = hcat(dfTLosses, DataFrame(tlosses, :auto))
	end

	auxNew_Names=[Symbol("Line");Symbol("Sum");[Symbol("t$t") for t in 1:T]]
	rename!(dfTLosses,auxNew_Names)
	total = DataFrame(["Total" sum(dfTLosses[!,:Sum]) fill(0.0, (1,T))], :auto)
	for t in 1:T
		total[:,t+2] .= sum(dfTLosses[:,Symbol("t$t")][1:L])
	end
	rename!(total,auxNew_Names)
	dfTLosses = vcat(dfTLosses, total)

	CSV.write(joinpath(path, "tlosses.csv"), dftranspose(dfTLosses, false), writeheader=false)
end

max_stars_repo_name: Betristor/LTESOM

max_issues_repo_name: Betristor/LTESOM

max_forks_repo_name: Betristor/LTESOM


text:
module PlotTools
using PyPlot
export plotraster, removespines, errbarpatch, makeline, plotpval

function errbarpatch(x, lower, upper; kwargs...)
    fill([x; reverse(x)], [lower; reverse(upper)]; linewidth=0, alpha=0.3, zorder=0, kwargs...)
end

function plotraster(spikes, onsets, lims)
    for i = 1:length(onsets)
        vlines(scale!(spikes[searchsortedfirst(spikes, onsets[i]+lims[1]/1000):searchsortedlast(spikes, onsets[i]+lims[2]/1000)]-onsets[i], 1000), i - 0.4, i + 0.4, linewidth=0.3)
    end
    xlim(lims[1], lims[2])
    curylim = gca()[:get_ylim]()
    if curylim[2] != 0.5 || curylim[1] < length(onsets)+0.5
        ylim(length(onsets)+0.5, 0.5)
    end
end

function removespines(spines=["top", "right"])
	ax = gca()
	for spine in spines
		ax[:spines][spine][:set_color]("none")
	end
end

function makeline(xstart, xend, ystart, yend, linelength, pv)
    plot([xstart, xstart, xend, xend], [ystart, max(ystart, yend)+linelength, max(ystart, yend)+linelength, yend], color="k")
    plotpval(xstart+(xend-xstart)/2, max(ystart, yend)+linelength, pv)
end

function plotpval(x, y, pv)
    if pv < 0.0001
        pv = "\$p < 10^{-$(floor(Integer, -log10(pv)))}\$"
    elseif pv < 0.001
        pv = "\$p = $(round(pv, 4))\$"
    elseif pv < 0.1
        pv = "\$p = $(round(pv, 3))\$"
    else
        pv = "\$p = $(round(pv, 2))\$"
    end
    text(x, y, verticalalignment="bottom", horizontalalignment="center", pv, fontsize=8)
end
end

max_stars_repo_licenses: MIT Unlicense

max_issues_repo_licenses: MIT Unlicense

max_forks_repo_licenses: MIT Unlicense


text:
# Autogenerated wrapper script for SCIP_PaPILO_jll for x86_64-linux-gnu-libgfortran4-cxx03
export libscip, papilo, scip

using bliss_jll
using boost_jll
using Bzip2_jll
using CompilerSupportLibraries_jll
using GMP_jll
using Ipopt_jll
using oneTBB_jll
using Readline_jll
using Zlib_jll
JLLWrappers.@generate_wrapper_header("SCIP_PaPILO")
JLLWrappers.@declare_library_product(libscip, "libscip.so.8.0")
JLLWrappers.@declare_executable_product(papilo)
JLLWrappers.@declare_executable_product(scip)
function __init__()
    JLLWrappers.@generate_init_header(bliss_jll, boost_jll, Bzip2_jll, CompilerSupportLibraries_jll, GMP_jll, Ipopt_jll, oneTBB_jll, Readline_jll, Zlib_jll)
    JLLWrappers.@init_library_product(
        libscip,
        "lib/libscip.so",
        RTLD_LAZY | RTLD_DEEPBIND,
    )

    JLLWrappers.@init_executable_product(
        papilo,
        "bin/papilo",
    )

    JLLWrappers.@init_executable_product(
        scip,
        "bin/scip",
    )

    JLLWrappers.@generate_init_footer()
end  # __init__()


text:
using StructuresKit

#User inputs
t1 = 0.78
t2 = 2.54
fy1 = 150.4
fy2 = 422.4
fu1 = 312.1
fu2 = 534.2
screw_diameter = 4.75

D1, D2, D3, D4, P1, P2, P3, P4 = Connections.cfs_load_deformation_interpolation_model(t1, t2, fy1, fy2, fu1, fu2, screw_diameter)

using Plots
plot([0.0, D1, D2, D3, D4], [0.0, P1, P2, P3, P4], markershape = :o, legend = false)


text:
using ProgressMeter

function main()
    out_dir="result"
    PARAMDAT="themal_para_D.json"

    xmax,ymax,nodes,vecAx,vecAy=read_allgrid()
    nt,dt,init_T,lam1,rho1,c1,bdcon,every_outnum,out_file_front,out_ext,restart_file,restart_num=input_para(PARAMDAT)

    Qbase,cellxmax,cellymax,restart_num = set_initQbase(xmax,ymax,nodes,restart_file,init_T,out_file_front,out_ext,out_dir,restart_num)

    #throw(UndefVarError(:x))

    # main loop
    println("threads num ")
    println(Threads.nthreads())

    prog = Progress(nt,1)
    for k in 1:nt
        next!(prog)

        # initial_setup
        volume = set_volume(nodes,cellxmax,cellymax)
        D = lam1/(c1*rho1)

        Qbase = set_boundary(Qbase,cellxmax,cellymax,vecAx,vecAy,bdcon)
        Qbase_hat = setup_Qbase_hat(Qbase,cellxmax,cellymax,volume)

        #println(Qbase[1,:])
        #println(Qbase_hat[2,:])

        # RHS
        E_hat, F_hat = central_diff(Qbase,cellxmax,cellymax,D,vecAx,vecAy,volume)
        #println(E_hat[2,2])
        #println(F_hat[2,2])
        RHS = setup_RHS(cellxmax,cellymax,E_hat, F_hat)
        #println(RHS[2,:])

        # Time step
        Qbase_hat = time_integration_explicit(dt,Qbase_hat,RHS,cellxmax,cellymax)
        #println(Qbase_hat[2,:])

        Qbase = Qhat_to_Q(Qbase_hat,cellxmax,cellymax,volume)

        evalnum=k+restart_num
        #println("nt : "*string(round(evalnum)))

        if round(evalnum) % every_outnum == 0
            output_result(evalnum,nodes,Qbase,cellxmax,cellymax,out_file_front,out_ext,out_dir)
        end

        if Qbase[2,2] < 0
            println("temp are minus !!")
            break
        end
    end
end

# -- main --
main()


text: load_log(tree::ResDirTree) = read(logfile(tree), String);

max_stars_repo_name: josePereiro/MyResultsManager

max_issues_repo_name: josePereiro/MyResultsManager

max_forks_repo_name: josePereiro/MyResultsManager


text:
function harmonic_oscillator(; X=Universe(2))
    A = [0.0 1.0; -1.0 0.0]
    prob = @ivp(x' = Ax, x(0) ∈ Singleton([1.0, 0.0]), x ∈ X)
    tspan = (0.0, 20.0)
    return prob, tspan
end

function harmonic_oscillator_homog_RFEM()
    A = [0 1; -(4π)^2 0]
    X0 = Hyperrectangle([1.0, 0.0], [0.1, 0.1])
    prob = @ivp(x' = A*x, x(0) ∈ X0)
    tspan = (0.0, 2.0)
    return prob, tspan
end

function harmonic_oscillator_forced_RFEM()
    A = [0 1; -(4π)^2 0]
    X0 = Hyperrectangle([1.0, 0.0], [0.1, 0.1])
    B = Matrix(1.0I, 2, 2)
    X = Universe(2)
    U = Interval(0.0) × Interval(0.8, 1.2)
    prob = @ivp(x' = A*x + B*u, x(0) ∈ X0, x ∈ X, u ∈ U)
    tspan = (0.0, 2.0)
    return prob, tspan
end


text:
using Documenter, OptimizationParameters

makedocs(;
    modules = [OptimizationParameters],
    format = Documenter.HTML(),
    pages = [
        "Home" => "index.md",
        "Example" => "example.md",
        "Library" => "library.md"
    ],
    sitename = "OptimizationParameters.jl",
    authors = "Taylor McDonnell <taylormcd@byu.edu>",
)

deploydocs(
    repo="github.com/byuflowlab/OptimizationParameters.jl.git",
)


text:
# similar to ⊆, but respect the sequence, ignore char vs. string difference
function ⫇(a, b)
    normalize(@nospecialize(x)) = x
    normalize(c::AbstractChar)  = string(c)
    a = normalize.(a)
    b = normalize.(b)

    n = length(a)
    i = 1
    for bi in b
        if a[i] == bi
            i += 1
        else
            i = 1
        end
        i == n && return true
    end
    return false
end

@testset "error location signature" begin
    result = report_call((Char,Char)) do a, b
        a + b
    end
    @test length(get_reports(result)) == 1
    r = first(get_reports(result))
    @test isa(r, NoMethodErrorReport)
    @test Any['(', 'a', Char, ", ", 'b', Char, ')'] ⫇ r.sig._sig
end

@testset ":invoke signature" begin
    m = @fixturedef begin
        foo(s::AbstractString) = throw(ArgumentError(s))
    end
    result = report_call(m.foo, (String,))
    @test length(get_reports(result)) == 1
    r = first(get_reports(result))
    @test isa(r, UncaughtExceptionReport)
    @test Any['(', 's', String, ')', ArgumentError] ⫇ r.sig._sig
end


text:
using Fmt
using Random
using BenchmarkTools

function printfmt(out, fmt, x)
    for i in 1:length(x)
        print(out, Fmt.format(fmt, x[i]))
    end
end

function benchmark(fmt, x)
    print(f"  {$fmt:<10}:")
    @btime printfmt($devnull, $fmt, $x)
end

N = 1_000_000
SEED = 1234
TARGETS = ["character", "string", "integer", "float"]
if !isempty(ARGS)
    TARGETS = ARGS
end

if "character" in TARGETS
    println(f"character (N = {$N:,})")
    Random.seed!(SEED)
    x = rand('a':'z', N)
    for fmt in [f"{}", f"{:<9}", f"{:^9}", f"{:>9}"]
        benchmark(fmt, x)
    end
end

if "string" in TARGETS
    println(f"string (N = {$N:,})")
    Random.seed!(SEED)
    x = [randstring(rand(1:20)) for _ in 1:N]
    for fmt in [f"{}", f"{:s}", f"{:>20}", f"{:^20}", f"{:<20}"]
        benchmark(fmt, x)
    end
end

if "integer" in TARGETS
    println(f"integer (N = {$N:,})")
    Random.seed!(SEED)
    x = rand(-1000:1000, N)
    for fmt in [f"{}", f"{:b}", f"{:o}", f"{:d}", f"{:x}"]
        benchmark(fmt, x)
    end
end

if "float" in TARGETS
    println(f"float (N = {$N:,})")
    Random.seed!(SEED)
    x = randn(N)
    for fmt in [f"{}", f"{:f}", f"{:e}", f"{:g}", f"{:a}"]
        benchmark(fmt, x)
    end
end


text:
# Leap on every year that is evenly divisible by 4
# except every year that is evenly divisible by 100
# unless the year is also evenly divisible by 400
is_leap_year(year::Int) = (year % 100 != 0 && year % 4 == 0) || (year % 400 == 0)