Beispiel #1
0
 vector_range<VectorType> project(viennacl::vector_range<VectorType> & vec, viennacl::range const & r1)
 {
   assert(r1.size() <= vec.size() && bool("Size of range invalid!"));
   return vector_range<VectorType>(vec, viennacl::range(vec.start() + r1.start(), vec.start() + r1.start() + r1.size()));
 }
Beispiel #2
0
 vector_slice<VectorType> project(viennacl::vector_slice<VectorType> & vec, viennacl::range const & r1)
 {
   assert(r1.size() <= vec.size() && bool("Size of slice larger than vector proxy!"));
   return vector_slice<VectorType>(vec, viennacl::slice(vec.start() + r1.start(), vec.stride(), r1.size()));
 }
Beispiel #3
0
matrix_range<MatrixType> project(matrix_range<MatrixType> const & A, viennacl::range const & r1, viennacl::range const & r2)
{
  assert(r1.size() <= A.size1() && r2.size() <= A.size2() && bool("Size of range invalid!"));

  return matrix_range<MatrixType>(A, r1, r2);
}