/usr/include/givaro/givmatstoragedense.h is in libgivaro-dev 4.0.2-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | // ==========================================================================
// $Source: /var/lib/cvs/Givaro/src/library/matrix/givmatstoragedense.h,v $
// Copyright(c)'1994-2009 by The Givaro group
// This file is part of Givaro.
// Givaro is governed by the CeCILL-B license under French law
// and abiding by the rules of distribution of free software.
// see the COPYRIGHT file for more details.
// Authors: T. Gautier
// $Id: givmatstoragedense.h,v 1.3 2011-02-02 16:23:56 briceboyer Exp $
// ==========================================================================
// Description:
//
#error "dead code"
#ifndef _GIV_MATRIX_STORAGE_DENSE_H_
#define _GIV_MATRIX_STORAGE_DENSE_H_
#include "givaro/givmatstorage.h"
namespace Givaro {
#pragma message "#warning this file will probably not compile"
// ==========================================================================
// --
// -- Specialization for dense representation, using Array0 of givaro
// --
// ==========================================================================
template<class T>
struct RetMatrixStorage<T,Dense> {
typedef T Type_t;
typedef typename Array0<T>::Indice_t Indice_t;
// --
// -- Iterators on the storage object: linearization
// --
typedef typename Array0<T>::Iterator_t Iterator_t;
typedef typename Array0<T>::constIterator_t constIterator_t;
// --
// -- Storage: row storage organisation
// --
struct Storage_t : public Array0<T> {
Indice_t _nrow;
Indice_t _ncol;
void allocate ( Indice_t nrow, Indice_t ncol)
{ Array0<T>::allocate( nrow*ncol );
_nrow = nrow; _ncol = ncol;
}
Type_t& operator() (Indice_t i, Indice_t j)
{ return Array0<T>::operator[]( i*_ncol+j ); }
const Type_t& operator() (Indice_t i, Indice_t j) const
{ return Array0<T>::operator[]( i*_ncol+j ); }
void reallocate( Indice_t nrow, Indice_t ncol)
{
Storage_t tmp; tmp.allocate(nrow, ncol);
Indice_t i, mrow = (nrow < _nrow ? nrow : _nrow);
Indice_t j, mcol = (ncol < _ncol ? ncol : _ncol);
for (i=0; i<mrow; ++i)
for (j=0; j<mrow; ++j)
tmp(i,j) = (*this)(i,j);
this->logcopy(tmp);
_nrow = nrow; _ncol = ncol;
};
Indice_t nrow() const { return _nrow; }
Indice_t ncol() const { return _ncol; }
};
};
} // givaro
#ifdef GIVARO_USE_SPECIALISED
#ifdef GIVARO_HAVE_LBLAS // -- specialization
// #include "givaro/givmatstoragedense.f.spe" // float
// #include "givaro/givmatstoragedense.d.spe" // double
#endif
#endif
#endif
|