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