@@ -123,50 +123,4 @@ Type::type Tensor::type_id() const { return type_->id(); }
123123
124124bool Tensor::Equals (const Tensor& other) const { return TensorEquals (*this , other); }
125125
126- // ----------------------------------------------------------------------
127- // NumericTensor
128-
129- template <typename TYPE>
130- NumericTensor<TYPE>::NumericTensor(const std::shared_ptr<Buffer>& data,
131- const std::vector<int64_t >& shape)
132- : NumericTensor(data, shape, {}, {}) {}
133-
134- template <typename TYPE>
135- NumericTensor<TYPE>::NumericTensor(const std::shared_ptr<Buffer>& data,
136- const std::vector<int64_t >& shape,
137- const std::vector<int64_t >& strides)
138- : NumericTensor(data, shape, strides, {}) {}
139-
140- template <typename TYPE>
141- NumericTensor<TYPE>::NumericTensor(const std::shared_ptr<Buffer>& data,
142- const std::vector<int64_t >& shape,
143- const std::vector<int64_t >& strides,
144- const std::vector<std::string>& dim_names)
145- : Tensor(TypeTraits<TYPE>::type_singleton(), data, shape, strides, dim_names) {}
146-
147- template <typename TYPE>
148- int64_t NumericTensor<TYPE>::CalculateValueOffset(
149- const std::vector<int64_t >& index) const {
150- int64_t offset = 0 ;
151- for (size_t i = 0 ; i < index.size (); ++i) {
152- offset += index[i] * strides_[i];
153- }
154- return offset;
155- }
156-
157- // ----------------------------------------------------------------------
158- // Instantiate templates
159-
160- template class ARROW_TEMPLATE_EXPORT NumericTensor<UInt8Type>;
161- template class ARROW_TEMPLATE_EXPORT NumericTensor<UInt16Type>;
162- template class ARROW_TEMPLATE_EXPORT NumericTensor<UInt32Type>;
163- template class ARROW_TEMPLATE_EXPORT NumericTensor<UInt64Type>;
164- template class ARROW_TEMPLATE_EXPORT NumericTensor<Int8Type>;
165- template class ARROW_TEMPLATE_EXPORT NumericTensor<Int16Type>;
166- template class ARROW_TEMPLATE_EXPORT NumericTensor<Int32Type>;
167- template class ARROW_TEMPLATE_EXPORT NumericTensor<Int64Type>;
168- template class ARROW_TEMPLATE_EXPORT NumericTensor<HalfFloatType>;
169- template class ARROW_TEMPLATE_EXPORT NumericTensor<FloatType>;
170- template class ARROW_TEMPLATE_EXPORT NumericTensor<DoubleType>;
171-
172126} // namespace arrow
0 commit comments