This file is indexed.

/usr/include/fflas-ffpack/fflas/fflas_fgemv_mp.inl is in fflas-ffpack-common 2.2.2-5.

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
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* -*- mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
// vim:sts=8:sw=8:ts=8:noet:sr:cino=>s,f0,{0,g0,(0,\:0,t0,+0,=s

/*
 * Copyright (C) 2014 FFLAS-FFPACK group
 *
 * Written by Pascal Giorgi <pascal.giorgi@lirmm.fr>
 *
 *
 * ========LICENCE========
 * This file is part of the library FFLAS-FFPACK.
 *
 * FFLAS-FFPACK is free software: you can redistribute it and/or modify
 * it under the terms of the  GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 * ========LICENCE========
 *.
 */

#ifndef __FFLASFFPACK_fgemv_mp_INL
#define __FFLASFFPACK_fgemv_mp_INL

#include "fflas-ffpack/field/rns-integer-mod.h"

namespace FFLAS {

	
	// specialization of the fgemv function for the field RNSInteger<rns_double>
	inline FFPACK::rns_double::Element_ptr
	fgemv (const FFPACK::RNSInteger<FFPACK::rns_double>& F, const FFLAS_TRANSPOSE ta,
	       const size_t M, const size_t N,
	       const FFPACK::rns_double::Element alpha,
	       FFPACK::rns_double::ConstElement_ptr A, const size_t lda,
	       FFPACK::rns_double::ConstElement_ptr X, const size_t incX,
	        const FFPACK::rns_double::Element beta,
	       FFPACK::rns_double::Element_ptr Y, const size_t incY,
	       MMHelper<FFPACK::RNSInteger<FFPACK::rns_double>, MMHelperAlgo::Classic, ModeCategories::DefaultTag> & H)
	{
		if (M!=0 && N !=0){
			for (size_t i=0;i<F.size();i++)
				fgemv(F.rns()._field_rns[i], ta,
				      M, N,
				      alpha._ptr[i*alpha._stride],
				      A._ptr+i*A._stride, lda,
				      X._ptr+i*X._stride, incX,
				      beta._ptr[i*beta._stride],
				      Y._ptr+i*Y._stride, incY
				      );
		}
		return Y;
	} 

	
	// specialization of the fgemv function for the field RNSIntegerMod<rns_double>
	inline FFPACK::rns_double::Element_ptr
	fgemv (const FFPACK::RNSIntegerMod<FFPACK::rns_double>& F, const FFLAS_TRANSPOSE ta,
	       const size_t M, const size_t N,
	       const FFPACK::rns_double::Element alpha,
	       FFPACK::rns_double::ConstElement_ptr A, const size_t lda,
	       FFPACK::rns_double::ConstElement_ptr X, const size_t incX,
	        const FFPACK::rns_double::Element beta,
	       FFPACK::rns_double::Element_ptr Y, const size_t incY,
	       MMHelper<FFPACK::RNSIntegerMod<FFPACK::rns_double>, MMHelperAlgo::Classic, ModeCategories::DefaultTag> & H)
	{
		//std::cout<<"HERE 1"<<std::endl;
		MMHelper<FFPACK::RNSInteger<FFPACK::rns_double>, MMHelperAlgo::Classic, ModeCategories::DefaultTag >  H2;
		//std::cout<<"HERE 2"<<std::endl;
		fgemv(F.delayed(),ta,M,N,alpha,A,lda,X,incX, beta,Y,incY,H2);
		//std::cout<<"HERE 3"<<std::endl;
		size_t Ydim = (ta == FflasNoTrans)?M:N;
		freduce (F, Ydim, Y, incY);
		return Y;
	}

    
	// BB hack. might not work.
    // Calling fgemm, TODO: really specialize fgemv
	// specialization of the fgemv function for the field Givaro::ZRing<Givaro::Integer>
	inline Givaro::Integer* fgemv (const Givaro::ZRing<Givaro::Integer>& F,
				       const FFLAS_TRANSPOSE ta,
				       const size_t m, const size_t n,
				       const Givaro::Integer alpha,
				       Givaro::Integer* A, const size_t lda,
				       Givaro::Integer* X, const size_t ldx,
				       Givaro::Integer beta,
				       Givaro::Integer* Y, const size_t ldy,
				       MMHelper<Givaro::ZRing<Givaro::Integer>, MMHelperAlgo::Classic, ModeCategories::ConvertTo<ElementCategories::RNSElementTag> > & H)
	{
		MMHelper<Givaro::ZRing<Givaro::Integer>, MMHelperAlgo::Classic, ModeCategories::ConvertTo<ElementCategories::RNSElementTag>, ParSeqHelper::Sequential> H2;
		fgemm(F,ta,FFLAS::FflasNoTrans, (ta==FFLAS::FflasNoTrans)?m:n, 1,(ta==FFLAS::FflasNoTrans)?n:m, alpha,A,lda,X,ldx,beta,Y,ldy,H2);
		return Y;
	}

	// specialization of the fgemv function for the field Givaro::Modular<Givaro::Integer>
    // Calling fgemm, TODO: really specialize fgemv
	inline Givaro::Integer* fgemv (const Givaro::Modular<Givaro::Integer>& F,
				       const FFLAS_TRANSPOSE ta,
				       const size_t m, const size_t n,
				       const Givaro::Integer alpha,
				       Givaro::Integer* A, const size_t lda,
				       Givaro::Integer* X, const size_t ldx,
				       Givaro::Integer beta,
				       Givaro::Integer* Y, const size_t ldy,
				       MMHelper<Givaro::Modular<Givaro::Integer>, MMHelperAlgo::Classic, ModeCategories::ConvertTo<ElementCategories::RNSElementTag> > & H)
	{
		MMHelper<Givaro::Modular<Givaro::Integer>, MMHelperAlgo::Classic, ModeCategories::ConvertTo<ElementCategories::RNSElementTag>, ParSeqHelper::Sequential> H2;
		fgemm(F,ta,FFLAS::FflasNoTrans,(ta==FFLAS::FflasNoTrans)?m:n,1,(ta==FFLAS::FflasNoTrans)?n:m,alpha,A,lda,X,ldx,beta,Y,ldy,H2);
		return Y;
	}


} // end namespace FFLAS 

#endif