36
36
_hint_log_all = 128
37
37
_hint_no_duplicates = 256
38
38
_hint_time_check = 512
39
+ _hint_transpose = 1024
39
40
40
41
41
42
def get_log_hints (default = True , error = False , warning = False ):
@@ -136,7 +137,10 @@ def load_and_configure(cubool_lib_path: str):
136
137
index_t = ctypes .c_uint
137
138
hints_t = ctypes .c_uint
138
139
matrix_p = ctypes .c_void_p
140
+ vector_p = ctypes .c_void_p
141
+
139
142
p_to_matrix_p = ctypes .POINTER (matrix_p )
143
+ p_to_vector_p = ctypes .POINTER (vector_p )
140
144
141
145
lib .cuBool_SetupLogging .restype = status_t
142
146
lib .cuBool_SetupLogging .argtypes = [
@@ -155,8 +159,8 @@ def load_and_configure(cubool_lib_path: str):
155
159
lib .cuBool_Matrix_New .restype = status_t
156
160
lib .cuBool_Matrix_New .argtypes = [
157
161
p_to_matrix_p ,
158
- ctypes . c_uint ,
159
- ctypes . c_uint
162
+ index_t ,
163
+ index_t
160
164
]
161
165
162
166
lib .cuBool_Matrix_Free .restype = status_t
@@ -167,17 +171,17 @@ def load_and_configure(cubool_lib_path: str):
167
171
lib .cuBool_Matrix_Build .restype = status_t
168
172
lib .cuBool_Matrix_Build .argtypes = [
169
173
matrix_p ,
170
- ctypes .POINTER (ctypes . c_uint ),
171
- ctypes .POINTER (ctypes . c_uint ),
172
- ctypes . c_uint ,
174
+ ctypes .POINTER (index_t ),
175
+ ctypes .POINTER (index_t ),
176
+ index_t ,
173
177
hints_t
174
178
]
175
179
176
180
lib .cuBool_Matrix_SetElement .restype = status_t
177
181
lib .cuBool_Matrix_SetElement .argtypes = [
178
182
matrix_p ,
179
- ctypes . c_uint ,
180
- ctypes . c_uint
183
+ index_t ,
184
+ index_t
181
185
]
182
186
183
187
lib .cuBool_Matrix_SetMarker .restype = status_t
@@ -190,15 +194,15 @@ def load_and_configure(cubool_lib_path: str):
190
194
lib .cuBool_Matrix_Marker .argtypes = [
191
195
matrix_p ,
192
196
ctypes .POINTER (ctypes .c_char ),
193
- ctypes .POINTER (ctypes . c_uint )
197
+ ctypes .POINTER (index_t )
194
198
]
195
199
196
200
lib .cuBool_Matrix_ExtractPairs .restype = status_t
197
201
lib .cuBool_Matrix_ExtractPairs .argtypes = [
198
202
matrix_p ,
199
- ctypes .POINTER (ctypes . c_uint ),
200
- ctypes .POINTER (ctypes . c_uint ),
201
- ctypes .POINTER (ctypes . c_uint )
203
+ ctypes .POINTER (index_t ),
204
+ ctypes .POINTER (index_t ),
205
+ ctypes .POINTER (index_t )
202
206
]
203
207
204
208
lib .cuBool_Matrix_ExtractSubMatrix .restype = status_t
@@ -212,6 +216,22 @@ def load_and_configure(cubool_lib_path: str):
212
216
hints_t
213
217
]
214
218
219
+ lib .cuBool_Matrix_ExtractRow .restype = status_t
220
+ lib .cuBool_Matrix_ExtractRow .argtypes = [
221
+ vector_p ,
222
+ matrix_p ,
223
+ index_t ,
224
+ hints_t
225
+ ]
226
+
227
+ lib .cuBool_Matrix_ExtractCol .restype = status_t
228
+ lib .cuBool_Matrix_ExtractCol .argtypes = [
229
+ vector_p ,
230
+ matrix_p ,
231
+ index_t ,
232
+ hints_t
233
+ ]
234
+
215
235
lib .cuBool_Matrix_Duplicate .restype = status_t
216
236
lib .cuBool_Matrix_Duplicate .argtypes = [
217
237
matrix_p ,
@@ -228,13 +248,13 @@ def load_and_configure(cubool_lib_path: str):
228
248
lib .cuBool_Matrix_Nrows .restype = status_t
229
249
lib .cuBool_Matrix_Nrows .argtype = [
230
250
matrix_p ,
231
- ctypes .POINTER (ctypes . c_uint )
251
+ ctypes .POINTER (index_t )
232
252
]
233
253
234
254
lib .cuBool_Matrix_Ncols .restype = status_t
235
255
lib .cuBool_Matrix_Ncols .argtype = [
236
256
matrix_p ,
237
- ctypes .POINTER (ctypes . c_uint )
257
+ ctypes .POINTER (index_t )
238
258
]
239
259
240
260
lib .cuBool_Matrix_Nvals .restype = status_t
@@ -243,6 +263,13 @@ def load_and_configure(cubool_lib_path: str):
243
263
ctypes .POINTER (ctypes .c_size_t )
244
264
]
245
265
266
+ lib .cuBool_Matrix_Reduce .restype = status_t
267
+ lib .cuBool_Matrix_Reduce .argtype = [
268
+ vector_p ,
269
+ matrix_p ,
270
+ hints_t
271
+ ]
272
+
246
273
lib .cuBool_Matrix_Reduce2 .restype = status_t
247
274
lib .cuBool_Matrix_Reduce2 .argtype = [
248
275
matrix_p ,
@@ -258,6 +285,93 @@ def load_and_configure(cubool_lib_path: str):
258
285
hints_t
259
286
]
260
287
288
+ lib .cuBool_Vector_New .restype = status_t
289
+ lib .cuBool_Vector_New .argtypes = [
290
+ p_to_vector_p ,
291
+ index_t
292
+ ]
293
+
294
+ lib .cuBool_Vector_Build .restype = status_t
295
+ lib .cuBool_Vector_Build .argtypes = [
296
+ vector_p ,
297
+ ctypes .POINTER (index_t ),
298
+ index_t ,
299
+ hints_t
300
+ ]
301
+
302
+ lib .cuBool_Vector_SetElement .restype = status_t
303
+ lib .cuBool_Vector_SetElement .argtypes = [
304
+ vector_p ,
305
+ index_t
306
+ ]
307
+
308
+ lib .cuBool_Vector_SetMarker .restype = status_t
309
+ lib .cuBool_Vector_SetMarker .argtypes = [
310
+ vector_p ,
311
+ ctypes .POINTER (ctypes .c_char )
312
+ ]
313
+
314
+ lib .cuBool_Vector_Marker .restype = status_t
315
+ lib .cuBool_Vector_Marker .argtypes = [
316
+ vector_p ,
317
+ ctypes .POINTER (ctypes .c_char ),
318
+ ctypes .POINTER (index_t )
319
+ ]
320
+
321
+ lib .cuBool_Vector_ExtractValues .restype = status_t
322
+ lib .cuBool_Vector_ExtractValues .argtypes = [
323
+ vector_p ,
324
+ ctypes .POINTER (index_t ),
325
+ ctypes .POINTER (index_t )
326
+ ]
327
+
328
+ lib .cuBool_Vector_ExtractSubVector .restype = status_t
329
+ lib .cuBool_Vector_ExtractSubVector .argtypes = [
330
+ vector_p ,
331
+ vector_p ,
332
+ index_t ,
333
+ index_t ,
334
+ hints_t
335
+ ]
336
+
337
+ lib .cuBool_Vector_Duplicate .restype = status_t
338
+ lib .cuBool_Vector_Duplicate .argtypes = [
339
+ vector_p ,
340
+ p_to_vector_p
341
+ ]
342
+
343
+ lib .cuBool_Vector_Nvals .restype = status_t
344
+ lib .cuBool_Vector_Nvals .argtypes = [
345
+ vector_p ,
346
+ ctypes .POINTER (index_t )
347
+ ]
348
+
349
+ lib .cuBool_Vector_Nrows .restype = status_t
350
+ lib .cuBool_Vector_Nrows .argtypes = [
351
+ vector_p ,
352
+ ctypes .POINTER (index_t )
353
+ ]
354
+
355
+ lib .cuBool_Vector_Free .restype = status_t
356
+ lib .cuBool_Vector_Free .argtypes = [
357
+ vector_p
358
+ ]
359
+
360
+ lib .cuBool_Vector_Reduce .restype = status_t
361
+ lib .cuBool_Vector_Reduce .argtypes = [
362
+ ctypes .POINTER (index_t ),
363
+ vector_p ,
364
+ hints_t
365
+ ]
366
+
367
+ lib .cuBool_Vector_EWiseAdd .restype = status_t
368
+ lib .cuBool_Vector_EWiseAdd .argtypes = [
369
+ vector_p ,
370
+ vector_p ,
371
+ vector_p ,
372
+ hints_t
373
+ ]
374
+
261
375
lib .cuBool_MxM .restype = status_t
262
376
lib .cuBool_MxM .argtypes = [
263
377
matrix_p ,
@@ -266,6 +380,22 @@ def load_and_configure(cubool_lib_path: str):
266
380
hints_t
267
381
]
268
382
383
+ lib .cuBool_MxV .restype = status_t
384
+ lib .cuBool_MxV .argtypes = [
385
+ vector_p ,
386
+ matrix_p ,
387
+ vector_p ,
388
+ hints_t
389
+ ]
390
+
391
+ lib .cuBool_VxM .restype = status_t
392
+ lib .cuBool_VxM .argtypes = [
393
+ vector_p ,
394
+ vector_p ,
395
+ matrix_p ,
396
+ hints_t
397
+ ]
398
+
269
399
lib .cuBool_Kronecker .restype = status_t
270
400
lib .cuBool_Kronecker .argtypes = [
271
401
matrix_p ,
0 commit comments