Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 744b4f61 authored by hhakim's avatar hhakim
Browse files

Minor fix to VS14 compilation issues.

parent 93b0ad24
No related branches found
No related tags found
No related merge requests found
......@@ -606,7 +606,7 @@ const Faust::Vect<FPP,DEVICE>& GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_D(const
template<typename FPP, Device DEVICE, typename FPP2, typename FPP4>
template<typename FPP3>
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_Dspm(MatSparse<FPP3,DEVICE> & spD, const bool ord /* default to false */)
void GivensFGFTGen<FPP,DEVICE,FPP2,FPP4>::get_Dspm(Faust::MatSparse<FPP3,DEVICE> & spD, const bool ord /* default to false */)
{
const Faust::Vect<FPP,DEVICE>& D_ = this->get_D(ord);
vector<int> nat_ord_indices;
......
......@@ -196,7 +196,11 @@ std::list<std::pair<int,int>> Faust::MatDense<FPP,Cpu>::nonzeros_indices() const
{
std::list<std::pair<int,int>> nz_inds;
if(this->is_identity)
#ifdef _MSC_VER
for(int i=0;i<min(this->dim1, this->dim2);i++) // VS14 strange issue with std::min //C2589 or C2059
#else
for(int i=0;i<std::min(this->dim1, this->dim2);i++)
#endif
nz_inds.push_back(std::make_pair(i,i));
else if(! isZeros)
{
......@@ -236,7 +240,11 @@ void Faust::MatDense<FPP,Cpu>::setEyes()
{
setZeros();
FPP* ptr_data = getData();
#ifdef _MSC_VER
for (int i=0;i<min(this->dim1,this->dim2); i++)
#else
for (int i=0;i<std::min(this->dim1,this->dim2); i++)
#endif
ptr_data[i*this->dim1+i] = FPP(1.0);
if (this->dim1 == this->dim2)
this->is_identity = true;
......
......@@ -38,7 +38,12 @@ namespace Faust
isZeros = getNonZeros() == 0;
}
#ifdef _MSC_VER
MatDiag(faust_unsigned_int nrows, faust_unsigned_int ncols, const FPP* data): MatDiag<FPP>(min(nrows,ncols), data)
#else
MatDiag(faust_unsigned_int nrows, faust_unsigned_int ncols, const FPP* data): MatDiag<FPP>(std::min(nrows,ncols), data)
#endif
{
this->dim1 = nrows;
this->dim2 = ncols;
......
......@@ -870,7 +870,8 @@ void Faust::multiply_order_opt_first_best(std::vector<Faust::MatDense<FPP,DEVICE
return;
}
std::vector<int> complexity(nfacts-1);
int min_cplx = std::numeric_limits<int>::max();
// int min_cplx = std::numeric_limits<int>::max(); //doesn't work with VS14
int min_cplx = 1 << 30;
int i, idx, lasti; // idx marks the factor to update with a product of contiguous factors
for(int i = 0; i <nfacts-1; i++)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment