Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9c8752a1 authored by hhakim's avatar hhakim
Browse files

Add a generic conj function that returns the same type as in input contrary to std::conj.

parent d31e9e04
No related branches found
No related tags found
No related merge requests found
#include "faust_conj.h"
#include <complex>
namespace Faust
{
template<>
double conj<double>(const double& e)
{
return std::conj(e).real();
}
template<>
float conj<float>(const float& e)
{
return std::conj(e).real();
}
template<>
std::complex<double> conj<std::complex<double>>(const std::complex<double>& e)
{
return std::conj(e);
}
template<>
std::complex<float> conj<std::complex<float>>(const std::complex<float>& e)
{
return std::conj(e);
}
}
#include "faust_constant.h"
namespace Faust {
template<typename FPP>
void conjugate(FPP* elts, faust_unsigned_int n);
template<typename FPP>
FPP conj(const FPP & e);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment