tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
copy.hpp
Go to the documentation of this file.
1#ifndef TATAMI_COPY_HPP
2#define TATAMI_COPY_HPP
3
4#include <algorithm>
5#include <type_traits>
6
12namespace tatami {
13
17// Copy the type without qualifiers to wrap decltype() calls.
18template<typename Input_>
19using I = std::remove_cv_t<std::remove_reference_t<Input_> >;
36template<typename Value_, typename Size_>
37Value_* copy_n(const Value_* const input, const Size_ n, Value_* const output) {
38 if (input != output) {
39 std::copy_n(input, n, output);
40 }
41 return output;
42}
43
44}
45
46#endif
Flexible representations for matrix data.
Definition Extractor.hpp:15
Value_ * copy_n(const Value_ *const input, const Size_ n, Value_ *const output)
Definition copy.hpp:37