Home
last modified time | relevance | path

Searched refs:linear_index (Results 1 – 10 of 10) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/
Dindex_util.cc76 int64 linear_index = 0; in MultidimensionalIndexToLinearIndex() local
81 linear_index = multi_index[dimension]; in MultidimensionalIndexToLinearIndex()
85 linear_index += scale * multi_index[dimension]; in MultidimensionalIndexToLinearIndex()
89 return linear_index; in MultidimensionalIndexToLinearIndex()
93 const Shape& shape, int64 linear_index) { in LinearIndexToMultidimensionalIndex() argument
94 DCHECK_GE(linear_index, 0); in LinearIndexToMultidimensionalIndex()
95 DCHECK_LT(linear_index, ShapeUtil::ElementsIn(shape)); in LinearIndexToMultidimensionalIndex()
110 (linear_index / divisor) % shape.dimensions(dimension); in LinearIndexToMultidimensionalIndex()
Dliteral_comparison.cc286 int64 linear_index; member
298 linear_index)), in ToString()
372 void CompareValues(T expected, T actual, int64 linear_index) { in CompareValues() argument
375 if (CompareEqual<T>(expected, actual, {linear_index})) { in CompareValues()
409 CHECK(!CompareEqual(expected, actual, {linear_index})); in CompareValues()
450 linear_index}; in CompareValues()
457 mismatches_.data<bool>()[linear_index] = true; in CompareValues()
461 void CompareValues(complex64 expected, complex64 actual, int64 linear_index) { in CompareValues() argument
463 CompareValues<float>(expected.real(), actual.real(), linear_index); in CompareValues()
464 if (mismatches_.data<bool>()[linear_index] == true) { in CompareValues()
[all …]
Dindex_util_test.cc132 for (auto linear_index : linear_indexes) { in TEST() local
134 IndexUtil::LinearIndexToMultidimensionalIndex(shape, linear_index); in TEST()
135 EXPECT_EQ(linear_index, IndexUtil::MultidimensionalIndexToLinearIndex( in TEST()
Dindex_util.h45 const Shape& shape, int64 linear_index);
Dliteral.cc215 auto linear_index = [](const Shape& shape, in CopySliceFromInternal() local
224 StridedCopy(data<NativeT>(), linear_index(shape(), dest_base), 0, in CopySliceFromInternal()
226 linear_index(src_literal.shape(), src_base), 0, 1); in CopySliceFromInternal()
251 int64 src_index = linear_index(src_literal.shape(), src_indexes); in CopySliceFromInternal()
252 int64 dest_index = linear_index(shape(), dest_indexes); in CopySliceFromInternal()
/external/tensorflow/tensorflow/compiler/xla/g3doc/
Dtiled_layout.md31 &nbsp;&nbsp; linear_index(e, d) \
32 = linear_index((e<sub>n</sub>, e<sub>n-1</sub>, ... , e<sub>1</sub>),
49 = linear_index((⌊e/t⌋, e mod t), (⌈d/t⌉, t)) &nbsp; &nbsp; (arithmetic is
51 = linear_index((⌊e<sub>n</sub>/t<sub>n</sub>⌋, ... ,
56 = linear_index((⌊e<sub>n</sub>/t<sub>n</sub>⌋, ... ,
59 linear_index((e<sub>n</sub> mod t<sub>n</sub>, ... , e<sub>1</sub> mod
79 = linear_index((1,1,0,1), (2,3,2,2)) \
80 = linear_index((1,1), (2,3)) ∙ 2 ∙ 2 + linear_index((0,1), (2,2)) \
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dkernel_tiling.cc63 llvm::Value* linear_index = index.GetConstantWithIndexType(0); in GetReshapedIndex() local
70 linear_index = b->CreateAdd(linear_index, addend, "", in GetReshapedIndex()
75 return IrArray::Index(linear_index, reshaped_shape, b); in GetReshapedIndex()
Dir_array.cc232 llvm::Value* linear_index = GetConstantWithIndexType(0); in SourceIndexOfBitcast() local
234 linear_index = builder->CreateAdd( in SourceIndexOfBitcast()
235 linear_index, in SourceIndexOfBitcast()
245 Delinearize(&multi_index, linear_index, operand_shape, builder); in SourceIndexOfBitcast()
247 return Index(multi_index, linear_index, operand_shape, index_type_); in SourceIndexOfBitcast()
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dparallel_loop_emitter.cc125 llvm::Value* linear_index = in EmitIndexAndSetExitBasicBlock() local
129 array_indices.emplace_back(linear_index, shape_, b_); in EmitIndexAndSetExitBasicBlock()
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_parser.cc2073 if (auto* linear_index = absl::get_if<int64>(&index)) { in SetValueInLiteralHelper() local
2074 if (*linear_index >= ShapeUtil::ElementsIn(literal->shape())) { in SetValueInLiteralHelper()
2078 " at linear index ", *linear_index, in SetValueInLiteralHelper()
2081 literal->data<LiteralNativeT>().at(*linear_index) = in SetValueInLiteralHelper()
2179 int64 linear_index = 0; in ParseDenseLiteral() local
2261 !SetValueInLiteral(loc, value, linear_index++, literal)) { in ParseDenseLiteral()
2292 linear_index++, literal)) { in ParseDenseLiteral()
2304 if (!SetValueInLiteral(loc, value, linear_index++, literal)) { in ParseDenseLiteral()
2315 if (!SetValueInLiteral(loc, value, linear_index++, literal)) { in ParseDenseLiteral()