Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1719DE88 for ; Sun, 30 Dec 2012 19:43:59 +0000 (UTC) Received: (qmail 88452 invoked by uid 500); 30 Dec 2012 19:43:58 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 88323 invoked by uid 500); 30 Dec 2012 19:43:58 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 88314 invoked by uid 99); 30 Dec 2012 19:43:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Dec 2012 19:43:58 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.210.173 as permitted sender) Received: from [209.85.210.173] (HELO mail-ia0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Dec 2012 19:43:53 +0000 Received: by mail-ia0-f173.google.com with SMTP id w21so10145410iac.32 for ; Sun, 30 Dec 2012 11:43:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CRsiRh6trL4Yk2VUWngfh5cSqceTw0S5MnyP91zrr5k=; b=iNKu0VQtiqZflsiO4HP7JkiTkrgvr0tA3OibsKJebCuBIrNzwCJMflX06wa8C5qI7Q cWOKCAXO1h9poPPS5Qf4q8pPeY8pWN7gBnYRZfAokE+j5ucn/oDSKkSy6SRGu0x7qLg9 8fSS/YGKJTqPth4UzZK0FLmMYeM9at3J/FFfiHuh/cIQ+sadrBVMtlEuIjjMOqk9q3vr ACy0dfYx8200YNTi0+pPZPSu06y84TXSuHbE5Y2dSHMfMo5b3frg9R1KWqO7SLe0y0rz 40PTaMJxN70jnA3C1TTYoMufZx+i2QMIF1rvHKmqawm5twxAhd6XGKVrKnvAbW84YjLe w4aw== Received: by 10.42.82.136 with SMTP id d8mr30280713icl.31.1356896613061; Sun, 30 Dec 2012 11:43:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.133.137 with HTTP; Sun, 30 Dec 2012 11:43:02 -0800 (PST) In-Reply-To: References: <50DDA635.8080908@spaceroots.org> <50DDBF6B.4040101@spaceroots.org> <50DDC860.7060703@gmail.com> <07E3B3D2-E7AE-4BAB-8872-ED88823B6200@gmail.com> <50DDDDAA.2030106@free.fr> <31C327CF-643E-4DFA-BF53-DD6BF1C6B92E@gmail.com> <2416051E-2130-4EA8-93DF-389D8B95762E@gmail.com> <51532DC6-D84E-40CE-A242-550C481409BD@gmail.com> From: Ted Dunning Date: Sun, 30 Dec 2012 11:43:02 -0800 Message-ID: Subject: Re: [math] major problem with new released version 3.1 To: Commons Developers List Content-Type: multipart/alternative; boundary=90e6ba6140da9e530404d2171c34 X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba6140da9e530404d2171c34 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The GPU requires native code that is executed on the GPU. Standard linear algebra libraries exist for this so if the API can express a standard linear algebra routine concisely, then the GPU can be used. General Java code usually can't be executed on a GPU. There is some late breaking news on this front, but the way to get performance is generally to recognize standard idioms that have accelerated implementations. In Mahout, for instance, we can recognize many linear algebra operations from idiomatic use of visitor patterns. For instance, in this code, Vector u, v; v.assign(Functions.PLUS, u); Mahout will recognize the call to assign as a vector addition. This is easy with vector operations but much harder to recognize matrix operations expressed with simple visitor patterns. On Sun, Dec 30, 2012 at 11:26 AM, S=C3=A9bastien Brisard < sebastien.brisard@m4x.org> wrote: > > and hence preclude vector based process operations, such as you would > find > > on a GPU. So if the user wanted to speed up the computation using a GPU > > they would not be able to do it, if we base it on a single element at a > > time visitor pattern. > > > > > I fail to see how the GPU could not be used. I am no expert on GPU > programming, but I can easily imagine a new implementation of RealVector, > say GpuBasedRealVector, where the walkInDefaultOrder method would send > multiple values at a time to the GPU. I've already done that for multi-co= re > machines (using fork/join), and the visitor pattern was certainly not a > limitation. > --90e6ba6140da9e530404d2171c34--