libsais_sys/libsais.rs
1/* automatically generated by rust-bindgen 0.72.0 and slightly edited */
2
3pub const LIBSAIS_VERSION_MAJOR: u32 = 2;
4pub const LIBSAIS_VERSION_MINOR: u32 = 10;
5pub const LIBSAIS_VERSION_PATCH: u32 = 3;
6pub const LIBSAIS_VERSION_STRING: &str = "2.10.3";
7
8unsafe extern "C" {
9 /// Creates the libsais context that allows reusing allocated memory with each libsais operation.In multi-threaded environments, use one context per thread for parallel executions.
10 ///
11 /// # Returns
12 ///
13 /// the libsais context, NULL otherwise.
14 pub fn libsais_create_ctx() -> *mut ::std::os::raw::c_void;
15
16 /// Creates the libsais context that allows reusing allocated memory with each parallel libsais operation using OpenMP.In multi-threaded environments, use one context per thread for parallel executions.
17 ///
18 /// # Arguments
19 ///
20 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
21 ///
22 /// # Returns
23 ///
24 /// the libsais context, NULL otherwise.
25 #[cfg(feature = "openmp")]
26 pub fn libsais_create_ctx_omp(threads: i32) -> *mut ::std::os::raw::c_void;
27
28 /// Destroys the libsass context and free previusly allocated memory.
29 ///
30 /// # Arguments
31 ///
32 /// * `ctx` - The libsais context (can be NULL).
33 pub fn libsais_free_ctx(ctx: *mut ::std::os::raw::c_void);
34
35 /// Constructs the suffix array of a given string.
36 ///
37 /// # Arguments
38 ///
39 /// * `T` - [0..n-1] The input string.
40 /// * `SA` - [0..n-1+fs] The output array of suffixes.
41 /// * `n` - The length of the given string.
42 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
43 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
44 ///
45 /// # Returns
46 ///
47 /// 0 if no error occurred, -1 or -2 otherwise.
48 pub fn libsais(T: *const u8, SA: *mut i32, n: i32, fs: i32, freq: *mut i32) -> i32;
49
50 /// Constructs the generalized suffix array (GSA) of given string set.
51 ///
52 /// # Arguments
53 ///
54 /// * `T` - [0..n-1] The input string set using 0 as separators (T[n-1] must be 0).
55 /// * `SA` - [0..n-1+fs] The output array of suffixes.
56 /// * `n` - The length of the given string set.
57 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
58 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
59 ///
60 /// # Returns
61 ///
62 /// 0 if no error occurred, -1 or -2 otherwise.
63 pub fn libsais_gsa(T: *const u8, SA: *mut i32, n: i32, fs: i32, freq: *mut i32) -> i32;
64
65 /// Constructs the suffix array of a given integer array.Note, during construction input array will be modified, but restored at the end if no errors occurred.
66 ///
67 /// # Arguments
68 ///
69 /// * `T` - [0..n-1] The input integer array.
70 /// * `SA` - [0..n-1+fs] The output array of suffixes.
71 /// * `n` - The length of the integer array.
72 /// * `k` - The alphabet size of the input integer array.
73 /// * `fs` - Extra space available at the end of SA array (can be 0, but 4k or better 6k is recommended for optimal performance).
74 ///
75 /// # Returns
76 ///
77 /// 0 if no error occurred, -1 or -2 otherwise.
78 pub fn libsais_int(T: *mut i32, SA: *mut i32, n: i32, k: i32, fs: i32) -> i32;
79
80 /// Constructs the suffix array of a given string using libsais context.
81 ///
82 /// # Arguments
83 ///
84 /// * `ctx` - The libsais context.
85 /// * `T` - [0..n-1] The input string.
86 /// * `SA` - [0..n-1+fs] The output array of suffixes.
87 /// * `n` - The length of the given string.
88 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
89 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
90 ///
91 /// # Returns
92 ///
93 /// 0 if no error occurred, -1 or -2 otherwise.
94 pub fn libsais_ctx(
95 ctx: *const ::std::os::raw::c_void,
96 T: *const u8,
97 SA: *mut i32,
98 n: i32,
99 fs: i32,
100 freq: *mut i32,
101 ) -> i32;
102
103 /// Constructs the generalized suffix array (GSA) of given string set using libsais context.
104 ///
105 /// # Arguments
106 ///
107 /// * `ctx` - The libsais context.
108 /// * `T` - [0..n-1] The input string set using 0 as separators (T[n-1] must be 0).
109 /// * `SA` - [0..n-1+fs] The output array of suffixes.
110 /// * `n` - The length of the given string set.
111 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
112 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
113 ///
114 /// # Returns
115 ///
116 /// 0 if no error occurred, -1 or -2 otherwise.
117 pub fn libsais_gsa_ctx(
118 ctx: *const ::std::os::raw::c_void,
119 T: *const u8,
120 SA: *mut i32,
121 n: i32,
122 fs: i32,
123 freq: *mut i32,
124 ) -> i32;
125
126 /// Constructs the suffix array of a given string in parallel using OpenMP.
127 ///
128 /// # Arguments
129 ///
130 /// * `T` - [0..n-1] The input string.
131 /// * `SA` - [0..n-1+fs] The output array of suffixes.
132 /// * `n` - The length of the given string.
133 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
134 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
135 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
136 ///
137 /// # Returns
138 ///
139 /// 0 if no error occurred, -1 or -2 otherwise.
140 #[cfg(feature = "openmp")]
141 pub fn libsais_omp(
142 T: *const u8,
143 SA: *mut i32,
144 n: i32,
145 fs: i32,
146 freq: *mut i32,
147 threads: i32,
148 ) -> i32;
149
150 /// Constructs the generalized suffix array (GSA) of given string set in parallel using OpenMP.
151 ///
152 /// # Arguments
153 ///
154 /// * `T` - [0..n-1] The input string set using 0 as separators (T[n-1] must be 0).
155 /// * `SA` - [0..n-1+fs] The output array of suffixes.
156 /// * `n` - The length of the given string set.
157 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
158 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
159 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
160 ///
161 /// # Returns
162 ///
163 /// 0 if no error occurred, -1 or -2 otherwise.
164 #[cfg(feature = "openmp")]
165 pub fn libsais_gsa_omp(
166 T: *const u8,
167 SA: *mut i32,
168 n: i32,
169 fs: i32,
170 freq: *mut i32,
171 threads: i32,
172 ) -> i32;
173
174 /// Constructs the suffix array of a given integer array in parallel using OpenMP.Note, during construction input array will be modified, but restored at the end if no errors occurred.
175 ///
176 /// # Arguments
177 ///
178 /// * `T` - [0..n-1] The input integer array.
179 /// * `SA` - [0..n-1+fs] The output array of suffixes.
180 /// * `n` - The length of the integer array.
181 /// * `k` - The alphabet size of the input integer array.
182 /// * `fs` - Extra space available at the end of SA array (can be 0, but 4k or better 6k is recommended for optimal performance).
183 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
184 ///
185 /// # Returns
186 ///
187 /// 0 if no error occurred, -1 or -2 otherwise.
188 #[cfg(feature = "openmp")]
189 pub fn libsais_int_omp(T: *mut i32, SA: *mut i32, n: i32, k: i32, fs: i32, threads: i32)
190 -> i32;
191
192 /// Constructs the burrows-wheeler transformed string (BWT) of a given string.
193 ///
194 /// # Arguments
195 ///
196 /// * `T` - [0..n-1] The input string.
197 /// * `U` - [0..n-1] The output string (can be T).
198 /// * `A` - [0..n-1+fs] The temporary array.
199 /// * `n` - The length of the given string.
200 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
201 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
202 ///
203 /// # Returns
204 ///
205 /// The primary index if no error occurred, -1 or -2 otherwise.
206 pub fn libsais_bwt(
207 T: *const u8,
208 U: *mut u8,
209 A: *mut i32,
210 n: i32,
211 fs: i32,
212 freq: *mut i32,
213 ) -> i32;
214
215 /// Constructs the burrows-wheeler transformed string (BWT) of a given string with auxiliary indexes.
216 ///
217 /// # Arguments
218 ///
219 /// * `T` - [0..n-1] The input string.
220 /// * `U` - [0..n-1] The output string (can be T).
221 /// * `A` - [0..n-1+fs] The temporary array.
222 /// * `n` - The length of the given string.
223 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
224 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
225 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
226 /// * `I` - [0..(n-1)/r] The output auxiliary indexes.
227 ///
228 /// # Returns
229 ///
230 /// 0 if no error occurred, -1 or -2 otherwise.
231 pub fn libsais_bwt_aux(
232 T: *const u8,
233 U: *mut u8,
234 A: *mut i32,
235 n: i32,
236 fs: i32,
237 freq: *mut i32,
238 r: i32,
239 I: *mut i32,
240 ) -> i32;
241
242 /// Constructs the burrows-wheeler transformed string (BWT) of a given string using libsais context.
243 ///
244 /// # Arguments
245 ///
246 /// * `ctx` - The libsais context.
247 /// * `T` - [0..n-1] The input string.
248 /// * `U` - [0..n-1] The output string (can be T).
249 /// * `A` - [0..n-1+fs] The temporary array.
250 /// * `n` - The length of the given string.
251 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
252 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
253 ///
254 /// # Returns
255 ///
256 /// The primary index if no error occurred, -1 or -2 otherwise.
257 pub fn libsais_bwt_ctx(
258 ctx: *const ::std::os::raw::c_void,
259 T: *const u8,
260 U: *mut u8,
261 A: *mut i32,
262 n: i32,
263 fs: i32,
264 freq: *mut i32,
265 ) -> i32;
266
267 /// Constructs the burrows-wheeler transformed string (BWT) of a given string with auxiliary indexes using libsais context.
268 ///
269 /// # Arguments
270 ///
271 /// * `ctx` - The libsais context.
272 /// * `T` - [0..n-1] The input string.
273 /// * `U` - [0..n-1] The output string (can be T).
274 /// * `A` - [0..n-1+fs] The temporary array.
275 /// * `n` - The length of the given string.
276 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
277 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
278 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
279 /// * `I` - [0..(n-1)/r] The output auxiliary indexes.
280 ///
281 /// # Returns
282 ///
283 /// 0 if no error occurred, -1 or -2 otherwise.
284 pub fn libsais_bwt_aux_ctx(
285 ctx: *const ::std::os::raw::c_void,
286 T: *const u8,
287 U: *mut u8,
288 A: *mut i32,
289 n: i32,
290 fs: i32,
291 freq: *mut i32,
292 r: i32,
293 I: *mut i32,
294 ) -> i32;
295
296 /// Constructs the burrows-wheeler transformed string (BWT) of a given string in parallel using OpenMP.
297 ///
298 /// # Arguments
299 ///
300 /// * `T` - [0..n-1] The input string.
301 /// * `U` - [0..n-1] The output string (can be T).
302 /// * `A` - [0..n-1+fs] The temporary array.
303 /// * `n` - The length of the given string.
304 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
305 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
306 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
307 ///
308 /// # Returns
309 ///
310 /// The primary index if no error occurred, -1 or -2 otherwise.
311 #[cfg(feature = "openmp")]
312 pub fn libsais_bwt_omp(
313 T: *const u8,
314 U: *mut u8,
315 A: *mut i32,
316 n: i32,
317 fs: i32,
318 freq: *mut i32,
319 threads: i32,
320 ) -> i32;
321
322 /// Constructs the burrows-wheeler transformed string (BWT) of a given string with auxiliary indexes in parallel using OpenMP.
323 ///
324 /// # Arguments
325 ///
326 /// * `T` - [0..n-1] The input string.
327 /// * `U` - [0..n-1] The output string (can be T).
328 /// * `A` - [0..n-1+fs] The temporary array.
329 /// * `n` - The length of the given string.
330 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
331 /// * `freq` - [0..255] The output symbol frequency table (can be NULL).
332 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
333 /// * `I` - [0..(n-1)/r] The output auxiliary indexes.
334 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
335 ///
336 /// # Returns
337 ///
338 /// 0 if no error occurred, -1 or -2 otherwise.
339 #[cfg(feature = "openmp")]
340 pub fn libsais_bwt_aux_omp(
341 T: *const u8,
342 U: *mut u8,
343 A: *mut i32,
344 n: i32,
345 fs: i32,
346 freq: *mut i32,
347 r: i32,
348 I: *mut i32,
349 threads: i32,
350 ) -> i32;
351
352 /// Creates the libsais reverse BWT context that allows reusing allocated memory with each libsais_unbwt_* operation.In multi-threaded environments, use one context per thread for parallel executions.
353 ///
354 /// # Returns
355 ///
356 /// the libsais context, NULL otherwise.
357 pub fn libsais_unbwt_create_ctx() -> *mut ::std::os::raw::c_void;
358
359 /// Creates the libsais reverse BWT context that allows reusing allocated memory with each parallel libsais_unbwt_* operation using OpenMP.In multi-threaded environments, use one context per thread for parallel executions.
360 ///
361 /// # Arguments
362 ///
363 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
364 ///
365 /// # Returns
366 ///
367 /// the libsais context, NULL otherwise.
368 #[cfg(feature = "openmp")]
369 pub fn libsais_unbwt_create_ctx_omp(threads: i32) -> *mut ::std::os::raw::c_void;
370
371 /// Destroys the libsass reverse BWT context and free previusly allocated memory.
372 ///
373 /// # Arguments
374 ///
375 /// * `ctx` - The libsais context (can be NULL).
376 pub fn libsais_unbwt_free_ctx(ctx: *mut ::std::os::raw::c_void);
377
378 /// Constructs the original string from a given burrows-wheeler transformed string (BWT) with primary index.
379 ///
380 /// # Arguments
381 ///
382 /// * `T` - [0..n-1] The input string.
383 /// * `U` - [0..n-1] The output string (can be T).
384 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
385 /// * `n` - The length of the given string.
386 /// * `freq` - [0..255] The input symbol frequency table (can be NULL).
387 /// * `i` - The primary index.
388 ///
389 /// # Returns
390 ///
391 /// 0 if no error occurred, -1 or -2 otherwise.
392 pub fn libsais_unbwt(
393 T: *const u8,
394 U: *mut u8,
395 A: *mut i32,
396 n: i32,
397 freq: *const i32,
398 i: i32,
399 ) -> i32;
400
401 /// Constructs the original string from a given burrows-wheeler transformed string (BWT) with primary index using libsais reverse BWT context.
402 ///
403 /// # Arguments
404 ///
405 /// * `ctx` - The libsais reverse BWT context.
406 /// * `T` - [0..n-1] The input string.
407 /// * `U` - [0..n-1] The output string (can be T).
408 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
409 /// * `n` - The length of the given string.
410 /// * `freq` - [0..255] The input symbol frequency table (can be NULL).
411 /// * `i` - The primary index.
412 ///
413 /// # Returns
414 ///
415 /// 0 if no error occurred, -1 or -2 otherwise.
416 pub fn libsais_unbwt_ctx(
417 ctx: *const ::std::os::raw::c_void,
418 T: *const u8,
419 U: *mut u8,
420 A: *mut i32,
421 n: i32,
422 freq: *const i32,
423 i: i32,
424 ) -> i32;
425
426 /// Constructs the original string from a given burrows-wheeler transformed string (BWT) with auxiliary indexes.
427 ///
428 /// # Arguments
429 ///
430 /// * `T` - [0..n-1] The input string.
431 /// * `U` - [0..n-1] The output string (can be T).
432 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
433 /// * `n` - The length of the given string.
434 /// * `freq` - [0..255] The input symbol frequency table (can be NULL).
435 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
436 /// * `I` - [0..(n-1)/r] The input auxiliary indexes.
437 ///
438 /// # Returns
439 ///
440 /// 0 if no error occurred, -1 or -2 otherwise.
441 pub fn libsais_unbwt_aux(
442 T: *const u8,
443 U: *mut u8,
444 A: *mut i32,
445 n: i32,
446 freq: *const i32,
447 r: i32,
448 I: *const i32,
449 ) -> i32;
450
451 /// Constructs the original string from a given burrows-wheeler transformed string (BWT) with auxiliary indexes using libsais reverse BWT context.
452 ///
453 /// # Arguments
454 ///
455 /// * `ctx` - The libsais reverse BWT context.
456 /// * `T` - [0..n-1] The input string.
457 /// * `U` - [0..n-1] The output string (can be T).
458 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
459 /// * `n` - The length of the given string.
460 /// * `freq` - [0..255] The input symbol frequency table (can be NULL).
461 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
462 /// * `I` - [0..(n-1)/r] The input auxiliary indexes.
463 ///
464 /// # Returns
465 ///
466 /// 0 if no error occurred, -1 or -2 otherwise.
467 pub fn libsais_unbwt_aux_ctx(
468 ctx: *const ::std::os::raw::c_void,
469 T: *const u8,
470 U: *mut u8,
471 A: *mut i32,
472 n: i32,
473 freq: *const i32,
474 r: i32,
475 I: *const i32,
476 ) -> i32;
477
478 /// Constructs the original string from a given burrows-wheeler transformed string (BWT) with primary index in parallel using OpenMP.
479 ///
480 /// # Arguments
481 ///
482 /// * `T` - [0..n-1] The input string.
483 /// * `U` - [0..n-1] The output string (can be T).
484 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
485 /// * `n` - The length of the given string.
486 /// * `freq` - [0..255] The input symbol frequency table (can be NULL).
487 /// * `i` - The primary index.
488 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
489 ///
490 /// # Returns
491 ///
492 /// 0 if no error occurred, -1 or -2 otherwise.
493 #[cfg(feature = "openmp")]
494 pub fn libsais_unbwt_omp(
495 T: *const u8,
496 U: *mut u8,
497 A: *mut i32,
498 n: i32,
499 freq: *const i32,
500 i: i32,
501 threads: i32,
502 ) -> i32;
503
504 /// Constructs the original string from a given burrows-wheeler transformed string (BWT) with auxiliary indexes in parallel using OpenMP.
505 ///
506 /// # Arguments
507 ///
508 /// * `T` - [0..n-1] The input string.
509 /// * `U` - [0..n-1] The output string (can be T).
510 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
511 /// * `n` - The length of the given string.
512 /// * `freq` - [0..255] The input symbol frequency table (can be NULL).
513 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
514 /// * `I` - [0..(n-1)/r] The input auxiliary indexes.
515 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
516 ///
517 /// # Returns
518 ///
519 /// 0 if no error occurred, -1 or -2 otherwise.
520 #[cfg(feature = "openmp")]
521 pub fn libsais_unbwt_aux_omp(
522 T: *const u8,
523 U: *mut u8,
524 A: *mut i32,
525 n: i32,
526 freq: *const i32,
527 r: i32,
528 I: *const i32,
529 threads: i32,
530 ) -> i32;
531
532 /// Constructs the permuted longest common prefix array (PLCP) of a given string and a suffix array.
533 ///
534 /// # Arguments
535 ///
536 /// * `T` - [0..n-1] The input string.
537 /// * `SA` - [0..n-1] The input suffix array.
538 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
539 /// * `n` - The length of the string and the suffix array.
540 ///
541 /// # Returns
542 ///
543 /// 0 if no error occurred, -1 otherwise.
544 pub fn libsais_plcp(T: *const u8, SA: *const i32, PLCP: *mut i32, n: i32) -> i32;
545
546 /// Constructs the permuted longest common prefix array (PLCP) of a given string set and a generalized suffix array (GSA).
547 ///
548 /// # Arguments
549 ///
550 /// * `T` - [0..n-1] The input string set using 0 as separators (T[n-1] must be 0).
551 /// * `SA` - [0..n-1] The input generalized suffix array.
552 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
553 /// * `n` - The length of the string set and the generalized suffix array.
554 ///
555 /// # Returns
556 ///
557 /// 0 if no error occurred, -1 otherwise.
558 pub fn libsais_plcp_gsa(T: *const u8, SA: *const i32, PLCP: *mut i32, n: i32) -> i32;
559
560 /// Constructs the permuted longest common prefix array (PLCP) of a integer array and a suffix array.
561 ///
562 /// # Arguments
563 ///
564 /// * `T` - [0..n-1] The input integer array.
565 /// * `SA` - [0..n-1] The input suffix array.
566 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
567 /// * `n` - The length of the integer array and the suffix array.
568 ///
569 /// # Returns
570 ///
571 /// 0 if no error occurred, -1 otherwise.
572 pub fn libsais_plcp_int(T: *const i32, SA: *const i32, PLCP: *mut i32, n: i32) -> i32;
573
574 /// Constructs the longest common prefix array (LCP) of a given permuted longest common prefix array (PLCP) and a suffix array.
575 ///
576 /// # Arguments
577 ///
578 /// * `PLCP` - [0..n-1] The input permuted longest common prefix array.
579 /// * `SA` - [0..n-1] The input suffix array or generalized suffix array (GSA).
580 /// * `LCP` - [0..n-1] The output longest common prefix array (can be SA).
581 /// * `n` - The length of the permuted longest common prefix array and the suffix array.
582 ///
583 /// # Returns
584 ///
585 /// 0 if no error occurred, -1 otherwise.
586 pub fn libsais_lcp(PLCP: *const i32, SA: *const i32, LCP: *mut i32, n: i32) -> i32;
587
588 /// Constructs the permuted longest common prefix array (PLCP) of a given string and a suffix array in parallel using OpenMP.
589 ///
590 /// # Arguments
591 ///
592 /// * `T` - [0..n-1] The input string.
593 /// * `SA` - [0..n-1] The input suffix array.
594 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
595 /// * `n` - The length of the string and the suffix array.
596 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
597 ///
598 /// # Returns
599 ///
600 /// 0 if no error occurred, -1 otherwise.
601 #[cfg(feature = "openmp")]
602 pub fn libsais_plcp_omp(
603 T: *const u8,
604 SA: *const i32,
605 PLCP: *mut i32,
606 n: i32,
607 threads: i32,
608 ) -> i32;
609
610 /// Constructs the permuted longest common prefix array (PLCP) of a given string set and a generalized suffix array (GSA) in parallel using OpenMP.
611 ///
612 /// # Arguments
613 ///
614 /// * `T` - [0..n-1] The input string set using 0 as separators (T[n-1] must be 0).
615 /// * `SA` - [0..n-1] The input generalized suffix array.
616 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
617 /// * `n` - The length of the string set and the generalized suffix array.
618 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
619 ///
620 /// # Returns
621 ///
622 /// 0 if no error occurred, -1 otherwise.
623 #[cfg(feature = "openmp")]
624 pub fn libsais_plcp_gsa_omp(
625 T: *const u8,
626 SA: *const i32,
627 PLCP: *mut i32,
628 n: i32,
629 threads: i32,
630 ) -> i32;
631
632 /// Constructs the permuted longest common prefix array (PLCP) of a given integer array and a suffix array in parallel using OpenMP.
633 ///
634 /// # Arguments
635 ///
636 /// * `T` - [0..n-1] The input integer array.
637 /// * `SA` - [0..n-1] The input suffix array.
638 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
639 /// * `n` - The length of the integer array and the suffix array.
640 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
641 ///
642 /// # Returns
643 ///
644 /// 0 if no error occurred, -1 otherwise.
645 #[cfg(feature = "openmp")]
646 pub fn libsais_plcp_int_omp(
647 T: *const i32,
648 SA: *const i32,
649 PLCP: *mut i32,
650 n: i32,
651 threads: i32,
652 ) -> i32;
653
654 /// Constructs the longest common prefix array (LCP) of a given permuted longest common prefix array (PLCP) and a suffix array in parallel using OpenMP.
655 ///
656 /// # Arguments
657 ///
658 /// * `PLCP` - [0..n-1] The input permuted longest common prefix array.
659 /// * `SA` - [0..n-1] The input suffix array or generalized suffix array (GSA).
660 /// * `LCP` - [0..n-1] The output longest common prefix array (can be SA).
661 /// * `n` - The length of the permuted longest common prefix array and the suffix array.
662 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
663 ///
664 /// # Returns
665 ///
666 /// 0 if no error occurred, -1 otherwise.
667 #[cfg(feature = "openmp")]
668 pub fn libsais_lcp_omp(
669 PLCP: *const i32,
670 SA: *const i32,
671 LCP: *mut i32,
672 n: i32,
673 threads: i32,
674 ) -> i32;
675}