0

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.

Ran
  • 4,117
  • 4
  • 44
  • 70
  • Where is your [testcase](http://sscce.org)? – Lightness Races in Orbit Jan 30 '14 at 10:37
  • A testcase of what? it's one line of code. I have a matrix in the given size and I try to flip it. Don't overcomplicate this. – Ran Jan 30 '14 at 11:07
  • 1
    Follow the link to find out. You should have created a self-contained, minimal example that reproduces the issue, for your own debugging, before even posting here. When you _do_ post here, you post the testcase. One line of code is not enough to see what you're doing. What if you're setting the array up wrong? It's not "overcomplicating" anything: believe it or not, I have a little bit of experience both in debugging programming problems and in helping others to do the same. (Another link: http://kera.name/articles/2013/10/nobody-writes-testcases-any-more/) – Lightness Races in Orbit Jan 30 '14 at 11:56

1 Answers1

3

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.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
  • It fails in all dimensions I tried (0,1,2). Seems like you are right and this is a bug. – Ran Jan 30 '14 at 10:58