libsais_sys/libsais16.rs
1/* automatically generated by rust-bindgen 0.72.0 and slightly edited */
2
3pub const LIBSAIS16_VERSION_MAJOR: u32 = 2;
4pub const LIBSAIS16_VERSION_MINOR: u32 = 10;
5pub const LIBSAIS16_VERSION_PATCH: u32 = 3;
6pub const LIBSAIS16_VERSION_STRING: &str = "2.10.3";
7
8unsafe extern "C" {
9 /// Creates the libsais16 context that allows reusing allocated memory with each libsais16 operation.In multi-threaded environments, use one context per thread for parallel executions.
10 ///
11 /// # Returns
12 ///
13 /// the libsais16 context, NULL otherwise.
14 pub fn libsais16_create_ctx() -> *mut ::std::os::raw::c_void;
15
16 /// Creates the libsais16 context that allows reusing allocated memory with each parallel libsais16 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 libsais16 context, NULL otherwise.
25 #[cfg(feature = "openmp")]
26 pub fn libsais16_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 libsais16 context (can be NULL).
33 pub fn libsais16_free_ctx(ctx: *mut ::std::os::raw::c_void);
34
35 /// Constructs the suffix array of a given 16-bit string.
36 ///
37 /// # Arguments
38 ///
39 /// * `T` - [0..n-1] The input 16-bit string.
40 /// * `SA` - [0..n-1+fs] The output array of suffixes.
41 /// * `n` - The length of the given 16-bit string.
42 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
43 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
44 ///
45 /// # Returns
46 ///
47 /// 0 if no error occurred, -1 or -2 otherwise.
48 pub fn libsais16(T: *const u16, SA: *mut i32, n: i32, fs: i32, freq: *mut i32) -> i32;
49
50 /// Constructs the generalized suffix array (GSA) of given 16-bit string set.
51 ///
52 /// # Arguments
53 ///
54 /// * `T` - [0..n-1] The input 16-bit 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 16-bit string set.
57 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
58 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
59 ///
60 /// # Returns
61 ///
62 /// 0 if no error occurred, -1 or -2 otherwise.
63 pub fn libsais16_gsa(T: *const u16, 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 libsais16_int(T: *mut i32, SA: *mut i32, n: i32, k: i32, fs: i32) -> i32;
79
80 /// Constructs the suffix array of a given 16-bit string using libsais16 context.
81 ///
82 /// # Arguments
83 ///
84 /// * `ctx` - The libsais16 context.
85 /// * `T` - [0..n-1] The input 16-bit string.
86 /// * `SA` - [0..n-1+fs] The output array of suffixes.
87 /// * `n` - The length of the given 16-bit string.
88 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
89 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
90 ///
91 /// # Returns
92 ///
93 /// 0 if no error occurred, -1 or -2 otherwise.
94 pub fn libsais16_ctx(
95 ctx: *const ::std::os::raw::c_void,
96 T: *const u16,
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 16-bit string set using libsais16 context.
104 ///
105 /// # Arguments
106 ///
107 /// * `ctx` - The libsais16 context.
108 /// * `T` - [0..n-1] The input 16-bit 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 16-bit string set.
111 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
112 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
113 ///
114 /// # Returns
115 ///
116 /// 0 if no error occurred, -1 or -2 otherwise.
117 pub fn libsais16_gsa_ctx(
118 ctx: *const ::std::os::raw::c_void,
119 T: *const u16,
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 16-bit string in parallel using OpenMP.
127 ///
128 /// # Arguments
129 ///
130 /// * `T` - [0..n-1] The input 16-bit string.
131 /// * `SA` - [0..n-1+fs] The output array of suffixes.
132 /// * `n` - The length of the given 16-bit string.
133 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
134 /// * `freq` - [0..65535] The output 16-bit 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 libsais16_omp(
142 T: *const u16,
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 16-bit string set in parallel using OpenMP.
151 ///
152 /// # Arguments
153 ///
154 /// * `T` - [0..n-1] The input 16-bit 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 16-bit string set.
157 /// * `fs` - The extra space available at the end of SA array (0 should be enough for most cases).
158 /// * `freq` - [0..65535] The output 16-bit 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 libsais16_gsa_omp(
166 T: *const u16,
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 libsais16_int_omp(
190 T: *mut i32,
191 SA: *mut i32,
192 n: i32,
193 k: i32,
194 fs: i32,
195 threads: i32,
196 ) -> i32;
197
198 /// Constructs the burrows-wheeler transformed 16-bit string (BWT) of a given 16-bit string.
199 ///
200 /// # Arguments
201 ///
202 /// * `T` - [0..n-1] The input 16-bit string.
203 /// * `U` - [0..n-1] The output 16-bit string (can be T).
204 /// * `A` - [0..n-1+fs] The temporary array.
205 /// * `n` - The length of the given 16-bit string.
206 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
207 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
208 ///
209 /// # Returns
210 ///
211 /// The primary index if no error occurred, -1 or -2 otherwise.
212 pub fn libsais16_bwt(
213 T: *const u16,
214 U: *mut u16,
215 A: *mut i32,
216 n: i32,
217 fs: i32,
218 freq: *mut i32,
219 ) -> i32;
220
221 /// Constructs the burrows-wheeler transformed 16-bit string (BWT) of a given 16-bit string with auxiliary indexes.
222 ///
223 /// # Arguments
224 ///
225 /// * `T` - [0..n-1] The input 16-bit string.
226 /// * `U` - [0..n-1] The output 16-bit string (can be T).
227 /// * `A` - [0..n-1+fs] The temporary array.
228 /// * `n` - The length of the given 16-bit string.
229 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
230 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
231 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
232 /// * `I` - [0..(n-1)/r] The output auxiliary indexes.
233 ///
234 /// # Returns
235 ///
236 /// 0 if no error occurred, -1 or -2 otherwise.
237 pub fn libsais16_bwt_aux(
238 T: *const u16,
239 U: *mut u16,
240 A: *mut i32,
241 n: i32,
242 fs: i32,
243 freq: *mut i32,
244 r: i32,
245 I: *mut i32,
246 ) -> i32;
247
248 /// Constructs the burrows-wheeler transformed 16-bit string (BWT) of a given 16-bit string using libsais16 context.
249 ///
250 /// # Arguments
251 ///
252 /// * `ctx` - The libsais16 context.
253 /// * `T` - [0..n-1] The input 16-bit string.
254 /// * `U` - [0..n-1] The output 16-bit string (can be T).
255 /// * `A` - [0..n-1+fs] The temporary array.
256 /// * `n` - The length of the given 16-bit string.
257 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
258 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
259 ///
260 /// # Returns
261 ///
262 /// The primary index if no error occurred, -1 or -2 otherwise.
263 pub fn libsais16_bwt_ctx(
264 ctx: *const ::std::os::raw::c_void,
265 T: *const u16,
266 U: *mut u16,
267 A: *mut i32,
268 n: i32,
269 fs: i32,
270 freq: *mut i32,
271 ) -> i32;
272
273 /// Constructs the burrows-wheeler transformed 16-bit string (BWT) of a given 16-bit string with auxiliary indexes using libsais16 context.
274 ///
275 /// # Arguments
276 ///
277 /// * `ctx` - The libsais16 context.
278 /// * `T` - [0..n-1] The input 16-bit string.
279 /// * `U` - [0..n-1] The output 16-bit string (can be T).
280 /// * `A` - [0..n-1+fs] The temporary array.
281 /// * `n` - The length of the given 16-bit string.
282 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
283 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
284 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
285 /// * `I` - [0..(n-1)/r] The output auxiliary indexes.
286 ///
287 /// # Returns
288 ///
289 /// 0 if no error occurred, -1 or -2 otherwise.
290 pub fn libsais16_bwt_aux_ctx(
291 ctx: *const ::std::os::raw::c_void,
292 T: *const u16,
293 U: *mut u16,
294 A: *mut i32,
295 n: i32,
296 fs: i32,
297 freq: *mut i32,
298 r: i32,
299 I: *mut i32,
300 ) -> i32;
301
302 /// Constructs the burrows-wheeler transformed 16-bit string (BWT) of a given 16-bit string in parallel using OpenMP.
303 ///
304 /// # Arguments
305 ///
306 /// * `T` - [0..n-1] The input 16-bit string.
307 /// * `U` - [0..n-1] The output 16-bit string (can be T).
308 /// * `A` - [0..n-1+fs] The temporary array.
309 /// * `n` - The length of the given 16-bit string.
310 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
311 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
312 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
313 ///
314 /// # Returns
315 ///
316 /// The primary index if no error occurred, -1 or -2 otherwise.
317 #[cfg(feature = "openmp")]
318 pub fn libsais16_bwt_omp(
319 T: *const u16,
320 U: *mut u16,
321 A: *mut i32,
322 n: i32,
323 fs: i32,
324 freq: *mut i32,
325 threads: i32,
326 ) -> i32;
327
328 /// Constructs the burrows-wheeler transformed 16-bit string (BWT) of a given 16-bit string with auxiliary indexes in parallel using OpenMP.
329 ///
330 /// # Arguments
331 ///
332 /// * `T` - [0..n-1] The input 16-bit string.
333 /// * `U` - [0..n-1] The output 16-bit string (can be T).
334 /// * `A` - [0..n-1+fs] The temporary array.
335 /// * `n` - The length of the given 16-bit string.
336 /// * `fs` - The extra space available at the end of A array (0 should be enough for most cases).
337 /// * `freq` - [0..65535] The output 16-bit symbol frequency table (can be NULL).
338 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
339 /// * `I` - [0..(n-1)/r] The output auxiliary indexes.
340 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
341 ///
342 /// # Returns
343 ///
344 /// 0 if no error occurred, -1 or -2 otherwise.
345 #[cfg(feature = "openmp")]
346 pub fn libsais16_bwt_aux_omp(
347 T: *const u16,
348 U: *mut u16,
349 A: *mut i32,
350 n: i32,
351 fs: i32,
352 freq: *mut i32,
353 r: i32,
354 I: *mut i32,
355 threads: i32,
356 ) -> i32;
357
358 /// Creates the libsais16 reverse BWT context that allows reusing allocated memory with each libsais16_unbwt_* operation.In multi-threaded environments, use one context per thread for parallel executions.
359 ///
360 /// # Returns
361 ///
362 /// the libsais16 context, NULL otherwise.
363 pub fn libsais16_unbwt_create_ctx() -> *mut ::std::os::raw::c_void;
364
365 /// Creates the libsais16 reverse BWT context that allows reusing allocated memory with each parallel libsais16_unbwt_* operation using OpenMP.In multi-threaded environments, use one context per thread for parallel executions.
366 ///
367 /// # Arguments
368 ///
369 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
370 ///
371 /// # Returns
372 ///
373 /// the libsais16 context, NULL otherwise.
374 #[cfg(feature = "openmp")]
375 pub fn libsais16_unbwt_create_ctx_omp(threads: i32) -> *mut ::std::os::raw::c_void;
376
377 /// Destroys the libsass reverse BWT context and free previusly allocated memory.
378 ///
379 /// # Arguments
380 ///
381 /// * `ctx` - The libsais16 context (can be NULL).
382 pub fn libsais16_unbwt_free_ctx(ctx: *mut ::std::os::raw::c_void);
383
384 /// Constructs the original 16-bit string from a given burrows-wheeler transformed 16-bit string (BWT) with primary index.
385 ///
386 /// # Arguments
387 ///
388 /// * `T` - [0..n-1] The input 16-bit string.
389 /// * `U` - [0..n-1] The output 16-bit string (can be T).
390 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
391 /// * `n` - The length of the given 16-bit string.
392 /// * `freq` - [0..65535] The input 16-bit symbol frequency table (can be NULL).
393 /// * `i` - The primary index.
394 ///
395 /// # Returns
396 ///
397 /// 0 if no error occurred, -1 or -2 otherwise.
398 pub fn libsais16_unbwt(
399 T: *const u16,
400 U: *mut u16,
401 A: *mut i32,
402 n: i32,
403 freq: *const i32,
404 i: i32,
405 ) -> i32;
406
407 /// Constructs the original 16-bit string from a given burrows-wheeler transformed 16-bit string (BWT) with primary index using libsais16 reverse BWT context.
408 ///
409 /// # Arguments
410 ///
411 /// * `ctx` - The libsais16 reverse BWT context.
412 /// * `T` - [0..n-1] The input 16-bit string.
413 /// * `U` - [0..n-1] The output 16-bit string (can be T).
414 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
415 /// * `n` - The length of the given 16-bit string.
416 /// * `freq` - [0..65535] The input 16-bit symbol frequency table (can be NULL).
417 /// * `i` - The primary index.
418 ///
419 /// # Returns
420 ///
421 /// 0 if no error occurred, -1 or -2 otherwise.
422 pub fn libsais16_unbwt_ctx(
423 ctx: *const ::std::os::raw::c_void,
424 T: *const u16,
425 U: *mut u16,
426 A: *mut i32,
427 n: i32,
428 freq: *const i32,
429 i: i32,
430 ) -> i32;
431
432 /// Constructs the original 16-bit string from a given burrows-wheeler transformed 16-bit string (BWT) with auxiliary indexes.
433 ///
434 /// # Arguments
435 ///
436 /// * `T` - [0..n-1] The input 16-bit string.
437 /// * `U` - [0..n-1] The output 16-bit string (can be T).
438 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
439 /// * `n` - The length of the given 16-bit string.
440 /// * `freq` - [0..65535] The input 16-bit symbol frequency table (can be NULL).
441 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
442 /// * `I` - [0..(n-1)/r] The input auxiliary indexes.
443 ///
444 /// # Returns
445 ///
446 /// 0 if no error occurred, -1 or -2 otherwise.
447 pub fn libsais16_unbwt_aux(
448 T: *const u16,
449 U: *mut u16,
450 A: *mut i32,
451 n: i32,
452 freq: *const i32,
453 r: i32,
454 I: *const i32,
455 ) -> i32;
456
457 /// Constructs the original 16-bit string from a given burrows-wheeler transformed 16-bit string (BWT) with auxiliary indexes using libsais16 reverse BWT context.
458 ///
459 /// # Arguments
460 ///
461 /// * `ctx` - The libsais16 reverse BWT context.
462 /// * `T` - [0..n-1] The input 16-bit string.
463 /// * `U` - [0..n-1] The output 16-bit string (can be T).
464 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
465 /// * `n` - The length of the given 16-bit string.
466 /// * `freq` - [0..65535] The input 16-bit symbol frequency table (can be NULL).
467 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
468 /// * `I` - [0..(n-1)/r] The input auxiliary indexes.
469 ///
470 /// # Returns
471 ///
472 /// 0 if no error occurred, -1 or -2 otherwise.
473 pub fn libsais16_unbwt_aux_ctx(
474 ctx: *const ::std::os::raw::c_void,
475 T: *const u16,
476 U: *mut u16,
477 A: *mut i32,
478 n: i32,
479 freq: *const i32,
480 r: i32,
481 I: *const i32,
482 ) -> i32;
483
484 /// Constructs the original 16-bit string from a given burrows-wheeler transformed 16-bit string (BWT) with primary index in parallel using OpenMP.
485 ///
486 /// # Arguments
487 ///
488 /// * `T` - [0..n-1] The input 16-bit string.
489 /// * `U` - [0..n-1] The output 16-bit string (can be T).
490 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
491 /// * `n` - The length of the given 16-bit string.
492 /// * `freq` - [0..65535] The input 16-bit symbol frequency table (can be NULL).
493 /// * `i` - The primary index.
494 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
495 ///
496 /// # Returns
497 ///
498 /// 0 if no error occurred, -1 or -2 otherwise.
499 #[cfg(feature = "openmp")]
500 pub fn libsais16_unbwt_omp(
501 T: *const u16,
502 U: *mut u16,
503 A: *mut i32,
504 n: i32,
505 freq: *const i32,
506 i: i32,
507 threads: i32,
508 ) -> i32;
509
510 /// Constructs the original 16-bit string from a given burrows-wheeler transformed 16-bit string (BWT) with auxiliary indexes in parallel using OpenMP.
511 ///
512 /// # Arguments
513 ///
514 /// * `T` - [0..n-1] The input 16-bit string.
515 /// * `U` - [0..n-1] The output 16-bit string (can be T).
516 /// * `A` - [0..n] The temporary array (NOTE, temporary array must be n + 1 size).
517 /// * `n` - The length of the given 16-bit string.
518 /// * `freq` - [0..65535] The input 16-bit symbol frequency table (can be NULL).
519 /// * `r` - The sampling rate for auxiliary indexes (must be power of 2).
520 /// * `I` - [0..(n-1)/r] The input auxiliary indexes.
521 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
522 ///
523 /// # Returns
524 ///
525 /// 0 if no error occurred, -1 or -2 otherwise.
526 #[cfg(feature = "openmp")]
527 pub fn libsais16_unbwt_aux_omp(
528 T: *const u16,
529 U: *mut u16,
530 A: *mut i32,
531 n: i32,
532 freq: *const i32,
533 r: i32,
534 I: *const i32,
535 threads: i32,
536 ) -> i32;
537
538 /// Constructs the permuted longest common prefix array (PLCP) of a given 16-bit string and a suffix array.
539 ///
540 /// # Arguments
541 ///
542 /// * `T` - [0..n-1] The input 16-bit string.
543 /// * `SA` - [0..n-1] The input suffix array.
544 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
545 /// * `n` - The length of the 16-bit string and the suffix array.
546 ///
547 /// # Returns
548 ///
549 /// 0 if no error occurred, -1 otherwise.
550 pub fn libsais16_plcp(T: *const u16, SA: *const i32, PLCP: *mut i32, n: i32) -> i32;
551
552 /// Constructs the permuted longest common prefix array (PLCP) of a given 16-bit string set and a generalized suffix array (GSA).
553 ///
554 /// # Arguments
555 ///
556 /// * `T` - [0..n-1] The input 16-bit string set using 0 as separators (T[n-1] must be 0).
557 /// * `SA` - [0..n-1] The input generalized suffix array.
558 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
559 /// * `n` - The length of the string set and the generalized suffix array.
560 ///
561 /// # Returns
562 ///
563 /// 0 if no error occurred, -1 otherwise.
564 pub fn libsais16_plcp_gsa(T: *const u16, SA: *const i32, PLCP: *mut i32, n: i32) -> i32;
565
566 /// Constructs the longest common prefix array (LCP) of a given permuted longest common prefix array (PLCP) and a suffix array.
567 ///
568 /// # Arguments
569 ///
570 /// * `PLCP` - [0..n-1] The input permuted longest common prefix array.
571 /// * `SA` - [0..n-1] The input suffix array or generalized suffix array (GSA).
572 /// * `LCP` - [0..n-1] The output longest common prefix array (can be SA).
573 /// * `n` - The length of the permuted longest common prefix array and the suffix array.
574 ///
575 /// # Returns
576 ///
577 /// 0 if no error occurred, -1 otherwise.
578 pub fn libsais16_lcp(PLCP: *const i32, SA: *const i32, LCP: *mut i32, n: i32) -> i32;
579
580 /// Constructs the permuted longest common prefix array (PLCP) of a given 16-bit string and a suffix array in parallel using OpenMP.
581 ///
582 /// # Arguments
583 ///
584 /// * `T` - [0..n-1] The input 16-bit string.
585 /// * `SA` - [0..n-1] The input suffix array.
586 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
587 /// * `n` - The length of the 16-bit string and the suffix array.
588 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
589 ///
590 /// # Returns
591 ///
592 /// 0 if no error occurred, -1 otherwise.
593 #[cfg(feature = "openmp")]
594 pub fn libsais16_plcp_omp(
595 T: *const u16,
596 SA: *const i32,
597 PLCP: *mut i32,
598 n: i32,
599 threads: i32,
600 ) -> i32;
601
602 /// Constructs the permuted longest common prefix array (PLCP) of a given 16-bit string set and a generalized suffix array (GSA) in parallel using OpenMP.
603 ///
604 /// # Arguments
605 ///
606 /// * `T` - [0..n-1] The input 16-bit string set using 0 as separators (T[n-1] must be 0).
607 /// * `SA` - [0..n-1] The input generalized suffix array.
608 /// * `PLCP` - [0..n-1] The output permuted longest common prefix array.
609 /// * `n` - The length of the string set and the generalized suffix array.
610 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
611 ///
612 /// # Returns
613 ///
614 /// 0 if no error occurred, -1 otherwise.
615 #[cfg(feature = "openmp")]
616 pub fn libsais16_plcp_gsa_omp(
617 T: *const u16,
618 SA: *const i32,
619 PLCP: *mut i32,
620 n: i32,
621 threads: i32,
622 ) -> i32;
623
624 /// Constructs the longest common prefix array (LCP) of a given permuted longest common prefix array (PLCP) and a suffix array in parallel using OpenMP.
625 ///
626 /// # Arguments
627 ///
628 /// * `PLCP` - [0..n-1] The input permuted longest common prefix array.
629 /// * `SA` - [0..n-1] The input suffix array or generalized suffix array (GSA).
630 /// * `LCP` - [0..n-1] The output longest common prefix array (can be SA).
631 /// * `n` - The length of the permuted longest common prefix array and the suffix array.
632 /// * `threads` - The number of OpenMP threads to use (can be 0 for OpenMP default).
633 ///
634 /// # Returns
635 ///
636 /// 0 if no error occurred, -1 otherwise.
637 #[cfg(feature = "openmp")]
638 pub fn libsais16_lcp_omp(
639 PLCP: *const i32,
640 SA: *const i32,
641 LCP: *mut i32,
642 n: i32,
643 threads: i32,
644 ) -> i32;
645}