-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathst.cuh
84 lines (62 loc) · 2.92 KB
/
st.cuh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*-----------------------------------------------------------*/
/* Block Sorting, Lossless Data Compression Library. */
/* Interface to Sort Transform (GPU version) */
/*-----------------------------------------------------------*/
/*--
This file is a part of bsc and/or libbsc, a program and a library for
lossless, block-sorting data compression.
Copyright (c) 2009-2012 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Please see the file LICENSE for full copyright information and file AUTHORS
for full list of contributors.
See also the bsc and libbsc web site:
http://libbsc.com/ for more information.
--*/
/*--
Sort Transform is patented by Michael Schindler under US patent 6,199,064.
However for research purposes this algorithm is included in this software.
So if you are of the type who should worry about this (making money) worry away.
The author shall have no liability with respect to the infringement of
copyrights, trade secrets or any patents by this software. In no event will
the author be liable for any lost revenue or profits or other special,
indirect and consequential damages.
Sort Transform is disabled by default and can be enabled by defining the
preprocessor macro LIBBSC_SORT_TRANSFORM_SUPPORT at compile time.
--*/
#ifndef _LIBBSC_ST_CUH
#define _LIBBSC_ST_CUH
#ifdef __cplusplus
extern "C" {
#endif
#if defined(LIBBSC_SORT_TRANSFORM_SUPPORT) && defined(LIBBSC_CUDA_SUPPORT)
/**
* You should call this function before you call any of the other functions in st.
* @param features - the set of additional features.
* @return LIBBSC_NO_ERROR if no error occurred, error code otherwise.
*/
int bsc_st_cuda_init(int features);
/**
* Constructs the Sort Transform of order k transformed string of a given string.
* @param T - the input/output string of n chars.
* @param n - the length of the given string.
* @param k[3..8] - the order of Sort Transform.
* @param features - the set of additional features.
* @return the primary index if no error occurred, error code otherwise.
*/
int bsc_st_encode_cuda(unsigned char * T, int n, int k, int features);
#endif
#ifdef __cplusplus
}
#endif
#endif
/*-----------------------------------------------------------*/
/* End st.cuh */
/*-----------------------------------------------------------*/