@@ -192,51 +192,51 @@ run(`rm tmp.mtx`)
192
192
# test that Sparse(Ptr) constructor throws the right places
193
193
# # The struct pointer must be constructed by the library constructor and then modified afterwards to checks that the method throws
194
194
# ## illegal dtype (for now but should be supprted at some point)
195
- p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
195
+ p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
196
196
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
197
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Cint ))
197
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int ))
198
198
puint = convert (Ptr{Uint32}, p)
199
199
unsafe_store! (puint, CHOLMOD. SINGLE, 3 * div (sizeof (Csize_t), 4 ) + 5 * div (sizeof (Ptr{Void}), 4 ) + 4 )
200
200
@test_throws CHOLMOD. CHOLMODException CHOLMOD. Sparse (p)
201
201
202
202
# ## illegal dtype
203
- p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
203
+ p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
204
204
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
205
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Cint ))
205
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int ))
206
206
puint = convert (Ptr{Uint32}, p)
207
207
unsafe_store! (puint, 5 , 3 * div (sizeof (Csize_t), 4 ) + 5 * div (sizeof (Ptr{Void}), 4 ) + 4 )
208
208
@test_throws CHOLMOD. CHOLMODException CHOLMOD. Sparse (p)
209
209
210
210
# ## illegal xtype
211
- p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
211
+ p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
212
212
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
213
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Cint ))
213
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int ))
214
214
puint = convert (Ptr{Uint32}, p)
215
215
unsafe_store! (puint, 3 , 3 * div (sizeof (Csize_t), 4 ) + 5 * div (sizeof (Ptr{Void}), 4 ) + 3 )
216
216
@test_throws CHOLMOD. CHOLMODException CHOLMOD. Sparse (p)
217
217
218
218
# ## illegal itype
219
- p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
219
+ p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
220
220
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
221
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Cint ))
221
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int ))
222
222
puint = convert (Ptr{Uint32}, p)
223
223
unsafe_store! (puint, CHOLMOD. INTLONG, 3 * div (sizeof (Csize_t), 4 ) + 5 * div (sizeof (Ptr{Void}), 4 ) + 2 )
224
224
@test_throws CHOLMOD. CHOLMODException CHOLMOD. Sparse (p)
225
225
226
226
# ## illegal itype
227
- p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
227
+ p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
228
228
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
229
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Cint ))
229
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int ))
230
230
puint = convert (Ptr{Uint32}, p)
231
231
unsafe_store! (puint, 5 , 3 * div (sizeof (Csize_t), 4 ) + 5 * div (sizeof (Ptr{Void}), 4 ) + 2 )
232
232
@test_throws CHOLMOD. CHOLMODException CHOLMOD. Sparse (p)
233
233
234
234
# test that Sparse(Ptr) works for SuiteSparse_long (on 64 bit systems)
235
235
if CHOLMOD. SuiteSparse_long == Int64
236
- p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
236
+ p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_SparseVoid},
237
237
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
238
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (CHOLMOD . SuiteSparse_long ))
239
- @test isa (CHOLMOD. Sparse (p), CHOLMOD. Sparse{Float64,CHOLMOD . SuiteSparse_long })
238
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int32 ))
239
+ @test isa (CHOLMOD. Sparse (p), CHOLMOD. Sparse{Float64,Int32 })
240
240
end
241
241
242
242
# Test Dense wrappers (only Float64 supported a present)
281
281
282
282
# Test Sparse and Factor
283
283
# # test free_sparse!
284
- p = ccall ((:cholmod_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_Sparse{Float64,Cint}},
284
+ p = ccall ((:cholmod_l_allocate_sparse , :libcholmod ), Ptr{CHOLMOD. C_Sparse{Float64,Cint}},
285
285
(Csize_t, Csize_t, Csize_t, Cint, Cint, Cint, Cint, Ptr{Void}),
286
- 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Cint ))
286
+ 1 , 1 , 1 , true , true , 0 , CHOLMOD. REAL, CHOLMOD. common (Int ))
287
287
@test CHOLMOD. free_sparse! (p)
288
288
289
289
for elty in (Float64, Complex{Float64})
0 commit comments