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

about header vector_size.hpp compatibility with cuda #33

@pkestene

Description

@pkestene

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions