liberasurecode
1.8.0
Erasure Code API library
Toggle main menu visibility
Loading...
Searching...
No Matches
construction
devel
liberasurecode
liberasurecode-1.8.0
src
backends
isa-l
isa_l_rs_cauchy.c
Go to the documentation of this file.
1
/*
2
* Copyright 2014 Kevin M Greenan
3
* Copyright 2014 Tushar Gohad
4
* Copyright 2016 Kota Tsuyuzaki
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions are met:
8
*
9
* Redistributions of source code must retain the above copyright notice, this
10
* list of conditions and the following disclaimer.
11
*
12
* Redistributions in binary form must reproduce the above copyright notice, this
13
* list of conditions and the following disclaimer in the documentation and/or
14
* other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY
15
* THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
16
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
18
* EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
19
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
20
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
23
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
*
26
* isa_l_rs_cauchy backend implementation
27
*
28
* vi: set noai tw=79 ts=4 sw=4:
29
*/
30
31
#include <stdlib.h>
32
#include "erasurecode_backend.h"
33
#include "isa_l_common.h"
34
35
#define ISA_L_RS_CAUCHY_LIB_MAJOR 2
36
#define ISA_L_RS_CAUCHY_LIB_MINOR 14
37
#define ISA_L_RS_CAUCHY_LIB_REV 1
38
#define ISA_L_RS_CAUCHY_LIB_VER_STR "2.14"
39
#define ISA_L_RS_CAUCHY_LIB_NAME "isa_l_rs_cauchy"
40
#if defined(__MACOS__) || defined(__MACOSX__) || defined(__OSX__) || defined(__APPLE__)
41
#define ISA_L_RS_CAUCHY_SO_NAME "libisal" LIBERASURECODE_SO_SUFFIX ".dylib"
42
#else
43
#define ISA_L_RS_CAUCHY_SO_NAME "libisal" LIBERASURECODE_SO_SUFFIX ".so.2"
44
#endif
45
46
/* Forward declarations */
47
struct
ec_backend_common
backend_isa_l_rs_cauchy
;
48
49
static
void
*
isa_l_rs_cauchy_init
(
struct
ec_backend_args *args,
50
void
*backend_sohandle)
51
{
52
return
isa_l_common_init(args, backend_sohandle,
"gf_gen_cauchy1_matrix"
);
53
}
54
55
/*
56
* For the time being, we only claim compatibility with versions that
57
* match exactly
58
*/
59
static
bool
isa_l_rs_cauchy_is_compatible_with
(uint32_t version) {
60
return
version ==
backend_isa_l_rs_cauchy
.ec_backend_version;
61
}
62
63
static
struct
ec_backend_op_stubs
isa_l_rs_cauchy_op_stubs
= {
64
.INIT =
isa_l_rs_cauchy_init
,
65
.EXIT = isa_l_exit,
66
.ISSYSTEMATIC = 1,
67
.ENCODE = isa_l_encode,
68
.DECODE = isa_l_decode,
69
.FRAGSNEEDED = isa_l_min_fragments,
70
.RECONSTRUCT = isa_l_reconstruct,
71
.ELEMENTSIZE = isa_l_element_size,
72
.ISCOMPATIBLEWITH =
isa_l_rs_cauchy_is_compatible_with
,
73
.GETMETADATASIZE = get_backend_metadata_size_zero,
74
.GETENCODEOFFSET = get_encode_offset_zero,
75
};
76
77
__attribute__
((visibility (
"internal"
)))
78
struct ec_backend_common
backend_isa_l_rs_cauchy
= {
79
.id = EC_BACKEND_ISA_L_RS_CAUCHY,
80
.name =
ISA_L_RS_CAUCHY_LIB_NAME
,
81
.soname =
ISA_L_RS_CAUCHY_SO_NAME
,
82
.soversion =
ISA_L_RS_CAUCHY_LIB_VER_STR
,
83
.ops = &
isa_l_rs_cauchy_op_stubs
,
84
.ec_backend_version = _VERSION(
ISA_L_RS_CAUCHY_LIB_MAJOR
,
85
ISA_L_RS_CAUCHY_LIB_MINOR
,
86
ISA_L_RS_CAUCHY_LIB_REV
),
87
};
__attribute__
__attribute__((visibility("internal")))
Return the element-size, which is the number of bits stored on a given device, per codeword.
Definition
isa_l_common.c:39
isa_l_rs_cauchy_init
static void * isa_l_rs_cauchy_init(struct ec_backend_args *args, void *backend_sohandle)
Definition
isa_l_rs_cauchy.c:49
ISA_L_RS_CAUCHY_SO_NAME
#define ISA_L_RS_CAUCHY_SO_NAME
Definition
isa_l_rs_cauchy.c:43
isa_l_rs_cauchy_is_compatible_with
static bool isa_l_rs_cauchy_is_compatible_with(uint32_t version)
Definition
isa_l_rs_cauchy.c:59
ISA_L_RS_CAUCHY_LIB_REV
#define ISA_L_RS_CAUCHY_LIB_REV
Definition
isa_l_rs_cauchy.c:37
backend_isa_l_rs_cauchy
struct ec_backend_common backend_isa_l_rs_cauchy
Definition
isa_l_rs_cauchy.c:47
isa_l_rs_cauchy_op_stubs
static struct ec_backend_op_stubs isa_l_rs_cauchy_op_stubs
Definition
isa_l_rs_cauchy.c:63
ISA_L_RS_CAUCHY_LIB_NAME
#define ISA_L_RS_CAUCHY_LIB_NAME
Definition
isa_l_rs_cauchy.c:39
ISA_L_RS_CAUCHY_LIB_VER_STR
#define ISA_L_RS_CAUCHY_LIB_VER_STR
Definition
isa_l_rs_cauchy.c:38
ISA_L_RS_CAUCHY_LIB_MINOR
#define ISA_L_RS_CAUCHY_LIB_MINOR
Definition
isa_l_rs_cauchy.c:36
ISA_L_RS_CAUCHY_LIB_MAJOR
#define ISA_L_RS_CAUCHY_LIB_MAJOR
Definition
isa_l_rs_cauchy.c:35
Generated on
for liberasurecode by
1.18.0