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
@@ -67,15 +67,15 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
6767 if m != 0 && n != 0
6868 $ fname (sycl_queue (queue), handle_ptr[], m, n, ' O' , rowPtr, colVal, nzVal)
6969 end
70- dA = oneSparseMatrixCSR {$elty,$intty} (handle_ptr[], rowPtr, colVal, nzVal, (m,n), nnzA)
70+ dA = oneSparseMatrixCSR {$elty, $intty} (handle_ptr[], rowPtr, colVal, nzVal, (m, n), nnzA)
7171 finalizer (sparse_release_matrix_handle, dA)
7272 return dA
7373 end
7474
7575 function oneSparseMatrixCSC (
76- colPtr:: oneVector{$intty} , rowVal:: oneVector{$intty} ,
77- nzVal:: oneVector{$elty} , dims:: NTuple{2, Int}
78- )
76+ colPtr:: oneVector{$intty} , rowVal:: oneVector{$intty} ,
77+ nzVal:: oneVector{$elty} , dims:: NTuple{2, Int}
78+ )
7979 queue = global_queue (context (nzVal), device (nzVal))
8080 handle_ptr = Ref {matrix_handle_t} ()
8181 onemklXsparse_init_matrix_handle (handle_ptr)
@@ -85,7 +85,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
8585 if m != 0 && n != 0
8686 $ fname (sycl_queue (queue), handle_ptr[], n, m, ' O' , colPtr, rowVal, nzVal) # CSC of A is CSR of Aᵀ
8787 end
88- dA = oneSparseMatrixCSC {$elty,$intty} (handle_ptr[], colPtr, rowVal, nzVal, dims, nnzA)
88+ dA = oneSparseMatrixCSC {$elty, $intty} (handle_ptr[], colPtr, rowVal, nzVal, dims, nnzA)
8989 finalizer (sparse_release_matrix_handle, dA)
9090 return dA
9191 end
@@ -96,7 +96,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
9696 rowPtr = oneVector {$intty} (At. colptr)
9797 colVal = oneVector {$intty} (At. rowval)
9898 nzVal = oneVector {$elty} (At. nzval)
99- return oneSparseMatrixCSR (rowPtr, colVal, nzVal, (m,n))
99+ return oneSparseMatrixCSR (rowPtr, colVal, nzVal, (m, n))
100100 end
101101
102102 function SparseMatrixCSC (A:: oneSparseMatrixCSR{$elty, $intty} )
@@ -111,7 +111,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
111111 colPtr = oneVector {$intty} (A. colptr)
112112 rowVal = oneVector {$intty} (A. rowval)
113113 nzVal = oneVector {$elty} (A. nzval)
114- return oneSparseMatrixCSC (colPtr, rowVal, nzVal, (m,n))
114+ return oneSparseMatrixCSC (colPtr, rowVal, nzVal, (m, n))
115115 end
116116
117117 function SparseMatrixCSC (A:: oneSparseMatrixCSC{$elty, $intty} )
0 commit comments