starpu_hash.h 2.2 KB

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