gslcpp
Modern-C++ Wrapper for GSL
memcpy.hpp
Go to the documentation of this file.
1 /// \file include/gslcpp/wrap/memcpy.hpp
2 /// \copyright 2022 Thomas E. Vaughan, all rights reserved.
3 /// \brief Definition of gsl::w_memcpy().
4 
5 #pragma once
6 #include "container.hpp" // w_vector
7 
8 namespace gsl {
9 
10 
11 /// Copy elements of vector `v` into vector `u`.
12 /// Each vector must have same length.
13 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
14 /// @param u Pointer to vector that is destination of copying.
15 /// @param v Pointer to vector that is source of copying.
16 /// @return TBD: GSL's documentation does not specify.
17 inline int w_memcpy(w_vector<double> *u, w_vector<double const> *v) {
18  return gsl_vector_memcpy(u, v);
19 }
20 
21 
22 /// Copy elements of vector `v` into vector `u`.
23 /// Each vector must have same length.
24 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
25 /// @param u Pointer to vector that is destination of copying.
26 /// @param v Pointer to vector that is source of copying.
27 /// @return TBD: GSL's documentation does not specify.
28 inline int w_memcpy(w_vector<float> *u, w_vector<float const> *v) {
29  return gsl_vector_float_memcpy(u, v);
30 }
31 
32 
33 /// Copy elements of vector `v` into vector `u`.
34 /// Each vector must have same length.
35 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
36 /// @param u Pointer to vector that is destination of copying.
37 /// @param v Pointer to vector that is source of copying.
38 /// @return TBD: GSL's documentation does not specify.
39 inline int w_memcpy(w_vector<long double> *u, w_vector<long double const> *v) {
40  return gsl_vector_long_double_memcpy(u, v);
41 }
42 
43 
44 /// Copy elements of vector `v` into vector `u`.
45 /// Each vector must have same length.
46 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
47 /// @param u Pointer to vector that is destination of copying.
48 /// @param v Pointer to vector that is source of copying.
49 /// @return TBD: GSL's documentation does not specify.
50 inline int w_memcpy(w_vector<int> *u, w_vector<int const> *v) {
51  return gsl_vector_int_memcpy(u, v);
52 }
53 
54 
55 /// Copy elements of vector `v` into vector `u`.
56 /// Each vector must have same length.
57 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
58 /// @param u Pointer to vector that is destination of copying.
59 /// @param v Pointer to vector that is source of copying.
60 /// @return TBD: GSL's documentation does not specify.
61 inline int w_memcpy(w_vector<unsigned> *u, w_vector<unsigned const> *v) {
62  return gsl_vector_uint_memcpy(u, v);
63 }
64 
65 
66 /// Copy elements of vector `v` into vector `u`.
67 /// Each vector must have same length.
68 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
69 /// @param u Pointer to vector that is destination of copying.
70 /// @param v Pointer to vector that is source of copying.
71 /// @return TBD: GSL's documentation does not specify.
72 inline int w_memcpy(w_vector<long> *u, w_vector<long const> *v) {
73  return gsl_vector_long_memcpy(u, v);
74 }
75 
76 
77 /// Copy elements of vector `v` into vector `u`.
78 /// Each vector must have same length.
79 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
80 /// @param u Pointer to vector that is destination of copying.
81 /// @param v Pointer to vector that is source of copying.
82 /// @return TBD: GSL's documentation does not specify.
83 inline int
84 w_memcpy(w_vector<unsigned long> *u, w_vector<unsigned long const> *v) {
85  return gsl_vector_ulong_memcpy(u, v);
86 }
87 
88 
89 /// Copy elements of vector `v` into vector `u`.
90 /// Each vector must have same length.
91 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
92 /// @param u Pointer to vector that is destination of copying.
93 /// @param v Pointer to vector that is source of copying.
94 /// @return TBD: GSL's documentation does not specify.
95 inline int w_memcpy(w_vector<short> *u, w_vector<short const> *v) {
96  return gsl_vector_short_memcpy(u, v);
97 }
98 
99 
100 /// Copy elements of vector `v` into vector `u`.
101 /// Each vector must have same length.
102 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
103 /// @param u Pointer to vector that is destination of copying.
104 /// @param v Pointer to vector that is source of copying.
105 /// @return TBD: GSL's documentation does not specify.
106 inline int
107 w_memcpy(w_vector<unsigned short> *u, w_vector<unsigned short const> *v) {
108  return gsl_vector_ushort_memcpy(u, v);
109 }
110 
111 
112 /// Copy elements of vector `v` into vector `u`.
113 /// Each vector must have same length.
114 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
115 /// @param u Pointer to vector that is destination of copying.
116 /// @param v Pointer to vector that is source of copying.
117 /// @return TBD: GSL's documentation does not specify.
118 inline int w_memcpy(w_vector<char> *u, w_vector<char const> *v) {
119  return gsl_vector_char_memcpy(u, v);
120 }
121 
122 
123 /// Copy elements of vector `v` into vector `u`.
124 /// Each vector must have same length.
125 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
126 /// @param u Pointer to vector that is destination of copying.
127 /// @param v Pointer to vector that is source of copying.
128 /// @return TBD: GSL's documentation does not specify.
129 inline int
130 w_memcpy(w_vector<unsigned char> *u, w_vector<unsigned char const> *v) {
131  return gsl_vector_uchar_memcpy(u, v);
132 }
133 
134 
135 /// Copy elements of vector `v` into vector `u`.
136 /// Each vector must have same length.
137 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
138 /// @param u Pointer to vector that is destination of copying.
139 /// @param v Pointer to vector that is source of copying.
140 /// @return TBD: GSL's documentation does not specify.
141 inline int
142 w_memcpy(w_vector<complex<double>> *u, w_vector<complex<double> const> *v) {
143  return gsl_vector_complex_memcpy(u, v);
144 }
145 
146 
147 /// Copy elements of vector `v` into vector `u`.
148 /// Each vector must have same length.
149 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
150 /// @param u Pointer to vector that is destination of copying.
151 /// @param v Pointer to vector that is source of copying.
152 /// @return TBD: GSL's documentation does not specify.
153 inline int
154 w_memcpy(w_vector<complex<float>> *u, w_vector<complex<float> const> *v) {
155  return gsl_vector_complex_float_memcpy(u, v);
156 }
157 
158 
159 /// Copy elements of vector `v` into vector `u`.
160 /// Each vector must have same length.
161 /// https://www.gnu.org/software/gsl/doc/html/vectors.html#c.gsl_vector_memcpy
162 /// @param u Pointer to vector that is destination of copying.
163 /// @param v Pointer to vector that is source of copying.
164 /// @return TBD: GSL's documentation does not specify.
165 inline int w_memcpy(
166  w_vector<complex<long double>> *u,
167  w_vector<complex<long double> const> *v) {
168  return gsl_vector_complex_long_double_memcpy(u, v);
169 }
170 
171 
172 } // namespace gsl
173 
174 // EOF
gsl::w_memcpy
int w_memcpy(w_vector< long double > *u, w_vector< long double const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:39
gsl::w_memcpy
int w_memcpy(w_vector< unsigned short > *u, w_vector< unsigned short const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:107
gsl::w_memcpy
int w_memcpy(w_vector< complex< long double >> *u, w_vector< complex< long double > const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:165
gsl::w_memcpy
int w_memcpy(w_vector< unsigned > *u, w_vector< unsigned const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:61
gsl::w_memcpy
int w_memcpy(w_vector< char > *u, w_vector< char const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:118
gsl::w_memcpy
int w_memcpy(w_vector< short > *u, w_vector< short const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:95
gsl::w_memcpy
int w_memcpy(w_vector< float > *u, w_vector< float const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:28
gsl::w_memcpy
int w_memcpy(w_vector< int > *u, w_vector< int const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:50
gsl::w_memcpy
int w_memcpy(w_vector< unsigned long > *u, w_vector< unsigned long const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:84
gsl::w_memcpy
int w_memcpy(w_vector< complex< float >> *u, w_vector< complex< float > const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:154
gsl::w_memcpy
int w_memcpy(w_vector< complex< double >> *u, w_vector< complex< double > const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:142
gsl::w_memcpy
int w_memcpy(w_vector< double > *u, w_vector< double const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:17
gsl::w_memcpy
int w_memcpy(w_vector< long > *u, w_vector< long const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:72
gsl::w_memcpy
int w_memcpy(w_vector< unsigned char > *u, w_vector< unsigned char const > *v)
Copy elements of vector v into vector u.
Definition: memcpy.hpp:130
gsl
Namespace for C++-interface to GSL.
Definition: v-iface.hpp:51