/external/eigen/unsupported/test/ |
D | cxx11_tensor_device.cu | 1 // This file is part of Eigen, a lightweight C++ template library 20 #include <unsupported/Eigen/CXX11/Tensor> 22 using Eigen::Tensor; 23 using Eigen::RowMajor; 27 …CPUContext(const Eigen::Tensor<float, 3>& in1, Eigen::Tensor<float, 3>& in2, Eigen::Tensor<float, … in CPUContext() 40 kernel_3d_(1,0,0) = -1.0f; in CPUContext() 41 kernel_3d_(1,1,0) = -0.3f; in CPUContext() 42 kernel_3d_(1,0,1) = -0.7f; in CPUContext() 43 kernel_3d_(1,1,1) = -0.5f; in CPUContext() 46 const Eigen::DefaultDevice& device() const { return cpu_device_; } in device() [all …]
|
D | cxx11_tensor_cuda.cu | 1 // This file is part of Eigen, a lightweight C++ template library 19 #include <unsupported/Eigen/CXX11/Tensor> 21 using Eigen::Tensor; 38 Eigen::CudaStreamDevice stream; in test_cuda_nullary() 39 Eigen::GpuDevice gpu_device(&stream); in test_cuda_nullary() 41 Eigen::TensorMap<Eigen::Tensor<float, 1, 0, int>, Eigen::Aligned> gpu_in1( in test_cuda_nullary() 43 Eigen::TensorMap<Eigen::Tensor<float, 1, 0, int>, Eigen::Aligned> gpu_in2( in test_cuda_nullary() 69 Tensor<float, 1> in1(Eigen::array<Eigen::DenseIndex, 1>(2)); in test_cuda_elementwise_small() 70 Tensor<float, 1> in2(Eigen::array<Eigen::DenseIndex, 1>(2)); in test_cuda_elementwise_small() 71 Tensor<float, 1> out(Eigen::array<Eigen::DenseIndex, 1>(2)); in test_cuda_elementwise_small() [all …]
|
D | cxx11_tensor_fft.cpp | 1 // This file is part of Eigen, a lightweight C++ template library 11 #include <Eigen/CXX11/Tensor> 13 using Eigen::Tensor; 17 Tensor<float, 2, DataLayout> input(2, 3); in test_fft_2D_golden() 20 input(0, 2) = 3; in test_fft_2D_golden() 29 …Tensor<std::complex<float>, 2, DataLayout> output = input.template fft<Eigen::BothParts, Eigen::FF… 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() [all …]
|
D | cxx11_tensor_argmax_cuda.cu | 1 // This file is part of Eigen, a lightweight C++ template library 19 #include <unsupported/Eigen/CXX11/Tensor> 21 using Eigen::Tensor; 26 Tensor<double, 3, Layout> in(Eigen::array<DenseIndex, 3>(72,53,97)); in test_cuda_simple_argmax() 27 Tensor<DenseIndex, 1, Layout> out_max(Eigen::array<DenseIndex, 1>(1)); in test_cuda_simple_argmax() 28 Tensor<DenseIndex, 1, Layout> out_min(Eigen::array<DenseIndex, 1>(1)); in test_cuda_simple_argmax() 31 in(0, 0, 0) = -1000.0; in test_cuda_simple_argmax() 46 Eigen::CudaStreamDevice stream; in test_cuda_simple_argmax() 47 Eigen::GpuDevice gpu_device(&stream); in test_cuda_simple_argmax() 49 …Eigen::TensorMap<Eigen::Tensor<double, 3, Layout>, Aligned > gpu_in(d_in, Eigen::array<DenseIndex,… in test_cuda_simple_argmax() [all …]
|
D | cxx11_tensor_morphing.cpp | 1 // This file is part of Eigen, a lightweight C++ template library 12 #include <Eigen/CXX11/Tensor> 14 using Eigen::Tensor; 19 Tensor<float, 5> tensor1(2,3,1,7,1); in test_simple_reshape() 22 Tensor<float, 3> tensor2(2,3,7); in test_simple_reshape() 26 Tensor<float, 3>::Dimensions dim1(2,3,7); in test_simple_reshape() 34 for (int j = 0; j < 3; ++j) { in test_simple_reshape() 38 VERIFY_IS_EQUAL(tensor1(i,j,0,k,0), tensor4(i,j+3*k)); in test_simple_reshape() 46 MatrixXf m1(2,3*5*7*11); in test_reshape_in_expr() 47 MatrixXf m2(3*5*7*11,13); in test_reshape_in_expr() [all …]
|
D | cxx11_tensor_scan_cuda.cu | 1 // This file is part of Eigen, a lightweight C++ template library 20 #include <unsupported/Eigen/CXX11/Tensor> 22 using Eigen::Tensor; 29 Tensor<float, 3, DataLayout> t_input(m_size, k_size, n_size); in test_cuda_cumsum() 30 Tensor<float, 3, DataLayout> t_result(m_size, k_size, n_size); in test_cuda_cumsum() 31 Tensor<float, 3, DataLayout> t_result_gpu(m_size, k_size, n_size); in test_cuda_cumsum() 46 Eigen::CudaStreamDevice stream; in test_cuda_cumsum() 47 Eigen::GpuDevice gpu_device(&stream); in test_cuda_cumsum() 49 Eigen::TensorMap<Eigen::Tensor<float, 3, DataLayout> > in test_cuda_cumsum() 50 gpu_t_input(d_t_input, Eigen::array<int, 3>(m_size, k_size, n_size)); in test_cuda_cumsum() [all …]
|
D | cxx11_tensor_thread_pool.cpp | 1 // This file is part of Eigen, a lightweight C++ template library 15 #include <Eigen/CXX11/Tensor> 17 using Eigen::Tensor; 22 Tensor<float, 3> in1(2,3,7); in test_multithread_elementwise() 23 Tensor<float, 3> in2(2,3,7); in test_multithread_elementwise() 24 Tensor<float, 3> out(2,3,7); in test_multithread_elementwise() 29 Eigen::ThreadPool tp(internal::random<int>(3, 11)); in test_multithread_elementwise() 30 Eigen::ThreadPoolDevice thread_pool_device(&tp, internal::random<int>(3, 11)); in test_multithread_elementwise() 34 for (int j = 0; j < 3; ++j) { in test_multithread_elementwise() 45 Tensor<float, 3> in1(2,3,7); in test_multithread_compound_assignment() [all …]
|
/external/tensorflow/tensorflow/core/kernels/ |
D | conv_2d.h | 7 http://www.apache.org/licenses/LICENSE-2.0 19 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 33 const Eigen::PaddingType& padding, 38 // padding_bottom/padding_right when calling Eigen. Eigen expects the tensor 40 output.device(d) = Eigen::SpatialConvolution( 47 typename OutputKernel = const Eigen::NoOpOutputKernel> 53 const Eigen::PaddingType& padding, in operator() 67 col_dilation, Eigen::PaddingType::PADDING_VALID, output_kernel, in operator() 73 struct SpatialConvolution<Device, Eigen::half, OutputKernel> { 75 typename TTypes<Eigen::half, 4>::Tensor output, [all …]
|
D | eigen_pooling.h | 7 http://www.apache.org/licenses/LICENSE-2.0 19 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 22 namespace Eigen { 27 * \brief Applies a max-pooling over a multichannel input image. 30 * width, others in col-major, and the reverse of that in row-major). 34 * others (in col-major, and the reverse of that if the input was row-major). 42 const Eigen::DSizes<typename internal::traits<Input>::Index, 47 const Eigen::array<int, 2>, 52 const Eigen::DSizes<typename internal::traits<Input>::Index, 59 const Eigen::IndexList<Eigen::type2index<1>, Eigen::type2index<2> >, [all …]
|
D | pooling_ops_3d.cc | 7 http://www.apache.org/licenses/LICENSE-2.0 21 #include "third_party/eigen3/Eigen/Core" 22 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 45 typedef Eigen::ThreadPoolDevice CPUDevice; 46 typedef Eigen::GpuDevice GPUDevice; 55 errors::InvalidArgument("tensor_in must be 4-dimensional")); in Pool3dParameters() 57 this->data_format = data_format; in Pool3dParameters() 72 // We only support 3D pooling across plane/width/height. Depthwise in Pool3dParameters() 98 const std::array<int64, 3>& window, in launch() 99 const std::array<int64, 3>& stride, in launch() [all …]
|
D | scan_ops.h | 7 http://www.apache.org/licenses/LICENSE-2.0 19 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 25 typedef Eigen::Index Index; 30 void operator()(const Device& d, typename TTypes<T, 3>::ConstTensor in, in operator() 31 typename TTypes<T, 3>::Tensor out, const Reducer& reducer, in operator() 33 // Perform the reverse ops directly with Eigen, which avoids copying the in operator() 35 Eigen::array<bool, 3> dims; in operator() 48 auto mi = Eigen::internal::scalar_min_op<T>()(a, b); in operator() 49 auto ma = Eigen::internal::scalar_max_op<T>()(a, b); in operator() 51 auto sub = Eigen::internal::scalar_difference_op<T>(); in operator() [all …]
|
/external/tensorflow/tensorflow/core/kernels/image/ |
D | adjust_contrast_op.h | 7 http://www.apache.org/licenses/LICENSE-2.0 18 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 36 const int channels = input.dimension(3); in operator() 38 Eigen::array<int, 4> scalar_broadcast; in operator() 42 scalar_broadcast[3] = channels; in operator() 44 Eigen::array<int, 2> reduction_axis; in operator() 47 Eigen::array<int, 4> broadcast_dims; in operator() 51 broadcast_dims[3] = 1; in operator() 52 Eigen::Tensor<int, 4>::Dimensions reshape_dims; in operator() 56 reshape_dims[3] = channels; in operator() [all …]
|
/external/eigen/doc/ |
D | A05_PortingFrom2To3.dox | 1 namespace Eigen { 12 …Eigen provides <a href="http://eigen.tuxfamily.org/dox-3.2/Eigen2SupportModes.html">Eigen2 support… 13 …till use them by first <a href="http://eigen.tuxfamily.org/dox-3.2/Eigen2ToEigen3.html">porting yo… 17 The USING_PART_OF_NAMESPACE_EIGEN macro has been removed. In Eigen 3, just do: 19 using namespace Eigen; 24 This is the single trickiest change between Eigen 2 and Eigen 3. It only affects code using \c std:… 26 Eigen 2's dot product was linear in the first variable. Eigen 3's dot product is linear in the seco… 31 <tr><th>Eigen 2</th><th>Eigen 3</th></th> 49 <tr><th>Eigen 2</th><th>Eigen 3</th></th> 93 c = a.array().abs().pow(3) * b.array().abs().sin(); [all …]
|
D | QuickStartGuide.dox | 1 namespace Eigen { 7 …ort guide on how to get started with Eigen. It has a dual purpose. It serves as a minimal introduc… 9 \section GettingStartedInstallation How to "install" Eigen? 11 …Eigen, you just need to download and extract Eigen's source code (see <a href="http://eigen.tuxfam… 25 …e to find the Eigen header files. The directory in which you placed Eigen's source code must be in… 27 \code g++ -I /path/to/eigen/ my_program.cpp -o my_program \endcode 29 On Linux or Mac OS X, another option is to symlink or copy the Eigen folder into /usr/local/include… 31 \code g++ my_program.cpp -o my_program \endcode 40 The Eigen header files define many types, but for simple applications it may be enough to use only … 42 …Eigen/Dense header file defines all member functions for the MatrixXd type and related types (see … [all …]
|
/external/tensorflow/tensorflow/python/tools/ |
D | aot_compiled_test.cc | 7 http://www.apache.org/licenses/LICENSE-2.0 18 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 36 ASSERT_NEAR(model.result_fetch_output_0(), 7.0f, /*abs_error=*/1e-6f); in TEST() 46 Eigen::Tensor<float, 2, Eigen::RowMajor> arg_feed_x(3000, 5000); in TEST() 47 Eigen::Tensor<float, 2, Eigen::RowMajor> arg_feed_y(5000, 4000); in TEST() 52 const Eigen::array<Eigen::IndexPair<int>, 1> product_dims = { in TEST() 53 Eigen::IndexPair<int>(1, 0)}; in TEST() 55 const Eigen::Tensor<float, 2, Eigen::RowMajor> expected_output0 = in TEST() 62 /*abs_error=*/1e-6f); in TEST() 65 /*abs_error=*/1e-6f); in TEST() [all …]
|
/external/tensorflow/tensorflow/compiler/xla/service/cpu/ |
D | runtime_fft_impl.h | 7 http://www.apache.org/licenses/LICENSE-2.0 20 #include "third_party/eigen3/Eigen/Core" 21 #include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" 34 IRFFT = 3, // Inverse real FFT; fft_length / 2 + 1 complex in, 41 // Computes either a forward or reverse complex-to-complex FFT. 47 const auto axes = Eigen::ArrayXi::LinSpaced(FFTRank, 1, FFTRank); in EigenFftC2C() 48 constexpr auto direction = Forward ? Eigen::FFT_FORWARD : Eigen::FFT_REVERSE; in EigenFftC2C() 50 const std::array<int64, 3> fft_shape = { in EigenFftC2C() 53 Eigen::DSizes<Eigen::DenseIndex, FFTRank + 1> dims; in EigenFftC2C() 58 const Eigen::TensorMap<Eigen::Tensor<Complex, FFTRank + 1, Eigen::RowMajor>, in EigenFftC2C() [all …]
|
/external/tensorflow/tensorflow/core/util/ctc/ |
D | ctc_beam_search_test.cc | 7 http://www.apache.org/licenses/LICENSE-2.0 43 // The dictionary itself is hard-coded a static const variable of the class. 50 dictionary_({{3}, {3, 1}}) {} in DictionaryBeamScorer() 52 void InitializeState(BeamState* root) const override { root->score = 0; } in InitializeState() 58 to_state->labels.push_back(to_label); in ExpandState() 87 const std::vector<int>& candidate = state->labels; in SetStateScoreAccordingToDict() 96 state->score = std::log(T(1.0)); in SetStateScoreAccordingToDict() 101 state->score = std::log(T(0.01)); in SetStateScoreAccordingToDict() 108 const int top_paths = 3; in ctc_beam_search_decoding_with_and_without_dictionary() 117 // Dictionary decoder, allowing only two dictionary words : {3}, {3, 1}. in ctc_beam_search_decoding_with_and_without_dictionary() [all …]
|
/external/eigen/debug/msvc/ |
D | eigen.natvis | 1 <?xml version="1.0" encoding="utf-8"?> 5 <!-- Fixed x Fixed Matrix --> 6 <Type Name="Eigen::Matrix<*,*,*,*,*,*>"> 7 <AlternativeType Name="Eigen::Array<*,-1,-1,*,*,*>"/> 10 <ArrayItems Condition="Flags%2"> <!-- row major layout --> 15 <ArrayItems Condition="!(Flags%2)"> <!-- column major layout --> 24 <!-- 2 x 2 Matrix --> 25 <Type Name="Eigen::Matrix<*,2,2,*,*,*>"> 26 <AlternativeType Name="Eigen::Array<*,2,2,*,*,*>"/> 36 <DisplayString>({m_storage.m_data.array[2]}, {m_storage.m_data.array[3]})</DisplayString> [all …]
|
D | eigen_autoexp_part.dat | 2 ; * Eigen Visualizer 6 ; * Support the enhanced debugging of the following Eigen 9 ; * - Eigen::Matrix<*,4,1,*,*,*> and Eigen::Matrix<*,1,4,*,*,*> 10 ; * - Eigen::Matrix<*,3,1,*,*,*> and Eigen::Matrix<*,1,3,*,*,*> 11 ; * - Eigen::Matrix<*,2,1,*,*,*> and Eigen::Matrix<*,1,2,*,*,*> 12 ; * - Eigen::Matrix<*,-1,-1,*,*,*> 13 ; * - Eigen::Matrix<*,+,-1,*,*,*> 14 ; * - Eigen::Matrix<*,-1,+,*,*,*> 15 ; * - Eigen::Matrix<*,+,+,*,*,*> 27 ; Fixed size 4-vectors [all …]
|
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/ |
D | README.md | 1 # Eigen Tensors 11 the namespace ```::Eigen.``` 30 // Create a tensor of rank 3 of sizes 2, 3, 4. This tensor owns 31 // memory to hold 24 floating point values (24 = 2 x 3 x 4). 32 Tensor<float, 3> t_3d(2, 3, 4); 35 t_3d = Tensor<float, 3>(3, 4, 3); 41 ```Eigen::array<Eigen::Index>```. The array can be constructed automatically 57 // Create a 4 x 3 tensor of floats. 58 TensorFixedSize<float, Sizes<4, 3>> t_4x3; 76 // Map a tensor of ints on top of stack-allocated storage. [all …]
|
/external/eigen/Eigen/src/Core/arch/CUDA/ |
D | PacketMathHalf.h | 1 // This file is part of Eigen, a lightweight C++ template library 14 namespace Eigen { 22 template<> struct packet_traits<Eigen::half> : default_packet_traits 42 template<> struct unpacket_traits<half2> { typedef Eigen::half type; enum {size=2, alignment=Aligne… 44 template<> __device__ EIGEN_STRONG_INLINE half2 pset1<half2>(const Eigen::half& from) { 48 template<> __device__ EIGEN_STRONG_INLINE half2 pload<half2>(const Eigen::half* from) { 52 template<> __device__ EIGEN_STRONG_INLINE half2 ploadu<half2>(const Eigen::half* from) { 56 template<> EIGEN_STRONG_INLINE half2 ploaddup<half2>(const Eigen::half* from) { 60 template<> __device__ EIGEN_STRONG_INLINE void pstore<Eigen::half>(Eigen::half* to, const half2& fr… 64 template<> __device__ EIGEN_STRONG_INLINE void pstoreu<Eigen::half>(Eigen::half* to, const half2& f… [all …]
|
/external/eigen/test/ |
D | nomalloc.cpp | 1 // This file is part of Eigen, a lightweight C++ template library 5 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com> 17 #include <Eigen/Cholesky> 18 #include <Eigen/Eigenvalues> 19 #include <Eigen/LU> 20 #include <Eigen/QR> 21 #include <Eigen/SVD> 25 /* this test check no dynamic memory allocation are issued with fixed-size matrices in nomalloc() 39 Index r = internal::random<Index>(0, rows-1), in nomalloc() 40 c = internal::random<Index>(0, cols-1); in nomalloc() [all …]
|
/external/tensorflow/tensorflow/core/kernels/boosted_trees/ |
D | tree_helper_test.cc | 7 // http://www.apache.org/licenses/LICENSE-2.0 17 #include "third_party/eigen3/Eigen/Core" 26 const double kDelta = 1e-5; 30 Eigen::VectorXf g(kNumClasses); in TEST() 31 g << 0.5, 0.33, -9, 1; in TEST() 32 Eigen::VectorXf h(kNumClasses * kNumClasses); in TEST() 33 h << 3, 5, 7, 8, 5, 4, 1, 5, 7, 1, 8, 4, 8, 5, 4, 9; in TEST() 36 Eigen::VectorXf weight(kNumClasses); in TEST() 40 -1.5820024}; in TEST() 49 Eigen::VectorXf g(kNumClasses); in TEST() [all …]
|
/external/python/pybind11/tests/ |
D | test_eigen.cpp | 2 tests/eigen.cpp -- automatic conversion of Eigen types 7 BSD-style license that can be found in the LICENSE file. 12 #include <pybind11/eigen.h> 19 #include <Eigen/Cholesky> 21 using MatrixXdR = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>; 26 // (1-based) row/column number. 32 // Returns a static, column-major matrix 33 Eigen::MatrixXd &get_cm() { in get_cm() 34 static Eigen::MatrixXd *x; in get_cm() 36 x = new Eigen::MatrixXd(3, 3); in get_cm() [all …]
|
/external/tensorflow/tensorflow/core/framework/ |
D | tensor_testutil_test.cc | 7 http://www.apache.org/licenses/LICENSE-2.0 29 EXPECT_TRUE(IsClose(Eigen::NumTraits<T>::infinity(), in TestEdgeCasesNear() 30 Eigen::NumTraits<T>::infinity(), 0.0, 0.0)); in TestEdgeCasesNear() 31 EXPECT_TRUE(IsClose(Eigen::NumTraits<T>::lowest(), in TestEdgeCasesNear() 32 Eigen::NumTraits<T>::highest(), in TestEdgeCasesNear() 33 Eigen::NumTraits<double>::infinity(), 0.0)); in TestEdgeCasesNear() 35 IsClose(Eigen::NumTraits<T>::lowest(), Eigen::NumTraits<T>::highest(), in TestEdgeCasesNear() 36 static_cast<double>(Eigen::NumTraits<T>::highest()), 0.0)); in TestEdgeCasesNear() 37 EXPECT_FALSE(IsClose(Eigen::NumTraits<T>::quiet_NaN(), T(0.0), 0.0, 0.0)); in TestEdgeCasesNear() 38 EXPECT_TRUE(IsClose(Eigen::NumTraits<T>::quiet_NaN(), in TestEdgeCasesNear() [all …]
|