API: some fixes with 1D slices

This commit is contained in:
Philippe Tillet
2015-10-06 16:34:47 -04:00
parent 8daf13da2e
commit 07b8ba20de
7 changed files with 30 additions and 13 deletions

View File

@@ -419,7 +419,11 @@ void math_expression_representation_functor::append(lhs_rhs_element const & lhs_
{
if(lhs_rhs.subtype==DENSE_ARRAY_TYPE)
{
char prefix = (char)(((int)'0')+((int)(lhs_rhs.array->shape()[0]>1) + (int)(lhs_rhs.array->shape()[1]>1)));
size4 shape = lhs_rhs.array->shape();
char prefix;
if(shape[0]==1 && shape[1]==1) prefix = '0';
else if(shape[0]>1 && shape[1]==1) prefix = '1';
else prefix = '2';
numeric_type dtype = lhs_rhs.array->dtype();
driver::Buffer const & data = lhs_rhs.array->data();