Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

about header vector_size.hpp compatibility with cuda #33

Open
pkestene opened this issue Oct 21, 2021 · 0 comments
Open

about header vector_size.hpp compatibility with cuda #33

pkestene opened this issue Oct 21, 2021 · 0 comments

Comments

@pkestene
Copy link

Hi,

If I try to build e.g. simd_warp_solution.cpp (from Kokkos-tutorial), with nvcc 11.4 and g++-10.2, i get several compile error, e.g. :

/home/pkestene/etudes/kokkos/github/test/simd-math/vector_size.hpp(149): error: attribute does not apply to any entity

/home/pkestene/etudes/kokkos/github/test/simd-math/vector_size.hpp(178): error: "simd::simd<T, simd::simd_abi::vector_size<N>> () const" contains a vector, which is not supported in device code

2 errors detected in the compilation of "/home/pkestene/etudes/kokkos/github/test/simd_warp_solution.cpp".

It builds and runs fine if I protect including vector_size.hpp in simd.hpp when building for Cuda:

// iprevent including vector_size when building for cuda ?
#ifndef __CUDACC__
#include "vector_size.hpp"
#endif

Is it ok ?

@pkestene pkestene changed the title about header vector_size.hpp about header vector_size.hpp compatibility with cuda Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant