Home
last modified time | relevance | path

Searched refs:NumDims (Results 1 – 25 of 58) sorted by relevance

123

/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorPadding.h88 static const int NumDims = internal::array_size<PaddingDimensions>::value;
89 typedef DSizes<Index, NumDims> Dimensions;
109 EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
113 for (int i = 0; i < NumDims; ++i) {
120 for (int i = 1; i < NumDims; ++i) {
124 m_outputStrides[NumDims] = m_outputStrides[NumDims-1] * m_dimensions[NumDims-1];
126 m_inputStrides[NumDims - 1] = 1;
127 m_outputStrides[NumDims] = 1;
128 for (int i = NumDims - 2; i >= 0; --i) {
151 for (int i = NumDims - 1; i > 0; --i) {
[all …]
DTensorBroadcasting.h100 …static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensi…
101 typedef DSizes<Index, NumDims> Dimensions;
121 EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
124 for (int i = 0; i < NumDims; ++i) {
132 for (int i = 1; i < NumDims; ++i) {
137 m_inputStrides[NumDims-1] = 1;
138 m_outputStrides[NumDims-1] = 1;
139 for (int i = NumDims-2; i >= 0; --i) {
174 for (int i = NumDims - 1; i > 0; --i) {
204 for (int i = 0; i < NumDims - 1; ++i) {
[all …]
DTensorConcatenation.h114 …static const int NumDims = internal::array_size<typename TensorEvaluator<LeftArgType, Device>::Dim…
116 typedef DSizes<Index, NumDims> Dimensions;
130 …t) == static_cast<int>(TensorEvaluator<RightArgType, Device>::Layout) || NumDims == 1), YOU_MADE_A…
131 EIGEN_STATIC_ASSERT((NumDims == RightNumDims), YOU_MADE_A_PROGRAMMING_MISTAKE);
132 EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
134 eigen_assert(0 <= m_axis && m_axis < NumDims);
147 for (++i; i < NumDims; ++i) {
159 for (int j = 1; j < NumDims; ++j) {
165 m_leftStrides[NumDims - 1] = 1;
166 m_rightStrides[NumDims - 1] = 1;
[all …]
DTensorPatch.h85 …static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensi…
86 typedef DSizes<Index, NumDims> Dimensions;
108 for (int i = 0; i < NumDims-1; ++i) {
112 m_dimensions[NumDims-1] = num_patches;
116 for (int i = 1; i < NumDims-1; ++i) {
121 for (int i = 1; i < NumDims; ++i) {
125 for (int i = 0; i < NumDims-1; ++i) {
131 m_inputStrides[NumDims-2] = 1;
132 m_patchStrides[NumDims-2] = 1;
133 for (int i = NumDims-3; i >= 0; --i) {
[all …]
DTensorStriding.h104 …static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensi…
105 typedef DSizes<Index, NumDims> Dimensions;
123 for (int i = 0; i < NumDims; ++i) {
131 for (int i = 1; i < NumDims; ++i) {
136 m_inputStrides[NumDims-1] *= op.strides()[NumDims-1];
138 m_outputStrides[NumDims-1] = 1;
139 m_inputStrides[NumDims-1] = 1;
140 for (int i = NumDims - 2; i >= 0; --i) {
173 for (int i = NumDims - 1; i > 0; --i) {
184 for (int i = 0; i < NumDims - 1; ++i) {
[all …]
DTensorInflation.h82 …static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensi…
83 typedef DSizes<Index, NumDims> Dimensions;
103 for (int i = 0; i < NumDims; ++i) {
108 for (int i = 0; i < NumDims; ++i) {
116 for (int i = 1; i < NumDims; ++i) {
121 m_outputStrides[NumDims-1] = 1;
122 m_inputStrides[NumDims-1] = 1;
123 for (int i = NumDims - 2; i >= 0; --i) {
147 for (int i = NumDims - 1; i > 0; --i) {
161 for (int i = 0; i < NumDims - 1; ++i) {
[all …]
DTensorDimensions.h260 template <typename DenseIndex, int NumDims>
261 struct DSizes : array<DenseIndex, NumDims> {
262 typedef array<DenseIndex, NumDims> Base;
263 static const int count = NumDims;
266 return NumDims;
270 return (NumDims == 0) ? 1 : internal::array_prod(*static_cast<const Base*>(this));
274 for (int i = 0 ; i < NumDims; ++i) {
278 EIGEN_DEVICE_FUNC explicit DSizes(const array<DenseIndex, NumDims>& a) : Base(a) { }
281 eigen_assert(NumDims == 1);
288 EIGEN_STATIC_ASSERT(sizeof...(otherDimensions) + 2 == NumDims, YOU_MADE_A_PROGRAMMING_MISTAKE)
[all …]
DTensorShuffling.h104 …static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensi…
105 typedef DSizes<Index, NumDims> Dimensions;
124 for (int i = 0; i < NumDims; ++i) {
128 array<Index, NumDims> inputStrides;
133 for (int i = 1; i < NumDims; ++i) {
138 inputStrides[NumDims - 1] = 1;
139 m_outputStrides[NumDims - 1] = 1;
140 for (int i = NumDims - 2; i >= 0; --i) {
146 for (int i = 0; i < NumDims; ++i) {
181 const double compute_cost = NumDims * (2 * TensorOpCost::AddCost<Index>() +
[all …]
DTensorMorphing.h309 static const int NumDims = internal::array_size<Sizes>::value;
332 for (int i = 1; i < NumDims; ++i) {
338 for (int i = 1; i < NumDims; ++i) {
343 m_inputStrides[NumDims-1] = 1;
344 for (int i = NumDims - 2; i >= 0; --i) {
349 m_outputStrides[NumDims-1] = 1;
350 for (int i = NumDims - 2; i >= 0; --i) {
371 for (int i = 0; i < NumDims; ++i) {
378 for (int i = NumDims-1; i >= 0; --i) {
418 for (int i = NumDims - 1; i > 0; --i) {
[all …]
DTensorReverse.h105 static const int NumDims = internal::array_size<ReverseDimensions>::value;
106 typedef DSizes<Index, NumDims> Dimensions;
125 EIGEN_STATIC_ASSERT((NumDims > 0), YOU_MADE_A_PROGRAMMING_MISTAKE);
131 for (int i = 1; i < NumDims; ++i) {
135 m_strides[NumDims-1] = 1;
136 for (int i = NumDims - 2; i >= 0; --i) {
158 for (int i = NumDims - 1; i > 0; --i) {
172 for (int i = 0; i < NumDims - 1; ++i) {
180 if (m_reverse[NumDims-1]) {
181 inputIndex += (m_dimensions[NumDims-1] - index - 1);
[all …]
DTensorConvolution.h30 array<Index, NumDims> dimensions = input_dims; in IndexMapper()
39 array<Index, NumDims> inputStrides; in IndexMapper()
40 array<Index, NumDims> outputStrides; in IndexMapper()
44 for (int i = 1; i < NumDims; ++i) { in IndexMapper()
49 inputStrides[NumDims - 1] = 1; in IndexMapper()
50 outputStrides[NumDims - 1] = 1; in IndexMapper()
51 for (int i = static_cast<int>(NumDims) - 2; i >= 0; --i) { in IndexMapper()
57 array<Index, NumDims> cudaInputDimensions; in IndexMapper()
58 array<Index, NumDims> cudaOutputDimensions; in IndexMapper()
59 array<Index, NumDims> tmp = dimensions; in IndexMapper()
[all …]
DTensorGenerator.h86 static const int NumDims = internal::array_size<Dimensions>::value;
107 for (int i = 1; i < NumDims; ++i) {
111 m_strides[NumDims - 1] = 1;
112 for (int i = NumDims - 2; i >= 0; --i) {
128 array<Index, NumDims> coords;
160 void extract_coordinates(Index index, array<Index, NumDims>& coords) const {
162 for (int i = NumDims - 1; i > 0; --i) {
169 for (int i = 0; i < NumDims - 1; ++i) {
174 coords[NumDims-1] = index;
179 array<Index, NumDims> m_strides;
DTensorImagePatch.h156 static const int NumDims = NumInputDims + 1;
157 typedef DSizes<Index, NumDims> Dimensions;
177 EIGEN_STATIC_ASSERT((NumDims >= 4), YOU_MADE_A_PROGRAMMING_MISTAKE);
261 for (int i = 4; i < NumDims; ++i) {
271 m_dimensions[NumDims-1] = input_dims[NumInputDims-1];
272 m_dimensions[NumDims-2] = op.patch_rows();
273 m_dimensions[NumDims-3] = op.patch_cols();
274 m_dimensions[NumDims-4] = m_outputRows * m_outputCols;
275 for (int i = NumDims-5; i >= 0; --i) {
286 m_colStride = m_dimensions[NumDims-2];
[all …]
DTensorVolumePatch.h171 static const int NumDims = NumInputDims + 1;
172 typedef DSizes<Index, NumDims> Dimensions;
190 EIGEN_STATIC_ASSERT((NumDims >= 5), YOU_MADE_A_PROGRAMMING_MISTAKE);
281 for (int i = 5; i < NumDims; ++i) {
292 m_dimensions[NumDims-1] = input_dims[NumInputDims-1];
293 m_dimensions[NumDims-2] = op.patch_planes();
294 m_dimensions[NumDims-3] = op.patch_rows();
295 m_dimensions[NumDims-4] = op.patch_cols();
296 m_dimensions[NumDims-5] = m_outputPlanes * m_outputRows * m_outputCols;
297 for (int i = NumDims-6; i >= 0; --i) {
[all …]
DTensorFunctors.h448 template <typename T, typename Index, size_t NumDims>
453 EIGEN_DEVICE_FUNC GaussianGenerator(const array<T, NumDims>& means,
454 const array<T, NumDims>& std_devs)
457 for (size_t i = 0; i < NumDims; ++i) {
462 EIGEN_DEVICE_FUNC T operator()(const array<Index, NumDims>& coordinates) const {
464 for (size_t i = 0; i < NumDims; ++i) {
472 array<T, NumDims> m_means;
473 array<T, NumDims> m_two_sigmas;
476 template <typename T, typename Index, size_t NumDims>
477 struct functor_traits<GaussianGenerator<T, Index, NumDims> > {
[all …]
DTensorArgMax.h84 static const int NumDims = internal::array_size<Dimensions>::value;
210 static const int NumDims = internal::array_size<InputDimensions>::value;
211 typedef array<Index, NumDims> StrideDims;
230 m_stride_mod = (m_return_dim < NumDims - 1) ? m_strides[m_return_dim + 1] : total_size;
270 eigen_assert(m_return_dim < NumDims &&
277 for (int i = 1; i < NumDims; ++i) {
281 strides[NumDims-1] = 1;
282 for (int i = NumDims - 2; i >= 0; --i) {
DTensorCustomOp.h84 static const int NumDims = internal::traits<ArgType>::NumDimensions;
85 typedef DSizes<Index, NumDims> Dimensions;
145 TensorMap<Tensor<CoeffReturnType, NumDims, Layout, Index> > result(
240 static const int NumDims = internal::traits<XprType>::NumDimensions;
241 typedef DSizes<Index, NumDims> Dimensions;
300 TensorMap<Tensor<Scalar, NumDims, Layout> > result(data, m_dimensions);
DTensorLayoutSwap.h115 …static const int NumDims = internal::array_size<typename TensorEvaluator<ArgType, Device>::Dimensi…
116 typedef DSizes<Index, NumDims> Dimensions;
129 for(int i = 0; i < NumDims; ++i) {
130 m_dimensions[i] = m_impl.dimensions()[NumDims-1-i];
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/
Deigen_spatial_convolutions.h115 const int NumDims = internal::traits<Input>::NumDimensions; variable
138 isColMajor ? in.dimension(1) : in.dimension(NumDims - 2);
140 isColMajor ? in.dimension(2) : in.dimension(NumDims - 3);
170 for (int i = 3; i < NumDims; ++i) {
176 for (int i = 0; i < NumDims - 3; ++i) {
187 DSizes<TensorIndex, NumDims> post_contract_dims;
192 for (int i = 3; i < NumDims; ++i) {
196 post_contract_dims[NumDims - 1] = kernelFilters;
197 post_contract_dims[NumDims - 2] = out_height;
198 post_contract_dims[NumDims - 3] = out_width;
[all …]
/external/tensorflow/tensorflow/core/kernels/
Deigen_backward_spatial_convolutions.h122 static const int NumDims = internal::traits<OutputBackward>::NumDimensions; variable
146 : output_backward.dimension(NumDims - 2);
149 : output_backward.dimension(NumDims - 3);
231 for (int i = 3; i < NumDims; ++i) {
237 for (int i = 0; i < NumDims - 3; ++i) {
255 DSizes<TensorIndex, NumDims> post_contract_dims;
260 for (int i = 3; i < NumDims; ++i) {
264 post_contract_dims[NumDims - 1] = kernelChannels;
265 post_contract_dims[NumDims - 2] = inputRows;
266 post_contract_dims[NumDims - 3] = inputCols;
[all …]
Deigen_backward_cuboid_convolutions.h112 static const int NumDims = internal::traits<OutputBackward>::NumDimensions; variable
129 isColMajor ? out.dimensions()[1] : out.dimensions()[NumDims - 2];
131 isColMajor ? out.dimensions()[2] : out.dimensions()[NumDims - 3];
133 isColMajor ? out.dimensions()[3] : out.dimensions()[NumDims - 4];
230 for (int i = 4; i < NumDims; ++i) {
237 for (int i = 0; i < NumDims - 4; ++i) {
255 DSizes<TensorIndex, NumDims> post_contract_dims;
261 for (int i = 4; i < NumDims; ++i) {
265 post_contract_dims[NumDims - 1] = kernelChannels;
266 post_contract_dims[NumDims - 2] = inputPlanes;
[all …]
Deigen_volume_patch.h33 static constexpr int NumDims = NumInputDims + 1; member
34 typedef DSizes<Index, NumDims> Dimensions;
48 CoordAccess = NumDims == 6,
55 EIGEN_STATIC_ASSERT(NumDims >= 5, YOU_MADE_A_PROGRAMMING_MISTAKE); in CustomTensorEvaluator()
171 for (int i = 5; i < NumDims; ++i) { in CustomTensorEvaluator()
182 m_dimensions[NumDims - 1] = input_dims[NumInputDims - 1]; in CustomTensorEvaluator()
183 m_dimensions[NumDims - 2] = op.patch_planes(); in CustomTensorEvaluator()
184 m_dimensions[NumDims - 3] = op.patch_rows(); in CustomTensorEvaluator()
185 m_dimensions[NumDims - 4] = op.patch_cols(); in CustomTensorEvaluator()
186 m_dimensions[NumDims - 5] = m_outputPlanes * m_outputRows * m_outputCols; in CustomTensorEvaluator()
[all …]
Deigen_mkldnn_contraction_kernel_test.cc30 template <typename Index, int NumDims>
31 Eigen::array<Index, NumDims> RandomDims(int min_dim = 1, int max_dim = 20) { in RandomDims()
32 Eigen::array<Index, NumDims> dims; in RandomDims()
33 for (int i = 0; i < NumDims; ++i) { in RandomDims()
/external/llvm-project/clang/include/clang/AST/
DExprOpenMP.h155 unsigned NumDims = 0; /// Number of dimensions in the shaping expression. variable
162 explicit OMPArrayShapingExpr(EmptyShell Shell, unsigned NumDims) in OMPArrayShapingExpr() argument
163 : Expr(OMPArrayShapingExprClass, Shell), NumDims(NumDims) {} in OMPArrayShapingExpr()
169 void setBase(Expr *Op) { getTrailingObjects<Expr *>()[NumDims] = Op; } in setBase()
176 return NumDims + 1; in numTrailingObjects()
180 return NumDims; in numTrailingObjects()
190 unsigned NumDims);
205 return llvm::makeArrayRef(getTrailingObjects<Expr *>(), NumDims); in getDimensions()
210 return llvm::makeArrayRef(getTrailingObjects<SourceRange>(), NumDims); in getBracketsRanges()
214 Expr *getBase() { return getTrailingObjects<Expr *>()[NumDims]; } in getBase()
[all …]
/external/tensorflow/tensorflow/c/experimental/saved_model/core/ops/
Drestore_ops_test.cc70 EXPECT_EQ(x->NumDims(), 0); in TEST_F()
80 EXPECT_EQ(y->NumDims(), 0); in TEST_F()
90 EXPECT_EQ(z->NumDims(), 0); in TEST_F()

123