Peano
Loading...
Searching...
No Matches
VectorSlice.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include "tarch/la/Vector.h"
7
8
9namespace tarch {
10 namespace la {
28 template<int SizeLhs, int SizeRhs, typename Scalar>
29 Vector<SizeLhs,Scalar> slice(const Vector<SizeRhs,Scalar>& vector, int fromIndex, int stride = 1);
30
34 template<int SizeLhs, int SizeRhs, typename Scalar>
35 void slice(Vector<SizeLhs,Scalar>& toVector, const Vector<SizeRhs,Scalar>& fromVector, int fromIndexInToVector, int strideInToVector = 1);
36
51 template<int SizeLhs, int SizeRhs, typename Scalar>
53
59 template<int SizeLhs, typename Scalar>
61 }
62}
63
64
65#include "tarch/la/VectorSlice.cpph"
66
Vector< SizeLhs, Scalar > expandOrSlice(const Vector< SizeRhs, Scalar > &vector)
Take a scalar or vector and map it onto a vector.
Vector< SizeLhs, Scalar > slice(const Vector< SizeRhs, Scalar > &vector, int fromIndex, int stride=1)
Returns subpart of the vector.
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19
Simple vector class.
Definition Vector.h:159