From 988ad3e13c492cd3d574d7443198f6af1369a094 Mon Sep 17 00:00:00 2001 From: eschnett Date: Wed, 12 Feb 2014 01:29:35 +0000 Subject: 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 --- src/vectors-4-AVX.h | 36 ++++++++++++++++++------------------ src/vectors-8-AVX.h | 20 ++++++++++---------- src/vectors-8-SSE2.h | 2 +- 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); -- cgit v1.2.3