assert(A->offset == 0)

15 views
Skip to first unread message

Martin Albrecht

unread,
Aug 9, 2013, 8:06:51 AM8/9/13
to m4ri-...@googlegroups.com
Hi all,

I've created a new branch in the M4RI repository called 'nooffset' which
removes the offset attribute for matrices (mzd_t). The idea behind this is
that removing this attribute

(a) makes the codebase smaller (no more special cases for A->offset != 0),

(from SLOCCOUNT 8,147 to 7,531)

(b) makes the code easier to read and

(c) has almost no effect on features.

I think not having A->offset is more natural and I think we should attempt to
make the code base as easy to understand as possible (without compromising
performance or features too much).

Of course, a downside is that this prevents us from perhaps implementing
algorithms in the future which need A->offset, such as Cléments dual CUP/PLE
decomposition.

What do you all think?

Cheers,
Martin


--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6532AFB4
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinr...@jabber.ccc.de
signature.asc

Carlo Wood

unread,
Aug 10, 2013, 3:40:07 PM8/10/13
to m4ri-...@googlegroups.com, martinr...@googlemail.com
I think this feature exists for internal reasons?
Ie, having a larger matrix, it can happen that a
sub matrix has an offset. Doing an operation on
that submatrix will require copying it first if
you remove this feature.
--
Carlo Wood <ca...@alinoe.com>

Martin Albrecht

unread,
Aug 11, 2013, 9:28:17 AM8/11/13
to M4ri Development
Hi all,

sure, that's why we introduced it back in the day. But I am saying that our
algorithms - as they are currently implemented - do not need this, they are
happy to work with A->offset = 0. The only exception is TRSM when going from
PLUQ to RREF. But that can easily be worked around. Of course, there's no
guarantee that we won't need it in the future but my gut feeling is that it
can be avoided in most cases.

Cheers,
Martin
signature.asc
Reply all
Reply to author
Forward
0 new messages