[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: small problem with LuaJIT FFI and gc method
- From: Francesco Abbate <francesco.bbt@...>
- Date: Fri, 18 Mar 2011 21:00:04 +0100
2011/3/18 Leo Razoumov <email@example.com>:
> On Thu, Mar 17, 2011 at 17:08, Francesco Abbate <firstname.lastname@example.org> wrote:
>> Probably the distinction between matrix and view is done in GSL just
>> to enforce the clarity and readability in the code but I'm not
>> entirely sure that it is actually a good idea.
> In GSL, the difference between matrix and matrix_view is the ownership
> semantics. matrix_veiw does not own a data block (owner flag is always
> 0) and cannot deallocate a matrix. It is used when you want to
> temporarily work with sub-matrixes or treat a matrix as a vector or
> vice versa.
I understand that but in the gsl_matrix and gsl_vector struct we have
a field that indicates if the matrix is the owner of the block or not
so the dinstictions between a matrix and a view seems to be purely
But this is quite OT now... I fear the most people in the list are not
interested to this discussion.