Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 91b201e0 authored by hhakim's avatar hhakim
Browse files

Fix MacOSX/Linux linking error with the function (in py wrapper) convPyxMHTPParams2FaustMHTPParams.

https://cdash-ci.inria.fr/testDetails.php?test=5280821&build=86356
Traceback (most recent call last):
  File /home/gitlab-runner/builds/2285rg2b/0/faustgrp/faust/misc/test/src/Python//test_pyFaust.py, line 45, in <module>
    import pyfaust
  File /home/gitlab-runner/builds/2285rg2b/0/faustgrp/faust/build_FaustLinuxPython/wrapper/python/pyfaust/__init__.py, line 56, in <module>
    import _FaustCorePy
ImportError: /home/gitlab-runner/builds/2285rg2b/0/faustgrp/faust/build_FaustLinuxPython/wrapper/python/_FaustCorePy.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _Z33convPyxMHTPParams2FaustMHTPParamsIdEN5Faust10MHTPParamsIT_EERK13PyxMHTPParamsIS2_E
parent 319ff6ef
Branches
Tags 3.2.0
No related merge requests found
Pipeline #834030 skipped
......@@ -4,6 +4,10 @@
#include <vector>
#include "faust_MHTP.h"
//TODO: remove using and use fqdn because we are in a header
using namespace std;
using namespace Faust;
class PyxConstraintGeneric
{
......@@ -180,7 +184,7 @@ template<typename FPP>
FaustCoreCpp<FPP>* hierarchical2020(FPP* mat, unsigned int num_rows, unsigned int num_cols, /* unsigned int nites*/PyxStoppingCriterion<double>* sc, PyxConstraintGeneric** constraints, unsigned int num_cons, unsigned int num_facts, double* inout_lambda, bool is_update_way_R2L, bool is_fact_side_left, bool use_csr, bool packing_RL, PyxMHTPParams<FPP> &MHTP_params, unsigned int norm2_max_iter, double norm2_threshold, bool is_verbose, bool constant_step_size, double step_size, const bool full_gpu=false);
template<typename FPP>
Faust::MHTPParams<FPP> convPyxMHTPParams2FaustMHTPParams(const PyxMHTPParams<FPP>& MHTPParams);
MHTPParams<FPP> convPyxMHTPParams2FaustMHTPParams(const PyxMHTPParams<FPP>& MHTPParams);
#include "FaustFact.hpp"
......
......@@ -21,8 +21,6 @@
#endif
using namespace std;
using namespace Faust;
bool PyxConstraintGeneric::is_int_constraint()
{
......@@ -68,6 +66,21 @@ bool PyxConstraintGeneric::is_mat_constraint()
}
}
template<typename FPP>
MHTPParams<FPP> convPyxMHTPParams2FaustMHTPParams(const PyxMHTPParams<FPP>& MHTP_params)
{
Faust::MHTPParams<FPP> _MHTP_params;
_MHTP_params.used = true;
_MHTP_params.constant_step_size = MHTP_params.constant_step_size;
_MHTP_params.step_size = MHTP_params.step_size;
_MHTP_params.updating_lambda = MHTP_params.updating_lambda;
_MHTP_params.palm4msa_period = MHTP_params.palm4msa_period;
auto sc = MHTP_params.stop_crit;
Faust::StoppingCriterion<FPP> sc_(sc.num_its, sc.is_criterion_error, sc.error_threshold, sc.max_num_its);
_MHTP_params.sc = sc_;
return _MHTP_params;
}
template<typename FPP>
int prox_blockdiag(FPP* mat_data, unsigned long mat_nrows, unsigned long mat_ncols, unsigned long *m_ptr, unsigned long *n_ptr, unsigned int vec_size, const bool normalized, const bool pos, FPP* mat_out)
{
......@@ -837,18 +850,5 @@ FaustCoreCpp<FPP>* hierarchical2020_gpu2(FPP* mat, unsigned int num_rows, unsign
return core;
}
template<typename FPP>
Faust::MHTPParams<FPP> convPyxMHTPParams2FaustMHTPParams(const PyxMHTPParams<FPP>& MHTP_params)
{
Faust::MHTPParams<FPP> _MHTP_params;
_MHTP_params.used = true;
_MHTP_params.constant_step_size = MHTP_params.constant_step_size;
_MHTP_params.step_size = MHTP_params.step_size;
_MHTP_params.updating_lambda = MHTP_params.updating_lambda;
_MHTP_params.palm4msa_period = MHTP_params.palm4msa_period;
auto sc = MHTP_params.stop_crit;
Faust::StoppingCriterion<FPP> sc_(sc.num_its, sc.is_criterion_error, sc.error_threshold, sc.max_num_its);
_MHTP_params.sc = sc_;
return _MHTP_params;
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment