Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector is not trivially copyable #303

Open
krzikalla opened this issue Nov 3, 2021 · 0 comments
Open

Vector is not trivially copyable #303

krzikalla opened this issue Nov 3, 2021 · 0 comments

Comments

@krzikalla
Copy link

krzikalla commented Nov 3, 2021

If you change

Vc_INTRINSIC Vector(const Vector &x) : SimdArray<T, N>(x) {}
Vc_INTRINSIC Vector &operator=(const Vector &x)
{
SimdArray<T, N>::operator=(x);
return *this;
}

to

    Vc_INTRINSIC Vector(const Vector &x) = default;
    Vc_INTRINSIC Vector &operator=(const Vector &x) = default;

Vector and in turn SimdArray becomes trivially copyable. Currently we get a lot of warnings with gcc 11.2, if we use Vc types together with memcpy (which we can't change).
I don't see any problems resulting in the proposed change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant