Path: news.mathworks.com!not-for-mail
From: Edric M Ellis <eellis@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: histc for gpu
Date: Fri, 07 Mar 2014 16:40:19 +0000
Organization: The Mathworks, Ltd.
Lines: 17
Message-ID: <ytwvbvqq7ws.fsf@uk-eellis-deb7-64.dhcp.mathworks.com>
References: <lc1a97$6tt$1@newscl01ah.mathworks.com>
	<ytweh2y9q0d.fsf@uk-eellis-deb7-64.dhcp.mathworks.com>
	<lfclvs$cei$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: uk-eellis-deb7-64.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: newscl01ah.mathworks.com 1394210419 2800 172.16.21.215 (7 Mar 2014 16:40:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 7 Mar 2014 16:40:19 +0000 (UTC)
X-Face: $Ahg}Iylezql"r1WV1Me5&)ng"a4v%D>==KMs-elCfj"o}$bh-VOt7lVXgLWsC?9mZ`mINT
 G6PDvca;nrgs$lfcr0l1ew'N]>nXKl}m|Zpg>,6*gLp~-N0N2*+b.iwv=u>@R$L4SEG&NYUU;lSR@u
 IHphdAy
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Cancel-Lock: sha1:4nU7m/ixoU3v6zbT0dsA+MxqEp4=
Xref: news.mathworks.com comp.soft-sys.matlab:810442

"Christian " <proechri@umich.edu> writes:

> I'm using Matlab 2013b, so not sure why it doesn't work. I just discovered
> another part of my algorithm that could benefit from histc. So having a gpu
> version of it would be great. 

Hi Christian,

It's crucial that your 'bindata' function is a nested function inside
your main function. You can only index into "up-level" variables - this
is the only way that you can access the whole value of an array from
within your arrayfun function. If you look back at my original posting,
that's what I did. 

Cheers,

Edric.