kokkos / array_ref

Polymorphic multidimensional array view
36 stars 9 forks source link

reference_K #27

Closed cyang49 closed 8 years ago

cyang49 commented 8 years ago

I've been trying to use the reference_K implementation since I need the subarray support in there. When I use g++ to compile the test cases, everything work fine. But when I use clang++ to compile them, I get build errors like this:


../include/array_ref:222:44: error: template name refers to non-type template 'dimension_typed<unsigned long, 0, 20, 30, 40>::extent'
      return ( i < I ? Dimension::template extent<I>::value : 1 ) *
                                           ^
../include/array_ref:261:32: note: in instantiation of function template specialization 'std::experimental::array_property::layout_right::mapping<std::experimental::array_property::dimension_typed<unsigned
      long, 0, 20, 30, 40> >::get_stride<0>' requested here
    { return mapping::template get_stride<0>(i); }
                               ^
../include/array_ref:635:20: note: in instantiation of member function 'std::experimental::array_property::layout_right::mapping<std::experimental::array_property::dimension_typed<unsigned long, 0, 20, 30,
      40> >::stride' requested here
    { return m_map.stride(i); }
                   ^

Could this be because the support of C++11 not complete in clang? I tried clang version 3.8.

hcedwar commented 8 years ago

Ambiguous name resolution between members of derived struct and base struct. No warning from gcc even with -Wall and -pedantic. Cleaned up so clang is happy now. Please note that this is not a production quality implementation. It is a greatly simplified and renamed version of what is in Kokkos.