Ran
Ran

Reputation: 4147

arrayfire flip throws exception

I'm try to flip a matrix of size [249 1 50 20], this is the code:

array flipped_delta = flip(delta, 0);

I get the following exception:

Unhandled exception at 0x00000001801FCA92 (libafcu.dll) in r.exe: 0xC0000094: Integer division by zero.

I try to flip with flip(delta, 2) then I get:

c:\var\lib\hudson\workspace\build-win64-master\jacket\src\cuda\../common/flip.cp
p:47: CUDA runtime error: invalid configuration argument (9)

What am I doing wrong? thanks.

Upvotes: 0

Views: 228

Answers (1)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385325

I don't know ArrayFire, but a quick peek at the documentation suggests that dimension 0 is along the vertical axis, but you have only one row so there's nothing to flip. Consequently this could be a bug in handling that case, where I'd expect a no-op instead.

Try with dimension 1 (horizontal):

array flipped_delta = flip(delta, 1);

Disclaimer: this may or may not actually be how dimension indexes work in ArrayFire.

Upvotes: 3

Related Questions