Change GenericDofMap::cell_dofs(...) return type
Changing the function
const std::vector<dolfin::la_index>& cell_dofs(std::size_t cell_index);
to
const Array<dolfin::la_index>& cell_dofs(std::size_t cell_index);
would allow the underlying (private) storage type to be changed, with Array
just being a view into the data. This can have substantial performance benefits for common cases.
Comments (9)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
Why is there a new
ArrayView
class whileArray
gives the same functionality? -
reporter Because I want ownership to be unambiguous - ArrayView never owns the data.
-
I see, but is it worth maintaining twice an amount of SWIG code?
-
reporter . . . and
Array
deliberately doesn't have a public copy constructor, which means an object of type Array cannot be returned by a function. -
reporter The SWIG code for ArrayView is minimal (much of what is there in the branch will be removed, it was part of trying to get it to 'work').
-
reporter - changed status to resolved
Implemented in f481d7f.
-
- removed milestone
Removing milestone: 1.6 (automated comment)
- Log in to comment