thank you Eric,
I see the point that making dyads would lose access to options. Its a matter
of opinion as to whether the options are useful enough to "need them". My
opinion is that they are not, and we/users who need to optimize calls with
options could "easily" make a "linear cover
instructions in
man_jaf_ 'bench'
mptime 600 gets faster results on init_jaf_ 'cpu' and init_jaf_ 'cuda'
on my system. But that is full round trip to J execution.
If you are keeping results on gpu for further processing, then its faster for
all matrix sizes as arrayfire structures.
This looks really interesting.
My first look at this was mp_bench.ijs example. This produces (on my iMac):
┌┬┐
│ step │ millis │
├┼┤
│mp │3260│
├┼┤
│acreate │708 │
├┼┤
│bcreate │474 │
├┼┤
│matmul
Thanks Eric - this looks very promising!
I managed to get it installed & running on WSL although I needed to amend
the instructions on the arrayfire website somewhat so I could write to
/etc/ld.so.conf.d/
Any thoughts on where the switchover point is at which Arrayfire is
compelling relative to
I think af addon doesn't need include or lib files to run. If dll files
only are mandatory, can these windows dll be downloaded from j software
website and put into a folder under the af addon?
On Fri, 28 Jan 2022 at 5:08 AM Eric Iverson
wrote:
> arrayfire addon updated
>
> * improved init
>
>
I did manage to install it eventually!
Other Windows users might wish to know that I found I needed to load J as an
administrator to avoid failure.
Thanks,
Mike
Sent from my iPad
> On 27 Jan 2022, at 21:07, Eric Iverson wrote:
>
> arrayfire addon updated
>
> * improved init
>
> * support
arrayfire addon updated
* improved init
* support for apple m1
* Pascal's idea that integer lists are better than boxed lists
this required changes in several of the tutorial examples
for example,
q=. af_matmul_jaf_ af1;af2
was changed to
q=. af_matmul_jaf_ af1,af2
* J like dyad
Bill's change will be pushed to addons later today. I will post when the
new version is available.
On Thu, Jan 27, 2022 at 1:11 PM Andreas Lagerås
wrote:
> Hi,
>
> May I ask how you updated it to work with the homebrew arrayfire, or will
> that be fixed in a future version?
>
> Best regards,
>
Well, ... the implementation posted by xash is very nice, but in
http://jsoftware.com/pipermail/programming/2022-January/059790.html
Pawel Jakubas specified that the value appears first, and the index
appears second, and that the indices start with 1 for the first value.
Also, somewhere along the
Hi,
May I ask how you updated it to work with the homebrew arrayfire, or will
that be fixed in a future version?
Best regards,
/Andreas
Den tors 27 jan. 2022 kl 15:23 skrev bill lam :
> I have made a minor update to the addon to allow use arrayfire installed
> via homebrew.
>
> on apple m1
>
I wonder why there’s still so much traffic on this thread
(okay, I’m to blame for quite some of it)
I thought xash published the best correct solution.
Am I wrong?
Am 27.01.22 um 18:42 schrieb 'Mike Day' via Programming:
Pawel Jakubas has moved on to something else in his correspondence,
Pawel Jakubas has moved on to something else in his correspondence, presumably
related to
this topic.
Anyway, I think we need his adjudication, as I don't think Raul Miller's f is
doing what PJ asked
for.
Hauke Rehr's proposal is
hrf =: {{ (,~ {) {. I. (>: x) e."1 +/\ =/~ y }}
My latest
Thanks Julian, this is Good Advice™
My cloumsy answer was meant to say
“that’s not the J way”
without actually spelling that out.
But maybe it didn’t come across.
Sometimes the best answer to “how?” is just “don’t!”
Am 27.01.22 um 15:44 schrieb Julian Fondren:
J doesn't have lexical scope so
Jan-Pieter,
Thanks for your feedback. Your fixes will be in the next version.
I have not tested with opencl and will get to that shortly. I thought of
this as primarily a way to use nvidia gpus. But the cpu support works well
and so probably does opencl.
Not sure where this leads. Probably not
Jan-Pieter,
ArrayFire uses a modified CSR from the wikipedia documentation. Instead of
just counts it has +/\ counts. It also has a leading 0 and a trailing value.
On Thu, Jan 27, 2022 at 3:50 AM Jan-Pieter Jacobs <
janpieter.jac...@gmail.com> wrote:
> Thanks for the explanation Hauke.
> I guess
J doesn't have lexical scope so you're cutting against the grain of the
language to want internal definitions like this. Those internal verbs are also
defined every single time the function is called. The entire APL family of
languages have their own ways of achieving readability and
and the last expression as a "parameterized function" that is adverb instead of
dyad
2 (,^:)~ 1 2 3
1 2 3 1 2 3 1 2 3
On Thursday, January 27, 2022, 09:11:22 a.m. EST, 'Pascal Jasmin' via
Programming wrote:
J has a repeat conjunction ^: A repeat adverb that repeats n times is
Is something like this what you want?
repeat =: 4 : 0
rshowx =. 'This is x inside repeat:',LF, ": x
rshowy =. 'This is y inside repeat:',LF, ": y
f =. [;@#{.@]
d =. y
rshowf =. 'These are x and y for f; and its result:',LF,,LF,.":x
(;;f) d;d
rshowx,LF,rshowy,LF,rshowf
)
3
I have made a minor update to the addon to allow use arrayfire installed via
homebrew.
on apple m1
init_jaf_ 'cpu' and 'opencl' are available but 'opencl' doesn't support double
precision
> On 27 Jan 2022, at 12:42 AM, Eric Iverson wrote:
>
> Apologies for the rough start. The development
J has a repeat conjunction ^: A repeat adverb that repeats n times is (^:n)
or to use x instead of n (^:[)
this won't behave as your original function, but produces the square of x
copies of y. ie. each function call changes/expands y such that the next call
is on the larger y
2 ,~@]^:[
I am wondering how to embed definition of `f` inside `repeat`. so I would
call `x repeat d` and inside this function `x f (d;d)` would be called. On
both levels, repeat and f, we have names x and y.And I wonder what are the
techniques to (a) reuse them at both `repeat` and `f` level, (b) separate
1. To debug a sentence, use Dissect.
2. To print expressions during execution, a quick way is
load'printf' NB. just once per session
qprintf'x '
qprintf'x $y '
The last character of the argument is the delimiter between expressions.
Henry Rich
On 1/27/2022 8:23 AM, Pawel Jakubas wrote:
'only x less than 10 is accepted' assert 0
|only x less than 10 is accepted: assert
| 'only x less than 10 is accepted' assert 0
3 (] $~ [ * $@]) 1 2 3
1 2 3 1 2 3 1 2 3
13 'only x less than 10 accepted'"_`(] $~ [ * $@])@.(10 > [) 1 2 3
only x less than 10 accepted
builtin assert
You can box y, repeat it with dyadic #, and then raze the boxes:
3 ([: ; [#<@]) 'hi'
hihihi
3 ([: ; [#<@]) 1 2 3
1 2 3 1 2 3 1 2 3
3 {{ ; x # wrote:
> Dear J enthusiasts,
>
> I am defining `x repeat y` function, that is appending y to itself x times.
>
> And defined something like
One way to get the simple repeat function is this:
] d =: >: i.3
1 2 3
f =: [ ;@# {.@]
1 f d;d
1 2 3
2 f d;d
1 2 3 1 2 3
3 f d;d
1 2 3 1 2 3 1 2 3
If you don’t call f with d;d but simply with d,
then you can just define
f =: ;@#
which I consider an answer to your question 3.
2. you could try
echo 'this'
and
smoutput 'that'
3. look up the definition of dyadic # (and $)
(or just try it)
4. I don’t know exactly which behavior you want
could you give some example in- and output
of the more general function you’re after?
Am 27.01.22 um 14:23 schrieb Pawel Jakubas:
Dear
Dear J enthusiasts,
I am defining `x repeat y` function, that is appending y to itself x times.
And defined something like below (on intention like that to ask a couple of
questions).
f=: 4 : 0
assert (x < 10)
segment=.>0{y
if. (x = 1) do. (>1{y) else. (x-1) f (segment;( (>1{y),segment) )
Here's how I would modify my implementation to produce an empty result
when a non-duplicate is referenced.
d=: 1 _1 2 3 4 2 5 6 3 8 10 3 2
f=: {{y ({~,]) I. wrote:
>
> Perhaps I should point out that my verb, h (see below), uses a lot of space
> for a large list, especially if there are
Perhaps I should point out that my verb, h (see below), uses a lot of space
for a large list, especially if there are few repeats, as it’s using an outer
product.
I later produced an even more verbose effort which runs in less space on a 10^6
long vector, but takes 3-4x the space & time
I’m away from home, with only a mobile router, so I attempted the downloads at
our son’s house. TalkTalk, my service provider, won’t let me send email from
my laptop using his router, so perhaps it’s stopping the validation, but only
after using up a GB or two of his service! Virus-checker
Thanks for the explanation Hauke.
I guess that shows that I never studied computer science. I expected rows
and cols to just be indices of the non-zero items, as 4&$. returns for J's
sparse arrays.
Anyone else wondering can refer to
https://en.m.wikipedia.org/wiki/Sparse_matrix where the CRS
31 matches
Mail list logo