@@ -215,47 +215,6 @@ KERNEL_FLOAT_INLINE void storen(const V& values, T* ptr, size_t offset, size_t m
215215 return store (values, ptr, indices, indices < max_length);
216216}
217217
218- template <typename T, size_t N>
219- struct AssignConversionProxy {
220- KERNEL_FLOAT_INLINE
221- explicit AssignConversionProxy (T* ptr) : ptr_(ptr) {}
222-
223- template <typename U>
224- KERNEL_FLOAT_INLINE AssignConversionProxy& operator =(U&& values) {
225- auto indices = range<size_t , N>();
226- detail::store_impl<T, N>::call (
227- ptr_,
228- convert_storage<T, N>(std::forward<U>(values)).data (),
229- indices.data ());
230-
231- return *this ;
232- }
233-
234- private:
235- T* ptr_;
236- };
237-
238- /* *
239- * Takes a reference to a vector and returns a special proxy object that automatically performs the correct conversion
240- * when a vector of a different element type is assigned. This is useful to perform implicit type conversions.
241- *
242- * For example, let assume that a line like `x = expression;` would not compile since `x` and `expressions` are
243- * vectors of different element types. Then it is possible to use `cast_to(x) = expression;` to fix this error,
244- * which possibly introduces a type conversion.
245- *
246- * Example
247- * =======
248- * ```
249- * vec<float, 2> x;
250- * vec<double, 2> y = {1.0, 2.0};
251- * cast_to(x) = y; // normally, the line `x = y;` would not compile, but `cast_to` make this possible
252- * ```
253- */
254- template <typename T, typename E>
255- KERNEL_FLOAT_INLINE AssignConversionProxy<T, E::value> cast_to (vector<T, E>& input) {
256- return AssignConversionProxy<T, E::value>(input.data ());
257- }
258-
259218/* *
260219 * Returns the original pointer ``ptr`` and hints to the compiler that this pointer is aligned to ``alignment`` bytes.
261220 * If this is not actually the case, compiler optimizations will break things and generate invalid code. Be careful!
0 commit comments