sum: Added support for sum(), row_sum(), column_sum()
These routines compute the sum of a vector as well as the row- and column-sums of a dense matrix, respectively. The implementation reuses inner products for vectors and matrix-vector products for matrices. Thus, there is some overhead when compared to super-optimized routines involved, but this should be acceptable in almost all cases. Replaces former attempts of a reduce<>() function. Resolves #127.
Showing
- tests/src/external_1.cpp 1 addition, 1 deletiontests/src/external_1.cpp
- tests/src/external_2.cpp 1 addition, 1 deletiontests/src/external_2.cpp
- tests/src/matrix_vector.cpp 50 additions, 0 deletionstests/src/matrix_vector.cpp
- tests/src/matrix_vector_int.cpp 50 additions, 0 deletionstests/src/matrix_vector_int.cpp
- tests/src/vector_float_double.cpp 24 additions, 0 deletionstests/src/vector_float_double.cpp
- tests/src/vector_int.cpp 24 additions, 0 deletionstests/src/vector_int.cpp
- tests/src/vector_uint.cpp 24 additions, 0 deletionstests/src/vector_uint.cpp
- viennacl/forwards.h 33 additions, 6 deletionsviennacl/forwards.h
- viennacl/linalg/cuda/vector_operations.hpp 34 additions, 0 deletionsviennacl/linalg/cuda/vector_operations.hpp
- viennacl/linalg/host_based/vector_operations.hpp 25 additions, 0 deletionsviennacl/linalg/host_based/vector_operations.hpp
- viennacl/linalg/matrix_operations.hpp 16 additions, 0 deletionsviennacl/linalg/matrix_operations.hpp
- viennacl/linalg/opencl/vector_operations.hpp 29 additions, 0 deletionsviennacl/linalg/opencl/vector_operations.hpp
- viennacl/linalg/reduce.hpp 0 additions, 78 deletionsviennacl/linalg/reduce.hpp
- viennacl/linalg/sum.hpp 136 additions, 0 deletionsviennacl/linalg/sum.hpp
- viennacl/linalg/vector_operations.hpp 91 additions, 0 deletionsviennacl/linalg/vector_operations.hpp
- viennacl/matrix.hpp 40 additions, 0 deletionsviennacl/matrix.hpp
- viennacl/scalar.hpp 43 additions, 2 deletionsviennacl/scalar.hpp
- viennacl/scheduler/forwards.h 0 additions, 4 deletionsviennacl/scheduler/forwards.h
- viennacl/traits/size.hpp 34 additions, 4 deletionsviennacl/traits/size.hpp
Loading
Please register or sign in to comment