M4RIE  0.20120415
 All Data Structures Files Functions Variables Defines
ple.h
Go to the documentation of this file.
00001 
00008 #ifndef M4RIE_PLE_H
00009 #define M4RIE_PLE_H
00010 
00011 /******************************************************************************
00012 *
00013 *            M4RIE: Linear Algebra over GF(2^e)
00014 *
00015 *    Copyright (C) 2011 Martin Albrecht <martinralbrecht@googlemail.com>
00016 *
00017 *  Distributed under the terms of the GNU General Public License (GEL)
00018 *  version 2 or higher.
00019 *
00020 *    This code is distributed in the hope that it will be useful,
00021 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023 *    General Public License for more details.
00024 *
00025 *  The full text of the GPL is available at:
00026 *
00027 *                  http://www.gnu.org/licenses/
00028 ******************************************************************************/
00029 
00030 #include <m4ri/m4ri.h>
00031 #include "mzed.h"
00032 #include "mzd_slice.h"
00033 #include "conversion.h"
00034 
00055 rci_t mzed_ple_naive(mzed_t *A, mzp_t *P, mzp_t *Q);
00056 
00082 rci_t _mzd_slice_ple(mzd_slice_t *A, mzp_t *P, mzp_t *Q, rci_t cutoff);
00083 
00104 static inline rci_t mzd_slice_ple(mzd_slice_t *A, mzp_t *P, mzp_t *Q) {
00105   assert(P->length == A->nrows);
00106   assert(Q->length == A->ncols);
00107   return _mzd_slice_ple(A, P, Q, 0);
00108 }
00109 
00125 rci_t _mzd_slice_pluq(mzd_slice_t *A, mzp_t *P, mzp_t *Q, rci_t cutoff);
00126 
00141 static inline rci_t mzd_slice_pluq(mzd_slice_t *A, mzp_t *P, mzp_t *Q) {
00142   assert(P->length == A->nrows);
00143   assert(Q->length == A->ncols);
00144   return _mzd_slice_pluq(A, P, Q, 0);
00145 }
00146 
00147 
00173 rci_t _mzed_ple(mzed_t *A, mzp_t *P, mzp_t *Q, rci_t cutoff);
00174 
00179 #define __M4RIE_PLE_CUTOFF (__M4RI_CPU_L2_CACHE<<2)
00180 
00203 static inline rci_t mzed_ple(mzed_t *A, mzp_t *P, mzp_t *Q) {
00204   return _mzed_ple(A, P, Q, __M4RIE_PLE_CUTOFF);
00205 }
00206 
00207 #endif //M4RIE_PLE_H