starpu_hash.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012 Inria
  4. * Copyright (C) 2010,2012,2013,2015,2017,2019 CNRS
  5. * Copyright (C) 2009-2014 Université de Bordeaux
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. #ifndef __STARPU_HASH_H__
  19. #define __STARPU_HASH_H__
  20. /** @ingroup API_Data_Interfaces
  21. *
  22. * @{
  23. */
  24. #include <stdint.h>
  25. #include <stddef.h>
  26. #ifdef __cplusplus
  27. extern "C"
  28. {
  29. #endif
  30. /**
  31. Compute the CRC of a byte buffer seeded by the \p inputcrc
  32. <em>current state</em>. The return value should be considered as the new
  33. <em>current state</em> for future CRC computation. This is used for computing
  34. data size footprint.
  35. */
  36. uint32_t starpu_hash_crc32c_be_n(const void *input, size_t n, uint32_t inputcrc);
  37. /**
  38. Compute the CRC of a 32bit number seeded by the \p inputcrc
  39. <em>current state</em>. The return value should be considered as the new
  40. <em>current state</em> for future CRC computation. This is used for computing
  41. data size footprint.
  42. */
  43. uint32_t starpu_hash_crc32c_be(uint32_t input, uint32_t inputcrc);
  44. /**
  45. Compute the CRC of a string seeded by the \p inputcrc <em>current
  46. state</em>. The return value should be considered as the new <em>current
  47. state</em> for future CRC computation. This is used for computing data
  48. size footprint.
  49. */
  50. uint32_t starpu_hash_crc32c_string(const char *str, uint32_t inputcrc);
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. /** @} */
  55. #endif /* __STARPU_HASH_H__ */