Skip to content

Commit

Permalink
* Update TODO
Browse files Browse the repository at this point in the history
* Make BLAS1::head(DenseZeroOne) much faster by looking at one word at a time
  • Loading branch information
hovinen committed Jun 23, 2011
1 parent 4698db9 commit 47c7b18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ In general:
∘ BitSubvector::word_iterator::operator = not copying _ref._m.full, so _ref._m not always properly initialised
∘ When BitSubvector has length == WordTraits::bits and is word-aligned, word_end_reference::mask == 0 while wordBegin () == wordEnd ()
∘ BitSubvector::word_iterator::operator + called constructor without passing _shift
∘ BLAS1::head(DenseZeroOneVector) not checking back_word ()
• Create trait for matrices which support writable submatrices -- then GaussJordan can be made more generic
• Import F4-solver into LinBox and introduce as method for EchelonForm
• Way to configure intermediate matrix-types used by F4Solver
Expand Down
15 changes: 11 additions & 4 deletions linbox/blas/level1-gf2.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -609,16 +609,23 @@ inline int head_in_word (word v)
template <class reference, class Vector>
int head_impl (const GF2 &F, GenericModule &M, reference &a, const Vector &x, VectorCategories::DenseZeroOneVectorTag)
{
// FIXME: This can be made faster...
typename Vector::const_iterator i;
typename Vector::const_word_iterator i;
size_t idx;

for (i = x.begin (); i != x.end (); ++i) {
for (i = x.word_begin (), idx = 0; i != x.word_end (); ++i, ++idx) {
if (*i) {
a = true;
return i - x.begin ();
return head_in_word<typename Vector::word_type, typename Vector::Endianness> (*i) +
(idx << WordTraits<typename Vector::word_type>::logof_size);
}
}

if (x.back_word ()) {
a = true;
return head_in_word<typename Vector::word_type, typename Vector::Endianness> (x.back_word ()) +
(idx << WordTraits<typename Vector::word_type>::logof_size);
}

return -1;
}

Expand Down

0 comments on commit 47c7b18

Please sign in to comment.