11function sparse_release_matrix_handle (A:: oneAbstractSparseMatrix )
22 queue = global_queue (context (A. nzVal), device (A. nzVal))
33 m, n = size (A)
4- if m != 0 && n != 0
4+ return if m != 0 && n != 0
55 handle_ptr = Ref {matrix_handle_t} (A. handle)
66 onemklXsparse_release_matrix_handle (sycl_queue (queue), handle_ptr)
77 end
@@ -18,9 +18,9 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
1818 @eval begin
1919
2020 function oneSparseMatrixCSR (
21- rowPtr:: oneVector{$intty} , colVal:: oneVector{$intty} ,
22- nzVal:: oneVector{$elty} , dims:: NTuple{2, Int}
23- )
21+ rowPtr:: oneVector{$intty} , colVal:: oneVector{$intty} ,
22+ nzVal:: oneVector{$elty} , dims:: NTuple{2, Int}
23+ )
2424 handle_ptr = Ref {matrix_handle_t} ()
2525 onemklXsparse_init_matrix_handle (handle_ptr)
2626 m, n = dims
@@ -30,15 +30,15 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
3030 if m != 0 && n != 0
3131 $ fname (sycl_queue (queue), handle_ptr[], m, n, ' O' , rowPtr, colVal, nzVal)
3232 end
33- dA = oneSparseMatrixCSR {$elty,$intty} (handle_ptr[], rowPtr, colVal, nzVal, (m,n), nnzA)
33+ dA = oneSparseMatrixCSR {$elty, $intty} (handle_ptr[], rowPtr, colVal, nzVal, (m, n), nnzA)
3434 finalizer (sparse_release_matrix_handle, dA)
3535 return dA
3636 end
3737
3838 function oneSparseMatrixCSC (
39- colPtr:: oneVector{$intty} , rowVal:: oneVector{$intty} ,
40- nzVal:: oneVector{$elty} , dims:: NTuple{2, Int}
41- )
39+ colPtr:: oneVector{$intty} , rowVal:: oneVector{$intty} ,
40+ nzVal:: oneVector{$elty} , dims:: NTuple{2, Int}
41+ )
4242 queue = global_queue (context (nzVal), device (nzVal))
4343 handle_ptr = Ref {matrix_handle_t} ()
4444 onemklXsparse_init_matrix_handle (handle_ptr)
@@ -48,7 +48,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
4848 if m != 0 && n != 0
4949 $ fname (sycl_queue (queue), handle_ptr[], n, m, ' O' , colPtr, rowVal, nzVal) # CSC of A is CSR of Aᵀ
5050 end
51- dA = oneSparseMatrixCSC {$elty,$intty} (handle_ptr[], colPtr, rowVal, nzVal, dims, nnzA)
51+ dA = oneSparseMatrixCSC {$elty, $intty} (handle_ptr[], colPtr, rowVal, nzVal, dims, nnzA)
5252 finalizer (sparse_release_matrix_handle, dA)
5353 return dA
5454 end
@@ -59,7 +59,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
5959 rowPtr = oneVector {$intty} (At. colptr)
6060 colVal = oneVector {$intty} (At. rowval)
6161 nzVal = oneVector {$elty} (At. nzval)
62- return oneSparseMatrixCSR (rowPtr, colVal, nzVal, (m,n))
62+ return oneSparseMatrixCSR (rowPtr, colVal, nzVal, (m, n))
6363 end
6464
6565 function SparseMatrixCSC (A:: oneSparseMatrixCSR{$elty, $intty} )
@@ -74,7 +74,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
7474 colPtr = oneVector {$intty} (A. colptr)
7575 rowVal = oneVector {$intty} (A. rowval)
7676 nzVal = oneVector {$elty} (A. nzval)
77- return oneSparseMatrixCSC (colPtr, rowVal, nzVal, (m,n))
77+ return oneSparseMatrixCSC (colPtr, rowVal, nzVal, (m, n))
7878 end
7979
8080 function SparseMatrixCSC (A:: oneSparseMatrixCSC{$elty, $intty} )
0 commit comments