JuliaAttic / CUBLAS.jl

Julia interface to CUBLAS
Other
26 stars 19 forks source link

'None' should be 'Void' for julia v0.5 in the source file "src/libcublas.jl #23

Open chenych11 opened 8 years ago

chenych11 commented 8 years ago

None is replaced by Union{} in v0.5 and the None type is not defined in this version. Simply replacing the Nones to Union{}s does not work. According to the documentation (i.e., ccall) of v0.5, the occurrances of None in the following functions defined in src/libcublas.jl should be Void.

function cublasSetVector(n, elemSize, x, incx, devicePtr, incy)
  statuscheck(ccall( (:cublasSetVector, libcublas), cublasStatus_t, (Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint), n, elemSize, x, incx, devicePtr, incy))
end
function cublasGetVector(n, elemSize, x, incx, y, incy)
  statuscheck(ccall( (:cublasGetVector, libcublas), cublasStatus_t, (Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint), n, elemSize, x, incx, y, incy))
end
function cublasSetMatrix(rows, cols, elemSize, A, lda, B, ldb)
  statuscheck(ccall( (:cublasSetMatrix, libcublas), cublasStatus_t, (Cint, Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint), rows, cols, elemSize, A, lda, B, ldb))
end
function cublasGetMatrix(rows, cols, elemSize, A, lda, B, ldb)
  statuscheck(ccall( (:cublasGetMatrix, libcublas), cublasStatus_t, (Cint, Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint), rows, cols, elemSize, A, lda, B, ldb))
end
function cublasSetVectorAsync(n, elemSize, hostPtr, incx, devicePtr, incy, stream)
  statuscheck(ccall( (:cublasSetVectorAsync, libcublas), cublasStatus_t, (Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint, cudaStream_t), n, elemSize, hostPtr, incx, devicePtr, incy, stream))
end
function cublasGetVectorAsync(n, elemSize, devicePtr, incx, hostPtr, incy, stream)
  statuscheck(ccall( (:cublasGetVectorAsync, libcublas), cublasStatus_t, (Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint, cudaStream_t), n, elemSize, devicePtr, incx, hostPtr, incy, stream))
end
function cublasSetMatrixAsync(rows, cols, elemSize, A, lda, B, ldb, stream)
  statuscheck(ccall( (:cublasSetMatrixAsync, libcublas), cublasStatus_t, (Cint, Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint, cudaStream_t), rows, cols, elemSize, A, lda, B, ldb, stream))
end
function cublasGetMatrixAsync(rows, cols, elemSize, A, lda, B, ldb, stream)
  statuscheck(ccall( (:cublasGetMatrixAsync, libcublas), cublasStatus_t, (Cint, Cint, Cint, Ptr{None}, Cint, Ptr{None}, Cint, cudaStream_t), rows, cols, elemSize, A, lda, B, ldb, stream))
end
function cublasXerbla(srName, info)
  ccall( (:cublasXerbla, libcublas), None, (Ptr{UInt8}, Cint), srName, info)
end
kshyatt commented 7 years ago

Thanks for the report! I've been terribly busy recently - would you be willing to open a PR to fix this?