Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EAD22200D12 for ; Sat, 23 Sep 2017 02:00:45 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E95411609E5; Sat, 23 Sep 2017 00:00:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1312A1609D0 for ; Sat, 23 Sep 2017 02:00:44 +0200 (CEST) Received: (qmail 6644 invoked by uid 500); 23 Sep 2017 00:00:44 -0000 Mailing-List: contact dev-help@systemml.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.apache.org Delivered-To: mailing list dev@systemml.apache.org Received: (qmail 6626 invoked by uid 99); 23 Sep 2017 00:00:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Sep 2017 00:00:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 57A441917B2 for ; Sat, 23 Sep 2017 00:00:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.629 X-Spam-Level: ** X-Spam-Status: No, score=2.629 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OQXIrNtaCR3r for ; Sat, 23 Sep 2017 00:00:41 +0000 (UTC) Received: from mail-ua0-f170.google.com (mail-ua0-f170.google.com [209.85.217.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id CB9A361116 for ; Sat, 23 Sep 2017 00:00:40 +0000 (UTC) Received: by mail-ua0-f170.google.com with SMTP id l94so1608893ual.11 for ; Fri, 22 Sep 2017 17:00:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=koLpH3CgVTCD4/0vbipaDTTtGxSo7J+Dc5/J9PxUnD0=; b=BrFHCSgP/lCtqxNz+0YK5/R47By2yuZrKzRqwRT+Q4vjrE+TpkIafGz1/BZrP27dkT HY8KeVNUFIGoipL736gUQmY6KfpUWLm4dnVcSLyLEpL/46SsLPwO5/9Y7C0mwXSaHb+6 Jf/Z+W9QDqFTjHFszf5LimHVSSduritJU8brDWx8F2N/P1mg58CbNYOQLsQhrvhcPDMA W2Tb4vSGBwSTNBdLnguGc2MlbX4tGxbpZw1vcZh5DRknln+pzLPNXVcJ6pYzzT34q3vT oapzSAONl7txuLfqko6gi0hmw+nWxmiY9LHJ9X9MC/0TEK/AOQw5RnQLq3w6yS7Mdejy 9WTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=koLpH3CgVTCD4/0vbipaDTTtGxSo7J+Dc5/J9PxUnD0=; b=KfShtbwE2mzRD0HcIrKE+x2Ls353LQqRDz1c0C0aI4Ya+VBnidk8woJ6sOhH6dl8cQ ZD3FpzVhYEqywAboxmLMZzdmroVlxoYe2Ik6LEWeougLPzLWh46VWFB5Dz3g196Alrh4 9pWo+Jgsp0YuShmAOIfev40BvsCOWcP26MVZory2H4nKudWiLZcXuJ7k8wd+mfCw6k+7 AKG2WWifSh3QOPVqMpuaJI7a265VJueBU66IEhrEik/m2epleUIRVNeoPandYq636ZTU Ukkq/LLaixI9ZNij/o/a3R7qZu1q7/KcsZNphZ0FYyy4nayFLzZyGfPhoOetUADr7hG1 3FfQ== X-Gm-Message-State: AHPjjUh4iy6D42zv18LIb6NGXFAXnglUQT8da5NxtU+R+8sUuyT272zX UWW8dTnnptorLycW20PzjDaHlRUeJ30WSHdgHw== X-Google-Smtp-Source: AOwi7QCjs4vt4/ZOur/Sentfls9iQNiCXL6hhlceYr/q2+q8BsBmz/L5GSceU/LqMPYG0kixFjZ6KM7Tnd5U5A7OCsU= X-Received: by 10.176.77.76 with SMTP id k12mr862716uag.141.1506124840356; Fri, 22 Sep 2017 17:00:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.159.61.29 with HTTP; Fri, 22 Sep 2017 17:00:39 -0700 (PDT) From: Matthias Boehm Date: Fri, 22 Sep 2017 17:00:39 -0700 Message-ID: Subject: Re: [QUESTION] XOR operations in SystemML. Thanks. To: Janardhan Pulivarthi Cc: dev@systemml.apache.org Content-Type: multipart/alternative; boundary="f403043c5dd018cf870559d004a9" archived-at: Sat, 23 Sep 2017 00:00:46 -0000 --f403043c5dd018cf870559d004a9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Janardhan, sure - I've created SYSTEMML-1931, which covers the support of boolean operations over matrices. Your current PR for SYSTEMML-1883 already touches some aspects of it for XOR. I would recommend to keep 1883 and 1931 separate. Hence, you don't have to deal with value type propagation and GPU, SPARK, or MR instructions in 1883 right now. Regarding the generalization of cumulative operations, I don't think we're ready to create an actual task yet - it's just an observation that a lot of operations like cumsum and removeEmpty have a common recursive characteristics and that there are lots of use cases, where we would want a similar primitive with arbitrary element-wise and cumulative aggregation functions. If you're interested in working on it, we should probably start with a design document. Regards, Matthias On Fri, Sep 22, 2017 at 9:23 AM, Janardhan Pulivarthi < janardhan.pulivarthi@gmail.com> wrote: > Hi Matthias, > > In your previous mail - you wrote, > > > Down the road, we can think about a generalization of our existing > cumulative operations such as cumsum, cumprod, cummax, to arbitrary cell > computations and aggregation functions, which would be useful for quite a > number of applications. > > > would be to generalize our AND, OR, NOT, (and XOR) operations to > matrices, because > these are currently only supported over scalars. > > Is there any jira is created for this? (would you mind please, creating a > jira for me with a little description of task). Is there anything that yo= u > would like to add for the above tasks, to handle in one nice PR at once. > > Thanks, > Janardhan > > > On Thu, Sep 7, 2017 at 12:18 PM, Matthias Boehm > wrote: > >> thanks Janardhan, in that case I would recommend to go with R syntax >> because (1) it's actually one of our selling points that users don't hav= e >> to learn a new language, (2) it simplifies the porting of R scripts to D= ML >> (and vice versa), and (3) I would think it's rather uncommon to have lon= g >> chains of xor operations. >> >> Btw, a nice follow-up task - in case you're interested - would be to >> generalize our AND, OR, NOT, (and XOR) operations to matrices, because >> these are currently only supported over scalars. It would get you in tou= ch >> with the parser validation, compilation, and runtime of rather simple >> operations. >> >> Regards, >> Matthias >> >> On Mon, Sep 4, 2017 at 8:57 PM, Janardhan Pulivarthi < >> janardhan.pulivarthi@gmail.com> wrote: >> >> > Hi, >> > >> > yes, no big reason to deviate. But, simplicity of `*a (+) b*` or `*a >= < >> > b*`like >> > ` *a ^ 2*` (compared to `*xor(a, b)`*, which of the type` *pow(a, 2) >> `*), >> > to be consistent with the other symbols of dml. >> > >> > In this simple case: >> > 1. ` *a (+) b (+) c (+) d(+)...* ` >> > 2. ` *xor(xor(a, b), c)..) ` (*sorry, if I written this syntax wrongl= y) >> > >> > Your word will be final. >> > >> > Thanks, >> > Janardhan >> > >> > >> > On Mon, Sep 4, 2017 at 6:46 PM, Matthias Boehm >> > wrote: >> > >> > > Could we please stick to R syntax (i.e., "xor(a, b)") here, unless >> there >> > is >> > > a good reason to deviate? Thanks. >> > > >> > > Regards, >> > > Matthias >> > > >> > > On Mon, Sep 4, 2017 at 7:55 AM, Janardhan Pulivarthi < >> > > janardhan.pulivarthi@gmail.com> wrote: >> > > >> > > > Hi all, [XOR symbol] >> > > > >> > > > Now, I gave a sample try for the XOR operator, with caret ` ^ ` >> symbol. >> > > > But, this have been reserved for exponentiation. So, another >> > alternative >> > > > would be >> > > > >> > > > 1. ` (+) ` >> > > > 2. ` >< ` >> > > > 3. ` >-< ` >> > > > >> > > > Thanks, >> > > > Janardhan >> > > > >> > > > On Thu, Aug 31, 2017 at 7:38 PM, Matthias Boehm < >> > mboehm7@googlemail.com> >> > > > wrote: >> > > > >> > > >> From a scalar operation perspective, you could of course emulate >> XOR >> > via >> > > >> AND, OR, and negation. However, you might want to write anyway a >> > > java-based >> > > >> UDF to efficiently implement this recursive operator. >> > > >> >> > > >> Down the road, we can think about a generalization of our existin= g >> > > >> cumulative operations such as cumsum, cumprod, cummax, to arbitra= ry >> > cell >> > > >> computations and aggregation functions, which would be useful for >> > quite >> > > a >> > > >> number of applications. >> > > >> >> > > >> Regards, >> > > >> Matthias >> > > >> >> > > >> On Thu, Aug 31, 2017 at 5:59 AM, Janardhan Pulivarthi < >> > > >> janardhan.pulivarthi@gmail.com> wrote: >> > > >> >> > > >>> Hi, >> > > >>> >> > > >>> The following is an equation (2.4) from the algorithm for the >> > > generation >> > > >>> of sobol sequences. The authors of the paper have utilized the >> > bitwise >> > > >>> operations of C++ to calculate this efficiently. >> > > >>> >> > > >>> *Now, the question is:* Can we do this at script level (in dml) >> or we >> > > >>> should do it in the `java` itself as a builtin, function to >> generate >> > > the >> > > >>> numbers?. >> > > >>> >> > > >>> >> > > >>> =E2=80=8B >> > > >>> Thanks, >> > > >>> Janardhan >> > > >>> >> > > >> >> > > >> >> > > > >> > > >> > >> > > --f403043c5dd018cf870559d004a9--