simd 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Components for element-wise operations on data-parallel objects -*- C++ -*-
  2. // Copyright (C) 2020-2021 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file experimental/simd
  21. * This is a TS C++ Library header.
  22. */
  23. //
  24. // N4773 §9 data-parallel types library
  25. //
  26. #ifndef _GLIBCXX_EXPERIMENTAL_SIMD
  27. #define _GLIBCXX_EXPERIMENTAL_SIMD
  28. #define __cpp_lib_experimental_parallel_simd 201803
  29. #pragma GCC diagnostic push
  30. // Many [[gnu::vector_size(N)]] types might lead to a -Wpsabi warning which is
  31. // irrelevant as those functions never appear on ABI borders
  32. #ifndef __clang__
  33. #pragma GCC diagnostic ignored "-Wpsabi"
  34. #endif
  35. // If __OPTIMIZE__ is not defined some intrinsics are defined as macros, making
  36. // use of C casts internally. This requires us to disable the warning as it
  37. // would otherwise yield many false positives.
  38. #ifndef __OPTIMIZE__
  39. #pragma GCC diagnostic ignored "-Wold-style-cast"
  40. #endif
  41. #include "bits/simd_detail.h"
  42. #include "bits/simd.h"
  43. #include "bits/simd_fixed_size.h"
  44. #include "bits/simd_scalar.h"
  45. #include "bits/simd_builtin.h"
  46. #include "bits/simd_converter.h"
  47. #if _GLIBCXX_SIMD_X86INTRIN
  48. #include "bits/simd_x86.h"
  49. #elif _GLIBCXX_SIMD_HAVE_NEON
  50. #include "bits/simd_neon.h"
  51. #elif __ALTIVEC__
  52. #include "bits/simd_ppc.h"
  53. #endif
  54. #include "bits/simd_math.h"
  55. #pragma GCC diagnostic pop
  56. #endif // _GLIBCXX_EXPERIMENTAL_SIMD
  57. // vim: ft=cpp