Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit c0aa8270 authored by Emmanuel Thomé's avatar Emmanuel Thomé
Browse files

Merge remote-tracking branch 'origin/shrink-double' into use-relation-cache

parents 90c81334 bf83ece5
Pipeline #212738 passed with stage
in 13 minutes and 52 seconds
......@@ -48,7 +48,7 @@
struct shrink_action {
double row_fraction = 0;
int shrink_factor = 0;
double shrink_factor = 0;
int dl = 0;
gmp_randstate_t rstate;
......@@ -127,7 +127,7 @@ main (int argc, char *argv[])
// param_list_print_command_line(stdout, pl);
//
param_list_parse_int(pl, "shrink-factor", &A.shrink_factor);
param_list_parse_double(pl, "shrink-factor", &A.shrink_factor);
if (A.shrink_factor < 1) {
fprintf(stderr, "Error: shrink factor must be an integer >= 1\n");
param_list_print_usage(pl, argv0, stderr);
......
......@@ -318,7 +318,7 @@ static unsigned long print_fake_rel_manyq(
// std::vector<std::pair<las_todo_entry, std::vector<model_relation> > > const & sample,
std::pair<std::vector<size_t>, std::vector<model_relation>> const & sample,
std::vector<indexrange> const & Ind,
int dl, int shrink_factor,
int dl, double shrink_factor,
gmp_randstate_t buf)
{
/* There's a question of whether we print at each special-q, or only
......@@ -461,7 +461,7 @@ void worker(int tnum, int nt,
// std::vector<std::pair<las_todo_entry, std::vector<model_relation>>> const & sample,
std::pair<std::vector<size_t>, std::vector<model_relation>> const & sample,
std::vector<std::vector<index_t>> const & qs,
int shrink_factor, int dl, unsigned long seed)
double shrink_factor, int dl, unsigned long seed)
{
gmp_randstate_t buf;
gmp_randinit_default(buf);
......@@ -521,7 +521,7 @@ main (int argc, char *argv[])
int compsq = 0;
uint64_t qfac_min = 1024;
uint64_t qfac_max = UINT64_MAX;
int shrink_factor = 1; // by default, no shrink
double shrink_factor = 1; // by default, no shrink
declare_usage(pl);
param_list_configure_switch (pl, "-v", &verbose);
......@@ -582,7 +582,7 @@ main (int argc, char *argv[])
exit(EXIT_FAILURE);
}
param_list_parse_int(pl, "shrink-factor", &shrink_factor);
param_list_parse_double(pl, "shrink-factor", &shrink_factor);
if (shrink_factor < 1) {
fprintf(stderr, "Error: shrink factor must be an integer >= 1\n");
param_list_print_usage(pl, argv0, stderr);
......
......@@ -40,7 +40,7 @@ void indexed_relation_tmpl<Storage>::sort() {
template<typename Storage>
void
indexed_relation_tmpl<Storage>::shrink(int shrink_factor, index_t noshrink_threshold) {
indexed_relation_tmpl<Storage>::shrink(double shrink_factor, index_t noshrink_threshold) {
// Indices below noshrink_threshold are not shrunk
// FIXME: I am not sure we should keep the heavy weight columns
// un-shrunk. The answer might be different in DL and in facto...
......@@ -48,8 +48,8 @@ indexed_relation_tmpl<Storage>::shrink(int shrink_factor, index_t noshrink_thres
for(auto & i : s) {
// if (i >= noshrink_threshold)
if (1) {
i = noshrink_threshold +
(i - noshrink_threshold) / shrink_factor;
i = noshrink_threshold + (index_t)
((i - noshrink_threshold) / shrink_factor);
}
}
}
......
......@@ -84,7 +84,7 @@ struct indexed_relation_tmpl
void sort();
void compress(bool dl);
/* This is used by shrink_rels and fake_rels */
void shrink(int shrink_factor, index_t noshrink_threshold = 0);
void shrink(double shrink_factor, index_t noshrink_threshold = 0);
template<typename T>
friend std::ostream& operator<<(std::ostream&, indexed_relation_tmpl<T> const&);
template<typename T>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment