API: Fixed single-element indexing

This commit is contained in:
Philippe Tillet
2015-10-07 01:13:55 -04:00
parent 2648724217
commit 714e0f5634
4 changed files with 3 additions and 10 deletions

View File

@@ -71,7 +71,7 @@ public:
//scalar
if(a->shape()[0]==1 && a->shape()[1]==1)
{
kernel_.setSizeArg(current_arg_++, a->start()[0]);
kernel_.setSizeArg(current_arg_++, a->start()[0] + a->start()[1]*a->ld());
}
//array
else if(a->shape()[0]>1 && a->shape()[1]==1)