/external/libcxx/test/std/numerics/complex.number/ |
D | cases.h | 20 const std::complex<double> testcases[] = 22 std::complex<double>( 1.e-6, 1.e-6), 23 std::complex<double>(-1.e-6, 1.e-6), 24 std::complex<double>(-1.e-6, -1.e-6), 25 std::complex<double>( 1.e-6, -1.e-6), 27 std::complex<double>( 1.e+6, 1.e-6), 28 std::complex<double>(-1.e+6, 1.e-6), 29 std::complex<double>(-1.e+6, -1.e-6), 30 std::complex<double>( 1.e+6, -1.e-6), 32 std::complex<double>( 1.e-6, 1.e+6), [all …]
|
/external/webrtc/webrtc/modules/audio_processing/beamformer/ |
D | complex_matrix_unittest.cc | 21 const complex<float> kValuesInitial[kNumRows][kNumCols] = { in TEST() 22 {complex<float>(1.1f, 1.1f), complex<float>(2.2f, -2.2f), in TEST() 23 complex<float>(3.3f, 3.3f), complex<float>(4.4f, -4.4f)}, in TEST() 24 {complex<float>(5.5f, 5.5f), complex<float>(6.6f, -6.6f), in TEST() 25 complex<float>(7.7f, 7.7f), complex<float>(8.8f, -8.8f)}}; in TEST() 27 const complex<float> kValuesExpected[kNumRows][kNumCols] = { in TEST() 28 {complex<float>(1.1f, -1.1f), complex<float>(2.2f, 2.2f), in TEST() 29 complex<float>(3.3f, -3.3f), complex<float>(4.4f, 4.4f)}, in TEST() 30 {complex<float>(5.5f, -5.5f), complex<float>(6.6f, 6.6f), in TEST() 31 complex<float>(7.7f, -7.7f), complex<float>(8.8f, 8.8f)}}; in TEST() [all …]
|
D | matrix_unittest.cc | 19 using std::complex; 219 const complex<float> kValues[kNumRows][kNumCols] = { in TEST() 220 {complex<float>(-4.f, 0), complex<float>(0, 9), complex<float>(3, -4)}}; in TEST() 221 const complex<float> kValuesExpected[kNumRows][kNumCols] = { in TEST() 222 {complex<float>(0.f, 2.f), complex<float>(2.1213202f, 2.1213202f), in TEST() 223 complex<float>(2.f, -1.f)}}; in TEST() 225 Matrix<complex<float> > operand_mat(*kValues, kNumRows, kNumCols); in TEST() 226 Matrix<complex<float> > expected_result(*kValuesExpected, kNumRows, kNumCols); in TEST() 227 Matrix<complex<float> > actual_result; in TEST() 241 const complex<float> kValues[kNumRows][kNumCols] = { in TEST() [all …]
|
/external/libcxx/include/ |
D | complex | 2 //===--------------------------- complex ----------------------------------===// 15 complex synopsis 21 class complex 26 complex(const T& re = T(), const T& im = T()); // constexpr in C++14 27 complex(const complex&); // constexpr in C++14 28 template<class X> complex(const complex<X>&); // constexpr in C++14 36 complex<T>& operator= (const T&); 37 complex<T>& operator+=(const T&); 38 complex<T>& operator-=(const T&); 39 complex<T>& operator*=(const T&); [all …]
|
/external/python/cpython3/Lib/test/ |
D | test_complex.py | 17 if isinstance(a, complex): 18 if isinstance(b, complex): 25 if isinstance(b, complex): 87 simple_complex = [complex(x, y) for x in simple_real for y in simple_real] 94 self.check_div(complex(1e200, 1e200), 1+0j) 95 self.check_div(complex(1e-200, 1e-200), 1+0j) 99 self.check_div(complex(random(), random()), 100 complex(random(), random())) 102 self.assertRaises(ZeroDivisionError, complex.__truediv__, 1+1j, 0+0j) 106 self.assertAlmostEqual(complex.__truediv__(2+0j, 1+1j), 1-1j) [all …]
|
D | test_cmath.py | 14 complex_zeros = [complex(x, y) for x in [0.0, -0.0] for y in [0.0, -0.0]] 15 complex_infinities = [complex(x, y) for x, y in [ 37 complex_nans = [complex(x, y) for x, y in [ 357 return complex(*polar(z)) 360 arg = complex(ar, ai) 361 expected = complex(er, ei) 395 actual = complex(abs(actual.real), actual.imag) 396 expected = complex(abs(expected.real), expected.imag) 398 actual = complex(actual.real, abs(actual.imag)) 399 expected = complex(expected.real, abs(expected.imag)) [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_complex.py | 21 if isinstance(a, complex): 22 if isinstance(b, complex): 29 if isinstance(b, complex): 95 simple_complex = [complex(x, y) for x in simple_real for y in simple_real] 102 self.check_div(complex(1e200, 1e200), 1+0j) 103 self.check_div(complex(1e-200, 1e-200), 1+0j) 107 self.check_div(complex(random(), random()), 108 complex(random(), random())) 110 self.assertRaises(ZeroDivisionError, complex.__div__, 1+1j, 0+0j) 115 self.assertAlmostEqual(complex.__truediv__(2+0j, 1+1j), 1-1j) [all …]
|
D | test_cmath.py | 10 complex_zeros = [complex(x, y) for x in [0.0, -0.0] for y in [0.0, -0.0]] 11 complex_infinities = [complex(x, y) for x, y in [ 33 complex_nans = [complex(x, y) for x, y in [ 295 return complex(*polar(z)) 298 arg = complex(ar, ai) 299 expected = complex(er, ei) 327 actual = complex(abs(actual.real), actual.imag) 328 expected = complex(abs(expected.real), expected.imag) 330 actual = complex(actual.real, abs(actual.imag)) 331 expected = complex(expected.real, abs(expected.imag)) [all …]
|
/external/eigen/Eigen/src/Core/arch/CUDA/ |
D | Complex.h | 28 …uct scalar_sum_op<const std::complex<T>, const std::complex<T> > : binary_op_base<const std::compl… 29 typedef typename std::complex<T> result_type; 32 …EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<T> operator() (const std::complex<T>& a, const … 33 return std::complex<T>(numext::real(a) + numext::real(b), 38 …ame T> struct scalar_sum_op<std::complex<T>, std::complex<T> > : scalar_sum_op<const std::complex<… 42 …lar_difference_op<const std::complex<T>, const std::complex<T> > : binary_op_base<const std::comp… 43 typedef typename std::complex<T> result_type; 46 …EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE std::complex<T> operator() (const std::complex<T>& a, const … 47 return std::complex<T>(numext::real(a) - numext::real(b), 52 …ct scalar_difference_op<std::complex<T>, std::complex<T> > : scalar_difference_op<const std::compl… [all …]
|
/external/tensorflow/tensorflow/lite/kernels/ |
D | cast_test.cc | 80 m.PopulateTensor<std::complex<float>>( in TEST() 82 {std::complex<float>(1.0f, 11.0f), std::complex<float>(2.0f, 12.0f), in TEST() 83 std::complex<float>(3.0f, 13.0f), std::complex<float>(4.0f, 14.0f), in TEST() 84 std::complex<float>(5.0f, 15.0f), std::complex<float>(6.0f, 16.0f)}); in TEST() 95 m.ExtractVector<std::complex<float>>(m.output()), in TEST() 97 {std::complex<float>(1.0f, 0.0f), std::complex<float>(2.0f, 0.0f), in TEST() 98 std::complex<float>(3.0f, 0.0f), std::complex<float>(4.0f, 0.0f), in TEST() 99 std::complex<float>(5.0f, 0.0f), std::complex<float>(6.0f, 0.0f)})); in TEST() 104 m.PopulateTensor<std::complex<float>>( in TEST() 106 {std::complex<float>(1.0f, 11.0f), std::complex<float>(2.0f, 12.0f), in TEST() [all …]
|
/external/tensorflow/tensorflow/stream_executor/ |
D | blas.h | 188 const DeviceMemory<std::complex<float>> &x, int incx, 191 const DeviceMemory<std::complex<double>> &x, int incx, 202 std::complex<float> alpha, 203 const DeviceMemory<std::complex<float>> &x, int incx, 204 DeviceMemory<std::complex<float>> *y, int incy) = 0; 206 std::complex<double> alpha, 207 const DeviceMemory<std::complex<double>> &x, int incx, 208 DeviceMemory<std::complex<double>> *y, int incy) = 0; 218 const DeviceMemory<std::complex<float>> &x, int incx, 219 DeviceMemory<std::complex<float>> *y, int incy) = 0; [all …]
|
D | stream.h | 725 const DeviceMemory<std::complex<float>> &x, int incx, 728 const DeviceMemory<std::complex<double>> &x, int incx, 742 Stream &ThenBlasAxpy(uint64 elem_count, std::complex<float> alpha, 743 const DeviceMemory<std::complex<float>> &x, int incx, 744 DeviceMemory<std::complex<float>> *y, int incy); 745 Stream &ThenBlasAxpy(uint64 elem_count, std::complex<double> alpha, 746 const DeviceMemory<std::complex<double>> &x, int incx, 747 DeviceMemory<std::complex<double>> *y, int incy); 755 const DeviceMemory<std::complex<float>> &x, int incx, 756 DeviceMemory<std::complex<float>> *y, int incy); [all …]
|
D | stream.cc | 98 string ToVlogString(const std::complex<T> &c) { in ToVlogString() 1936 const DeviceMemory<std::complex<float>> &x, in ThenBlasAsum() 1940 ThenBlasImpl<uint64, const DeviceMemory<std::complex<float>> &, int, in ThenBlasAsum() 1947 const DeviceMemory<std::complex<double>> &x, in ThenBlasAsum() 1951 ThenBlasImpl<uint64, const DeviceMemory<std::complex<double>> &, int, in ThenBlasAsum() 1981 Stream &Stream::ThenBlasAxpy(uint64 elem_count, std::complex<float> alpha, in ThenBlasAxpy() 1982 const DeviceMemory<std::complex<float>> &x, in ThenBlasAxpy() 1983 int incx, DeviceMemory<std::complex<float>> *y, in ThenBlasAxpy() 1988 ThenBlasImpl<uint64, std::complex<float>, in ThenBlasAxpy() 1989 const DeviceMemory<std::complex<float>> &, int, in ThenBlasAxpy() [all …]
|
/external/libcxx/test/std/numerics/complex.number/complex.ops/ |
D | stream_input.pass.cpp | 24 std::complex<double> c; in main() 26 assert(c == std::complex<double>(5, 0)); in main() 31 std::complex<double> c; in main() 33 assert(c == std::complex<double>(5, 0)); in main() 38 std::complex<double> c; in main() 40 assert(c == std::complex<double>(5, 0)); in main() 45 std::complex<double> c; in main() 47 assert(c == std::complex<double>(0, 0)); in main() 52 std::complex<double> c; in main() 54 assert(c == std::complex<double>(5.5, 0)); in main() [all …]
|
/external/webrtc/webrtc/modules/audio_processing/intelligibility/ |
D | intelligibility_utils.h | 33 std::complex<float> zerofudge(std::complex<float> c); 37 std::complex<float> NewMean(std::complex<float> mean, 38 std::complex<float> data, 42 void AddToMean(std::complex<float> data, 44 std::complex<float>* mean); 81 void Step(const std::complex<float>* data, bool skip_fudge = false) { 97 void InfiniteStep(const std::complex<float>* data, bool dummy); 98 void DecayStep(const std::complex<float>* data, bool dummy); 99 void WindowedStep(const std::complex<float>* data, bool dummy); 100 void BlockedStep(const std::complex<float>* data, bool dummy); [all …]
|
D | intelligibility_utils.cc | 22 using std::complex; 39 complex<float> zerofudge(complex<float> c) { in zerofudge() 40 return complex<float>(AddDitherIfZero(c.real()), AddDitherIfZero(c.imag())); in zerofudge() 43 complex<float> NewMean(complex<float> mean, complex<float> data, size_t count) { in NewMean() 47 void AddToMean(complex<float> data, size_t count, complex<float>* mean) { in AddToMean() 58 : running_mean_(new complex<float>[num_freqs]()), in VarianceArray() 59 running_mean_sq_(new complex<float>[num_freqs]()), in VarianceArray() 60 sub_running_mean_(new complex<float>[num_freqs]()), in VarianceArray() 61 sub_running_mean_sq_(new complex<float>[num_freqs]()), in VarianceArray() 71 history_.reset(new rtc::scoped_ptr<complex<float>[]>[num_freqs_]()); in VarianceArray() [all …]
|
/external/eigen/unsupported/test/ |
D | cxx11_tensor_complex_cuda.cu | 23 Tensor<std::complex<float>, 1, 0, int> in1(2); in test_cuda_nullary() 24 Tensor<std::complex<float>, 1, 0, int> in2(2); in test_cuda_nullary() 29 std::size_t complex_bytes = in1.size() * sizeof(std::complex<float>); in test_cuda_nullary() 31 std::complex<float>* d_in1; in test_cuda_nullary() 32 std::complex<float>* d_in2; in test_cuda_nullary() 43 Eigen::TensorMap<Eigen::Tensor<std::complex<float>, 1, 0, int>, Eigen::Aligned> gpu_in1( in test_cuda_nullary() 45 Eigen::TensorMap<Eigen::Tensor<std::complex<float>, 1, 0, int>, Eigen::Aligned> gpu_in2( in test_cuda_nullary() 50 gpu_in1.device(gpu_device) = gpu_in1.constant(std::complex<float>(3.14f, 2.7f)); in test_cuda_nullary() 53 Tensor<std::complex<float>, 1, 0, int> new1(2); in test_cuda_nullary() 64 VERIFY_IS_APPROX(new1(i), std::complex<float>(3.14f, 2.7f)); in test_cuda_nullary() [all …]
|
D | cxx11_tensor_fft.cpp | 29 …Tensor<std::complex<float>, 2, DataLayout> output = input.template fft<Eigen::BothParts, Eigen::FF… in test_fft_2D_golden() 31 std::complex<float> output_golden[6]; // in ColMajor order in test_fft_2D_golden() 32 output_golden[0] = std::complex<float>(21, 0); in test_fft_2D_golden() 33 output_golden[1] = std::complex<float>(-9, 0); in test_fft_2D_golden() 34 output_golden[2] = std::complex<float>(-3, 1.73205); in test_fft_2D_golden() 35 output_golden[3] = std::complex<float>( 0, 0); in test_fft_2D_golden() 36 output_golden[4] = std::complex<float>(-3, -1.73205); in test_fft_2D_golden() 37 output_golden[5] = std::complex<float>(0 ,0); in test_fft_2D_golden() 39 std::complex<float> c_offset = std::complex<float>(1.0, 1.0); in test_fft_2D_golden() 60 Tensor<std::complex<float>, 1, ColMajor> input(5); in test_fft_complex_input_golden() [all …]
|
D | cxx11_tensor_of_complex.cpp | 21 Tensor<std::complex<float>, 1> data1(3); in test_additions() 22 Tensor<std::complex<float>, 1> data2(3); in test_additions() 24 data1(i) = std::complex<float>(i, -i); in test_additions() 25 data2(i) = std::complex<float>(i, 7 * i); in test_additions() 28 Tensor<std::complex<float>, 1> sum = data1 + data2; in test_additions() 30 VERIFY_IS_EQUAL(sum(i), std::complex<float>(2*i, 6*i)); in test_additions() 37 Tensor<std::complex<float>, 1> data1(3); in test_abs() 38 Tensor<std::complex<double>, 1> data2(3); in test_abs() 53 Tensor<std::complex<float>, 1> data1(3); in test_conjugate() 54 Tensor<std::complex<double>, 1> data2(3); in test_conjugate() [all …]
|
/external/tensorflow/tensorflow/stream_executor/rocm/ |
D | rocm_blas.cc | 417 const DeviceMemory<std::complex<float>> &x, int incx, in DoBlasAsum() 425 const DeviceMemory<std::complex<double>> &x, int incx, in DoBlasAsum() 449 std::complex<float> alpha, in DoBlasAxpy() 450 const DeviceMemory<std::complex<float>> &x, int incx, in DoBlasAxpy() 451 DeviceMemory<std::complex<float>> *y, int incy) { in DoBlasAxpy() 458 std::complex<double> alpha, in DoBlasAxpy() 459 const DeviceMemory<std::complex<double>> &x, int incx, in DoBlasAxpy() 460 DeviceMemory<std::complex<double>> *y, int incy) { in DoBlasAxpy() 483 const DeviceMemory<std::complex<float>> &x, int incx, in DoBlasCopy() 484 DeviceMemory<std::complex<float>> *y, int incy) { in DoBlasCopy() [all …]
|
/external/libcxx/test/std/numerics/complex.number/cmplx.over/ |
D | pow.pass.cpp | 40 test(T x, const std::complex<U>& y) in test() 43 static_assert((std::is_same<decltype(std::pow(x, y)), std::complex<V> >::value), ""); in test() 44 assert(std::pow(x, y) == pow(std::complex<V>(x, 0), std::complex<V>(y))); in test() 49 test(const std::complex<T>& x, U y) in test() 52 static_assert((std::is_same<decltype(std::pow(x, y)), std::complex<V> >::value), ""); in test() 53 assert(std::pow(x, y) == pow(std::complex<V>(x), std::complex<V>(y, 0))); in test() 58 test(const std::complex<T>& x, const std::complex<U>& y) in test() 61 static_assert((std::is_same<decltype(std::pow(x, y)), std::complex<V> >::value), ""); in test() 62 assert(std::pow(x, y) == pow(std::complex<V>(x), std::complex<V>(y))); in test() 69 test(T(3), std::complex<U>(4, 5)); in test() [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | cast_op.h | 68 SPECIALIZE_CAST(devname, float, std::complex<double>) \ 69 SPECIALIZE_CAST(devname, std::complex<float>, std::complex<double>) \ 70 SPECIALIZE_CAST(devname, std::complex<float>, double) \ 73 SPECIALIZE_CAST(devname, Eigen::half, std::complex<double>) \ 74 SPECIALIZE_CAST(devname, Eigen::half, std::complex<float>) \ 192 struct LSBZeroSetter<std::complex<I>, std::complex<O>> { 195 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const std::complex<I> operator()( 196 const std::complex<I>& a) const { 205 std::complex<I> toReturn(re, img); 211 struct LSBZeroSetter<std::complex<I>, O> { [all …]
|
/external/eigen/blas/f2c/ |
D | complexdots.c | 21 complex cdotc_(integer *n, complex *cx, integer in cdotc_() 22 *incx, complex *cy, integer *incy) in cdotc_() 24 complex res; in cdotc_() 25 extern /* Subroutine */ int cdotcw_(integer *, complex *, integer *, in cdotc_() 26 complex *, integer *, complex *); in cdotc_() 37 complex cdotu_(integer *n, complex *cx, integer in cdotu_() 38 *incx, complex *cy, integer *incy) in cdotu_() 40 complex res; in cdotu_() 41 extern /* Subroutine */ int cdotuw_(integer *, complex *, integer *, in cdotu_() 42 complex *, integer *, complex *); in cdotu_()
|
/external/tensorflow/tensorflow/stream_executor/cuda/ |
D | cuda_blas.cc | 334 struct CUDADataType<std::complex<Eigen::half>> { 344 struct CUDADataType<std::complex<float>> { 354 struct CUDADataType<std::complex<double>> { 369 struct CUDADataType<std::complex<int8>> { 379 struct CUDADataType<std::complex<uint8>> { 450 const DeviceMemory<std::complex<float>> &x, int incx, in DoBlasAsum() 458 const DeviceMemory<std::complex<double>> &x, int incx, in DoBlasAsum() 482 std::complex<float> alpha, in DoBlasAxpy() 483 const DeviceMemory<std::complex<float>> &x, int incx, in DoBlasAxpy() 484 DeviceMemory<std::complex<float>> *y, int incy) { in DoBlasAxpy() [all …]
|
/external/eigen/Eigen/src/Core/arch/ZVector/ |
D | Complex.h | 38 template<> struct packet_traits<std::complex<float> > : default_packet_traits 63 template<> struct packet_traits<std::complex<double> > : default_packet_traits 86 template<> struct unpacket_traits<Packet2cf> { typedef std::complex<float> type; enum {size=2, ali… 87 template<> struct unpacket_traits<Packet1cd> { typedef std::complex<double> type; enum {size=1, ali… 92 template<> EIGEN_STRONG_INLINE Packet2cf pload <Packet2cf>(const std::complex<float>* from) { EIGE… 93 template<> EIGEN_STRONG_INLINE Packet1cd pload <Packet1cd>(const std::complex<double>* from) { EIGE… 94 template<> EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(const std::complex<float>* from) { EIGE… 95 template<> EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(const std::complex<double>* from) { EIGE… 96 template<> EIGEN_STRONG_INLINE void pstore <std::complex<float> >(std::complex<float> * to, con… 97 template<> EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> * to, con… [all …]
|