public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/109822] New: Converting std::experimental::simd masks yields an error
@ 2023-05-12  7:36 jens.maurer at gmx dot net
  2023-05-12  8:06 ` [Bug libstdc++/109822] " mkretz at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: jens.maurer at gmx dot net @ 2023-05-12  7:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109822

            Bug ID: 109822
           Summary: Converting std::experimental::simd masks yields an
                    error
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jens.maurer at gmx dot net
  Target Milestone: ---

Reproducer:

#include <experimental/simd>
auto x =
to_native(to_fixed_size(std::experimental::native_simd<int>::mask_type()));

This converts a native SIMD mask type to fixed-size and back.  I believe this
should work, but gcc disagrees:

/usr/include/c++/12/experimental/bits/simd.h:3224:3: note:   template argument
deduction/substitution failed:
x.cc:4:19: note:   mismatched types ‘long unsigned int’ and ‘int’

(Also reproducible with gcc 13.1.)

The issue is that the SIMD implementation of libstdc++ uses a mixture of "int"
and "size_t" for the type of non-type template parameters for "number of
elements in this SIMD vector", causing deduction failures when gcc tries to
match template arguments with template parameters.

It seems the Technical Specification uses "int" throughout.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-05-10 14:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12  7:36 [Bug libstdc++/109822] New: Converting std::experimental::simd masks yields an error jens.maurer at gmx dot net
2023-05-12  8:06 ` [Bug libstdc++/109822] " mkretz at gcc dot gnu.org
2023-05-29 10:08 ` jakub at gcc dot gnu.org
2023-05-30 14:21 ` cvs-commit at gcc dot gnu.org
2023-05-30 15:09 ` cvs-commit at gcc dot gnu.org
2023-05-30 20:05 ` cvs-commit at gcc dot gnu.org
2023-05-30 20:06 ` cvs-commit at gcc dot gnu.org
2023-05-30 20:08 ` mkretz at gcc dot gnu.org
2023-06-02  6:40 ` aoliva at gcc dot gnu.org
2023-06-06 13:45 ` cvs-commit at gcc dot gnu.org
2024-05-07 16:19 ` cvs-commit at gcc dot gnu.org
2024-05-08 16:14 ` cvs-commit at gcc dot gnu.org
2024-05-10 14:07 ` cvs-commit at gcc dot gnu.org
2024-05-10 14:27 ` mkretz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).