starpu_hash.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 32bit number 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(uint32_t input, uint32_t inputcrc);
  42. /**
  43. Compute the CRC of a string seeded by the \p inputcrc <em>current
  44. state</em>. The return value should be considered as the new <em>current
  45. state</em> for future CRC computation. This is used for computing data
  46. size footprint.
  47. */
  48. uint32_t starpu_hash_crc32c_string(const char *str, uint32_t inputcrc);
  49. /** @} */
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* __STARPU_HASH_H__ */