ec_base_aliases.c 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**********************************************************************
  2. Copyright(c) 2011-2017 Intel Corporation All rights reserved.
  3. Redistribution and use in source and binary forms, with or without
  4. modification, are permitted provided that the following conditions
  5. are met:
  6. * Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in
  10. the documentation and/or other materials provided with the
  11. distribution.
  12. * Neither the name of Intel Corporation nor the names of its
  13. contributors may be used to endorse or promote products derived
  14. from this software without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  16. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  17. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  18. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  19. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  20. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  21. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  22. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  23. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  25. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. **********************************************************************/
  27. #include "erasure_code.h"
  28. void gf_vect_dot_prod(int len, int vlen, unsigned char *v,
  29. unsigned char **src, unsigned char *dest)
  30. {
  31. gf_vect_dot_prod_base(len, vlen, v, src, dest);
  32. }
  33. void gf_vect_mad(int len, int vec, int vec_i,
  34. unsigned char *v, unsigned char *src, unsigned char *dest)
  35. {
  36. gf_vect_mad_base(len, vec, vec_i, v, src, dest);
  37. }
  38. void ec_encode_data(int len, int srcs, int dests, unsigned char *v,
  39. unsigned char **src, unsigned char **dest)
  40. {
  41. ec_encode_data_base(len, srcs, dests, v, src, dest);
  42. }
  43. void ec_encode_data_update(int len, int k, int rows, int vec_i, unsigned char *v,
  44. unsigned char *data, unsigned char **dest)
  45. {
  46. ec_encode_data_update_base(len, k, rows, vec_i, v, data, dest);
  47. }
  48. int gf_vect_mul(int len, unsigned char *a, void *src, void *dest)
  49. {
  50. return gf_vect_mul_base(len, a, (unsigned char *)src, (unsigned char *)dest);
  51. }
  52. void ec_init_tables(int k, int rows, unsigned char *a, unsigned char *g_tbls)
  53. {
  54. return ec_init_tables_base(k, rows, a, g_tbls);
  55. }