This contains my bachelors thesis and associated tex files, code snippets and maybe more. Topic: Data Movement in Heterogeneous Memories with Intel Data Streaming Accelerator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
685 B

  1. /**
  2. * @file const.h
  3. * @author André Berthold
  4. * @brief Defines handy constants.
  5. * @version 0.1
  6. * @date 2023-05-25
  7. *
  8. * @copyright Copyright (c) 2023
  9. *
  10. */
  11. #pragma once
  12. #include <cstdint>
  13. #include <immintrin.h>
  14. constexpr size_t VECTOR_SIZE_I = 512;
  15. constexpr size_t VECTOR_SIZE_B = VECTOR_SIZE_I / 8;
  16. constexpr size_t VECTOR_SIZE_H = VECTOR_SIZE_B / sizeof(uint32_t);
  17. constexpr size_t VECTOR_SIZE_W = VECTOR_SIZE_B / sizeof(uint64_t);
  18. template<typename T>
  19. constexpr size_t VECTOR_SIZE() {
  20. return VECTOR_SIZE_B / sizeof(T);
  21. }
  22. template<typename T>
  23. constexpr size_t V_MASK_SIZE() {
  24. return VECTOR_SIZE<T>() / 8;
  25. }
  26. const __mmask16 full_m16 = _mm512_int2mask(0xFFFF);