edanor/umesimd

Does not compile with clang 3.9.0 on Haswell

Closed this issue · 3 comments

noma commented

Here's the output:

In file included from ./umesimd/plugins/avx2/UMESimdVecUintAVX2.h:57:
./umesimd/plugins/avx2/uint/UMESimdVecUint64_4.h:62:11: error: explicit
      specialization of 'UME::SIMD::SIMDVec_u<unsigned long, 4>' after instantiation
    class SIMDVec_u<uint64_t, 4> :
          ^~~~~~~~~~~~~~~~~~~~~~
./umesimd/plugins/avx2/uint/UMESimdVecUint32_4.h:142:27: note: implicit
      instantiation first required here
            return assign(b);
                          ^
In file included from kernel_simd_class_umesimd.cpp:6:
In file included from /home/b/bemnoack/repositories/simd_benchmarks/include/common/kernel.hpp:17:
In file included from ./umesimd/UMESimd.h:137:
In file included from ./umesimd/plugins/UMESimdPluginAVX2.h:97:
In file included from ./umesimd/plugins/avx2/UMESimdVecUintAVX2.h:57:
./umesimd/plugins/avx2/uint/UMESimdVecUint64_4.h:757:9: warning: '/*' within
      block comment [-Wcomment]
        /*UME_FORCE_INLINE SIMDVec_u div(SIMDVecMask<4> const & mask, SIMDVec_u const & b) const {
        ^
./umesimd/plugins/avx2/uint/UMESimdVecUint64_4.h:763:9: warning: '/*' within
      block comment [-Wcomment]
        /*UME_FORCE_INLINE SIMDVec_u div(uint64_t b) const {
        ^
./umesimd/plugins/avx2/uint/UMESimdVecUint64_4.h:787:9: warning: '/*' within
      block comment [-Wcomment]
        /*UME_FORCE_INLINE SIMDVec_u & diva(SIMDVecMask<4> const & mask, SIMDVec_u const & b) {
        ^
./umesimd/plugins/avx2/uint/UMESimdVecUint64_4.h:793:9: warning: '/*' within
      block comment [-Wcomment]
        /*UME_FORCE_INLINE SIMDVec_u & diva(uint64_t b) {
        ^
./umesimd/plugins/avx2/uint/UMESimdVecUint64_4.h:802:9: warning: '/*' within
      block comment [-Wcomment]
        /*UME_FORCE_INLINE SIMDVec_u & diva(SIMDVecMask<4> const & mask, uint64_t b) {
        ^
In file included from kernel_simd_class_umesimd.cpp:6:
In file included from /home/b/bemnoack/repositories/simd_benchmarks/include/common/kernel.hpp:17:
In file included from ./umesimd/UMESimd.h:137:
In file included from ./umesimd/plugins/UMESimdPluginAVX2.h:100:
./umesimd/plugins/avx2/UMESimdCastOperatorsAVX2.h:153:36: error: template
      specialization requires 'template<>'
    inline SIMDVec_u<uint64_t, 4>::operator SIMDVec_i<int64_t, 4>() const {
           ~~~~~~~~~~~~~~~~~~~~~~  ^
    template<>
./umesimd/plugins/avx2/UMESimdCastOperatorsAVX2.h:217:36: error: template
      specialization requires 'template<>'
    inline SIMDVec_u<uint64_t, 4>::operator SIMDVec_f<double, 4>() const {
           ~~~~~~~~~~~~~~~~~~~~~~  ^
    template<>
./umesimd/plugins/avx2/UMESimdCastOperatorsAVX2.h:848:36: error: template
      specialization requires 'template<>'
    inline SIMDVec_u<uint64_t, 4>::operator SIMDVec_u<uint32_t, 4>() const {
           ~~~~~~~~~~~~~~~~~~~~~~  ^
    template<>
5 warnings and 4 errors generated.
noma commented

FYI: Compiles on KNL.

Clang requires forward declarations of template specializations. The one for SIMD4_64u was missing. 439f1bc should fix the issue.

Please verify.

noma commented

Fixed. Thanks.