220 37391 <CALnjya-MHDV+YOKY2x=xGjLRaAztaABz4T0cR=Y5+1MC_Pf_dg@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Mathias Gaunard <mathias@gaunard.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Would SIMD consider signed overflow undefined?
Date: Mon, 19 Mar 2018 21:22:26 +0000
Lines: 73
Approved: news@gmane.org
Message-ID: <CALnjya-MHDV+YOKY2x=xGjLRaAztaABz4T0cR=Y5+1MC_Pf_dg@mail.gmail.com>
References: <ad2467ad-fc49-4e25-9550-3aeff9124d39@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="000000000000fe4d670567ca8d06"
X-Trace: blaine.gmane.org 1521494430 6439 195.159.176.226 (19 Mar 2018 21:20:30 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 19 Mar 2018 21:20:30 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDCN3ZE6W4GRBFWUYDKQKGQEYA5DURI@isocpp.org Mon Mar 19 22:20:26 2018
Return-path: <std-proposals+bncBDCN3ZE6W4GRBFWUYDKQKGQEYA5DURI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qt0-f199.google.com ([209.85.216.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDCN3ZE6W4GRBFWUYDKQKGQEYA5DURI@isocpp.org>)
	id 1ey2Ce-0001YL-Sy
	for gclcip-std-proposals@m.gmane.org; Mon, 19 Mar 2018 22:20:25 +0100
Original-Received: by mail-qt0-f199.google.com with SMTP id j17sf12880681qth.20
        for <gclcip-std-proposals@m.gmane.org>; Mon, 19 Mar 2018 14:22:32 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1521494551; cv=pass;
        d=google.com; s=arc-20160816;
        b=OIgtuZEGaw3vXk+AnnDx8GudTux0xwQUUTT7uUg1Wwk7LhlijwAwLd8LuwWlNmIq8X
         HwrIvEteJUY4kwb52zuvs3sN/FZDTMbjXDHJlBad6iiwhHcbGdTlcj8LcmfAu4mgpONe
         JO09NULfmxOj3ulWvAZEkXgSbFZthCfoUBOzd6bg1yIwAMMWOpIL5kGS2tG5sDdQ6bMu
         VYey98EZQL7VH51ioXrh9VR4F0SgE0rTvYo422Rn42KgAAZHQDtgJOjEpdaaPpNU4uPG
         4D+vDCL+TnKueSbWDQacRG5PTJ3/dg/oJlz2bR6H6I9mCNK6G4j/+h6pkzYJstPcwk//
         OYBg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:to:subject:message-id:date
         :from:references:in-reply-to:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=ILEfCT6gzVn6YvviNA9OZlRN9mmwEDrSUCC//Y41mZI=;
        b=cA/vk9fLpxm8s4OYa7dlmGSmgewOQCA0FUgkv5dZG9mlh6jxrGEFGtH13IaQTQgmo3
         D8UvUdrvHt/WED9lbg5T6Y8DAbD3l0t4C/Oqlsgbg8p9jcPxvdROJuAtGi3v9Y9IogQb
         c1vYeE7ioD3JhUdtkt3HoA2ga3w7K/sYXNtcOgugT8HWclExNwk8RQNp4pNmetVmNQm3
         1KcmcxBaRLloHxpgfUb8wXb8BVEAE3FyC+7UvfbhJKp0TpjcCEHLp97Zot9TdaBFu5Ba
         Vp1cn6yqcM5Wlb2gVolnpJqbAZ+34skG2vNL0EozJBMtZxfoijVSQrR7eEEYZUeXiADS
         Iw8A==
ARC-Authentication-Results: i=2; mx.google.com;
       spf=pass (google.com: domain of mathias@gaunard.com designates 46.105.43.105 as permitted sender) smtp.mailfrom=mathias@gaunard.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ILEfCT6gzVn6YvviNA9OZlRN9mmwEDrSUCC//Y41mZI=;
        b=DW3FcLCTFHl48J/9Sk0Ml9sybPF5r8HEoIEyPGCPCYlrdbTBiAfhKg4QcO5TrUJGFS
         1gnETnXr7hMOXCyvzbipLCR8d+o/JCkSFuMui+7EL7n54P1t1CMlvf6jkk8BCNxD1hGc
         T4Tv1/vWUtZxY0Xn45AJLet/QxsXPG+jGFJbvH3YQvkhLkIavdqbr3sBEOKsEC3ByNJb
         J0TGCulsloGYGbkYSh+7O4jj0N73EAJ5KGSFwLCvSb/gxUlpJBqJWvQxneaWrHpGGOgS
         9feqaZT+DM4jKvHBxG/bD93+lomB17Mj1IrmcRnD2IzxFgx5EdVjmoVeXnDvh3MBBhkB
         kupA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:in-reply-to:references:from:date
         :message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=ILEfCT6gzVn6YvviNA9OZlRN9mmwEDrSUCC//Y41mZI=;
        b=eE72wdPF1IJi7MSJzjtiFcVA+MQPPPq3PLhcpUrcsMipQ+F8QN69S9FHDIAgq7sAYq
         hN1TYl1ggTHZOeeizaiksYtw4VuJmtVzMtjNT57nyxsF0HFyoE8cNuPHKhmrP9nb62Iz
         x6YWgrXj5QWj9dEiScyQfAloVBm9ezZxyXpA4K4wjG2u/Cv5l2RO8JSZsocQJ7wnO/eM
         wES7cxMvUxXESLex5EnxV47ciaxVgF3vV8MmpS3lslIJtBY57FLtf/lpBucpbB+KksIG
         dRy2ZzUG9Lo0veY4v1HMGc+577CS7sua7qCF0NInJ6inMBSIo6CgGrFAFuuDluUwdAsr
         xHww==
X-Gm-Message-State: AElRT7G/y9Rxa2VqATW5kQ0q0XJrBBH5N2ubMVQrav77F8tpJU9gtiJu
	BjW811w3oJeo4TZ7Pk/TWly47Q==
X-Google-Smtp-Source: AG47ELuPaugSDOJaOMtBkqCoCXhzOdHFXU/oSORTfaAzcvlub/CCeITnH3DTxREzHcriR8TWd6Cr+A==
X-Received: by 10.55.191.135 with SMTP id p129mr9244719qkf.1.1521494551738;
        Mon, 19 Mar 2018 14:22:31 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.200.68.23 with SMTP id j23ls1545728qtn.0.gmail; Mon, 19 Mar
 2018 14:22:30 -0700 (PDT)
X-Received: by 10.237.42.56 with SMTP id c53mr20147731qtd.199.1521494550687;
        Mon, 19 Mar 2018 14:22:30 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1521494550; cv=none;
        d=google.com; s=arc-20160816;
        b=KiFv6v3TQjmHnmjmMLeNOOPL/Oignx7cQGx3ihsn4ucLHWg0Oj/cYZh5XmSgYnl6jp
         og0AbZgdlVMTVq1BKF8BVbyE/msGmrMeqdFlcP2Pi0Jpslw9O9fKMoVZ1whI3zn3ym1Y
         CeaU9m2vCH+YBosQxZ0pniM+zvX8WeNae0PKOyo/q6uYaFuom5kGLIP39vwCYE7mU1fo
         HHhlDCMfTSqxAZxJgjMaG132swuhG5ipd1tCb//ArmrNnKwO5e7WJU1MfvCnpD5V3sST
         4K7mn/Ix4eyFq2vWR81GTKygS/zLzOtp49ec6yTEQ7RAz9EsQjDULGmehpFw9bvS/ajM
         6J4w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:references:in-reply-to:mime-version
         :arc-authentication-results;
        bh=yg48lBtekdSO16TLefJ8BcZqC1owykfFerAD/wCgrGQ=;
        b=MrEHuoex+lTygBRcCFq5fd/D8FEq82HpKc2iP3i/bHhmpTMlE2RtcS8ZOcKzcBvSkx
         OJ2fSFoTtcXlcjXcQtN+uMUoFJxU+kuIeVA+oF2O4b4ZMcnB5U8aWsw57Z+RQlbwi/Gm
         qVaPzgzMH8vG/hVaC7ASX2YhyvG7aCJWJjOwnp93mrqojtwBdrwrwSjAkYsqCIEk3tC1
         qWeYRVzYIBVt/WcXipcbMWzJGsre+IqZTNFebfVcLfkmHNxudyNPyzISKkuIvhyDxNQs
         TmGbwkwXPbleeuycYKjOUUdKh6n9r7vAdwbhiSl8alhn1YOY1jSVSr9FMXvYJ1Ir/Ia0
         ZFOQ==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=pass (google.com: domain of mathias@gaunard.com designates 46.105.43.105 as permitted sender) smtp.mailfrom=mathias@gaunard.com
Original-Received: from 5.mo69.mail-out.ovh.net (5.mo69.mail-out.ovh.net. [46.105.43.105])
        by mx.google.com with ESMTPS id k190si992279qkc.189.2018.03.19.14.22.30
        for <std-proposals@isocpp.org>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Mon, 19 Mar 2018 14:22:30 -0700 (PDT)
Received-SPF: pass (google.com: domain of mathias@gaunard.com designates 46.105.43.105 as permitted sender) client-ip=46.105.43.105;
Original-Received: from player770.ha.ovh.net (unknown [10.109.120.149])
	by mo69.mail-out.ovh.net (Postfix) with ESMTP id 83ED88637
	for <std-proposals@isocpp.org>; Mon, 19 Mar 2018 22:22:28 +0100 (CET)
Original-Received: from mail-ot0-f173.google.com (mail-ot0-f173.google.com [74.125.82.173])
	(Authenticated sender: mathias@gaunard.com)
	by player770.ha.ovh.net (Postfix) with ESMTPSA id CDC7E3C0091
	for <std-proposals@isocpp.org>; Mon, 19 Mar 2018 22:22:27 +0100 (CET)
Original-Received: by mail-ot0-f173.google.com with SMTP id v23-v6so3670550oth.9
        for <std-proposals@isocpp.org>; Mon, 19 Mar 2018 14:22:27 -0700 (PDT)
X-Received: by 2002:a9d:1f2a:: with SMTP id x39-v6mr9192594otd.125.1521494546859;
 Mon, 19 Mar 2018 14:22:26 -0700 (PDT)
Original-Received: by 10.201.21.34 with HTTP; Mon, 19 Mar 2018 14:22:26 -0700 (PDT)
In-Reply-To: <ad2467ad-fc49-4e25-9550-3aeff9124d39@isocpp.org>
X-Gmail-Original-Message-ID: <CALnjya-MHDV+YOKY2x=xGjLRaAztaABz4T0cR=Y5+1MC_Pf_dg@mail.gmail.com>
X-Ovh-Tracer-Id: 3032048453107562111
X-VR-SPAMSTATE: OK
X-VR-SPAMSCORE: 0
X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtgedrudefgddugeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenuc
X-Original-Sender: mathias@gaunard.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of mathias@gaunard.com designates 46.105.43.105 as permitted sender) smtp.mailfrom=mathias@gaunard.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:37391
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/37391>

--000000000000fe4d670567ca8d06
Content-Type: text/plain; charset="UTF-8"

On 19 March 2018 at 21:04, Myriachan <myriachan@gmail.com> wrote:

> Would the SIMD proposals consider signed integer overflow to be undefined?
>
> SIMD programming uses a lot of tricks for performance, including things
> like reinterpreting values as the "wrong" type, and abusing
> two's-complement overflow mechanics.  This is often done irrespective of
> whether the result is ultimately considered signed or unsigned.
>
>
The standard library should expose any functionality that any trick can
stay in the implementation without the user having to worry about it.
One example of a "trick" is that the value for true is usually the same as
-1. So you can implement `a.where(condition)++' as `a - condition'.

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALnjya-MHDV%2BYOKY2x%3DxGjLRaAztaABz4T0cR%3DY5%2B1MC_Pf_dg%40mail.gmail.com.

--000000000000fe4d670567ca8d06
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On 1=
9 March 2018 at 21:04, Myriachan <span dir=3D"ltr">&lt;<a href=3D"mailto:my=
riachan@gmail.com" target=3D"_blank">myriachan@gmail.com</a>&gt;</span> wro=
te:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-=
left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">Would the SIMD propo=
sals consider signed integer overflow to be undefined?<br><br>SIMD programm=
ing uses a lot of tricks for performance, including things like reinterpret=
ing values as the &quot;wrong&quot; type, and abusing two&#39;s-complement =
overflow mechanics.=C2=A0 This is often done irrespective of whether the re=
sult is ultimately considered signed or unsigned.<br><br></div></blockquote=
><div><br></div><div><span style=3D"color:rgb(34,34,34);font-family:arial,s=
ans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;f=
ont-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:st=
art;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px=
;background-color:rgb(255,255,255);text-decoration-style:initial;text-decor=
ation-color:initial;float:none;display:inline">The standard library should =
expose any functionality that any trick can stay in the implementation with=
out the user having to worry about it.</span><div style=3D"color:rgb(34,34,=
34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-var=
iant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spaci=
ng:normal;text-align:start;text-indent:0px;text-transform:none;white-space:=
normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color=
:initial">One example of a &quot;trick&quot; is that the value for true is =
usually the same as -1. So you can implement `a.where(condition)++&#39; as =
`a - condition&#39;.</div>=C2=A0</div></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CALnjya-MHDV%2BYOKY2x%3DxGjLRaAztaABz=
4T0cR%3DY5%2B1MC_Pf_dg%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CALnjya-M=
HDV%2BYOKY2x%3DxGjLRaAztaABz4T0cR%3DY5%2B1MC_Pf_dg%40mail.gmail.com</a>.<br=
 />

--000000000000fe4d670567ca8d06--

.
