Skip to content

MatrixRef::lbegin() fails to compile #418

Open
@devreal

Description

@devreal

Consider the following code snippet:

dash::NArray<int, 2> matrix(dash::size(), N);
int *my_row = matrix[dash::myid()].lbegin();

which gives the following compiler error:

/home/joseph/opt/dash-0.3.0//include/dash/matrix/internal/MatrixRef-inl.h: In instantiation of ‘T* dash::MatrixRef<T, NumDimensions, CUR, PatternT>::lbegin() [with ElementT = int; int NumDimensions = 2; int NumViewDim = 1; PatternT = dash::BlockPattern<2, (dash::MemArrange)1u, long int>]’:
isx.cc:277:63:   required from here
/home/joseph/opt/dash-0.3.0//include/dash/matrix/internal/MatrixRef-inl.h:269:28: error: cannot convert ‘dash::LocalMatrixRef<int, 2, 2, dash::BlockPattern<2, (dash::MemArrange)1u, long int> >::iterator {aka dash::GlobViewIter<int, dash::BlockPattern<2, (dash::MemArrange)1u, long int>, dash::GlobStaticMem<int, dash::allocator::SymmetricAllocator<int> >, dash::GlobPtr<int, dash::GlobStaticMem<int, dash::allocator::SymmetricAllocator<int> > >, dash::GlobRef<int> >}’ to ‘int*’ in return
   return sub_local().begin();

As a workaround, I can probably use matrix.lbegin() for now.

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions