aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreschnett <eschnett@105869f7-3296-0410-a4ea-f4349344b45a>2014-02-12 01:29:35 +0000
committereschnett <eschnett@105869f7-3296-0410-a4ea-f4349344b45a>2014-02-12 01:29:35 +0000
commit988ad3e13c492cd3d574d7443198f6af1369a094 (patch)
treed56c519e29a8ecd827b1d618a1e8e2bb50935388
parent91c9f1e192bc2a294cd4bd14de7e8b50f5bf3686 (diff)
Use C99 struct initializers instead of a GCC extension
git-svn-id: https://svn.cct.lsu.edu/repos/numrel/LSUThorns/Vectors/trunk@96 105869f7-3296-0410-a4ea-f4349344b45a
-rw-r--r--src/vectors-4-AVX.h36
-rw-r--r--src/vectors-8-AVX.h20
-rw-r--r--src/vectors-8-SSE2.h2
3 files changed, 29 insertions, 29 deletions
diff --git a/src/vectors-4-AVX.h b/src/vectors-4-AVX.h
index 28da594..bdfbabf 100644
--- a/src/vectors-4-AVX.h
+++ b/src/vectors-4-AVX.h
@@ -260,27 +260,27 @@ void vec4_store_nta_partial_(bool const all, __m256i const mask,
// Masks indicating which vector element should be stored:
static k4const_t const k4store_lo[9] =
{
- { i: { 0, 0, 0, 0, 0, 0, 0, 0, }},
- { i: { ~0, 0, 0, 0, 0, 0, 0, 0, }},
- { i: { ~0, ~0, 0, 0, 0, 0, 0, 0, }},
- { i: { ~0, ~0, ~0, 0, 0, 0, 0, 0, }},
- { i: { ~0, ~0, ~0, ~0, 0, 0, 0, 0, }},
- { i: { ~0, ~0, ~0, ~0, ~0, 0, 0, 0, }},
- { i: { ~0, ~0, ~0, ~0, ~0, ~0, 0, 0, }},
- { i: { ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0, }},
- { i: { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, 0, 0, 0, 0, 0, 0, }},
+ { .i= { ~0, 0, 0, 0, 0, 0, 0, 0, }},
+ { .i= { ~0, ~0, 0, 0, 0, 0, 0, 0, }},
+ { .i= { ~0, ~0, ~0, 0, 0, 0, 0, 0, }},
+ { .i= { ~0, ~0, ~0, ~0, 0, 0, 0, 0, }},
+ { .i= { ~0, ~0, ~0, ~0, ~0, 0, 0, 0, }},
+ { .i= { ~0, ~0, ~0, ~0, ~0, ~0, 0, 0, }},
+ { .i= { ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0, }},
+ { .i= { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, }},
};
static k4const_t const k4store_hi[9] =
{
- { i: { 0, 0, 0, 0, 0, 0, 0, 0, }},
- { i: { 0, 0, 0, 0, 0, 0, 0, ~0, }},
- { i: { 0, 0, 0, 0, 0, 0, ~0, ~0, }},
- { i: { 0, 0, 0, 0, 0, ~0, ~0, ~0, }},
- { i: { 0, 0, 0, 0, ~0, ~0, ~0, ~0, }},
- { i: { 0, 0, 0, ~0, ~0, ~0, ~0, ~0, }},
- { i: { 0, 0, ~0, ~0, ~0, ~0, ~0, ~0, }},
- { i: { 0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, }},
- { i: { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, 0, 0, 0, 0, 0, 0, }},
+ { .i= { 0, 0, 0, 0, 0, 0, 0, ~0, }},
+ { .i= { 0, 0, 0, 0, 0, 0, ~0, ~0, }},
+ { .i= { 0, 0, 0, 0, 0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, 0, 0, ~0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, 0, ~0, ~0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, ~0, ~0, ~0, ~0, ~0, ~0, }},
+ { .i= { 0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, }},
+ { .i= { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, }},
};
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && __GNUC__==4 && __GNUC_MINOR__<=4
// gcc 4.4 uses a wrong prototype for _mm256_maskstore_ps
diff --git a/src/vectors-8-AVX.h b/src/vectors-8-AVX.h
index 52319b3..a955f41 100644
--- a/src/vectors-8-AVX.h
+++ b/src/vectors-8-AVX.h
@@ -253,19 +253,19 @@ void vec8_store_nta_partial_(bool const all, __m256i const mask,
// Masks indicating which vector element should be stored:
/*static*/ k8const_t const k8store_lo[5] =
{
- { i: { 0, 0, 0, 0, }},
- { i: { ~0, 0, 0, 0, }},
- { i: { ~0, ~0, 0, 0, }},
- { i: { ~0, ~0, ~0, 0, }},
- { i: { ~0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, 0, 0, }},
+ { .i= { ~0, 0, 0, 0, }},
+ { .i= { ~0, ~0, 0, 0, }},
+ { .i= { ~0, ~0, ~0, 0, }},
+ { .i= { ~0, ~0, ~0, ~0, }},
};
/*static*/ k8const_t const k8store_hi[5] =
{
- { i: { 0, 0, 0, 0, }},
- { i: { 0, 0, 0, ~0, }},
- { i: { 0, 0, ~0, ~0, }},
- { i: { 0, ~0, ~0, ~0, }},
- { i: { ~0, ~0, ~0, ~0, }},
+ { .i= { 0, 0, 0, 0, }},
+ { .i= { 0, 0, 0, ~0, }},
+ { .i= { 0, 0, ~0, ~0, }},
+ { .i= { 0, ~0, ~0, ~0, }},
+ { .i= { ~0, ~0, ~0, ~0, }},
};
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && __GNUC__==4 && __GNUC_MINOR__<=4
// gcc 4.4 uses a wrong prototype for _mm256_maskstore_pd
diff --git a/src/vectors-8-SSE2.h b/src/vectors-8-SSE2.h
index b6dcfa6..fa7956f 100644
--- a/src/vectors-8-SSE2.h
+++ b/src/vectors-8-SSE2.h
@@ -761,7 +761,7 @@ CCTK_REAL8_VEC k8ifthen(CCTK_BOOLEAN8_VEC const x,
#elif 0
// We don't need to shift -- the condition (mask) will be either all
// zeros or all ones
- k8const_t const k8ione = { i: { 1, 1, }};
+ k8const_t const k8ione = { .i= { 1, 1, }};
// there is no _mm_srai_epi64(x, 63); we therefore calculate srli(x)-1
__m128i const x_int = *(__m128i const*)&x;
__m128i const imask_int = _mm_sub_epi64(_mm_srli_epi64(x_int, 63), k8ione.vi);