00001 // Copyright (C) 2011 CNRS - Ecole Polytechnique - INRIA. 00002 // 00003 // This file is part of TIFA. 00004 // 00005 // TIFA is free software; you can redistribute it and/or modify it under the 00006 // terms of the GNU Lesser General Public License as published by the Free 00007 // Software Foundation; either version 2.1 of the License, or (at your option) 00008 // any later version. 00009 // 00010 // TIFA is distributed in the hope that it will be useful, but WITHOUT ANY 00011 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 00013 // more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this library; if not, write to the Free Software Foundation, 00017 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 00049 #if !defined(_TIFA_SQUFOF_H_) 00050 00054 #define _TIFA_SQUFOF_H_ 00055 00056 #include <stdlib.h> 00057 #include <gmp.h> 00058 00059 #include "array.h" 00060 #include "factoring_machine.h" 00061 #include "exit_codes.h" 00062 00063 #ifdef __cplusplus 00064 extern "C" { 00065 #endif 00066 00079 struct struct_squfof_params_t { 00083 unsigned int _dummy_variable_; 00084 }; 00085 00090 typedef struct struct_squfof_params_t squfof_params_t; 00091 00092 00106 void set_squfof_params_to_default(squfof_params_t* const params); 00107 00145 ecode_t squfof( 00146 mpz_array_t* const factors, 00147 uint32_array_t* const multis, 00148 const mpz_t n, 00149 const squfof_params_t* const params, 00150 const factoring_mode_t mode 00151 ); 00152 00153 double squfof_get_elapsed_fwd(); 00154 double squfof_get_elapsed_rev(); 00155 00156 00157 #ifdef __cplusplus 00158 } 00159 #endif 00160 00161 #endif