VisionCpp  0.0.1
convert.hpp
Go to the documentation of this file.
1 // This file is part of VisionCpp, a lightweight C++ template library
2 // for computer vision and image processing.
3 //
4 // Copyright (C) 2016 Codeplay Software Limited. All Rights Reserved.
5 //
6 // Contact: visioncpp@codeplay.com
7 //
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 //
12 // http://www.apache.org/licenses/LICENSE-2.0
13 //
14 // Unless required by applicable law or agreed to in writing, software
15 // distributed under the License is distributed on an "AS IS" BASIS,
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 // See the License for the specific language governing permissions and
18 // limitations under the License.
19 
20 /// \file convert.hpp
21 /// \brief Series of pixel convert functions.
22 
23 #ifndef VISIONCPP_INCLUDE_FRAMEWORK_TOOLS_CONVERT_HPP_
24 #define VISIONCPP_INCLUDE_FRAMEWORK_TOOLS_CONVERT_HPP_
25 
26 namespace visioncpp {
27 namespace internal {
28 /// \brief Internal tools scope.
29 namespace tools {
30 /// \brief This struct is used to convert the provide struct to flot4, uint4,
31 /// int4 memory. Also it s used to propagate all the channels of an element with
32 /// one primary value. The former is used when we have an image while the latter is
33 /// used for broadcast function. When both types are the same it does nothing
34 /// but returns the input.
35 /// template parameters:
36 /// \tparam T is the input type to be converted
37 template <typename T>
38 struct Convertor {
39  /// function convert
40  /// \brief Convert the input type to the output type. When both types are the
41  /// same it does nothing but returns the input.
42  /// parameters:
43  /// \param t Input type to be converted
44  /// \return T
45  static inline T convert(T t) { return t; }
46 };
47 
48 /// \brief Specialisation of Convertor when the output is float4
49 template <>
50 struct Convertor<cl::sycl::float4> {
51  /// function convert
52  /// \brief Convert the F32C3 type to the cl::sycl::float4 type.
53  /// parameters:
54  /// \param t Input type to be converted
55  /// \return float4
56  static inline cl::sycl::float4 convert(visioncpp::pixel::F32C3 t) {
57  return cl::sycl::float4(t[0], t[1], t[2], 0.0f);
58  }
59 
60  /// function convert
61  /// \brief Convert the F32C4 input type to the cl::sycl::float4 output type.
62  /// parameters:
63  /// \param t input type to be converted
64  /// \return float4
65  static inline cl::sycl::float4 convert(visioncpp::pixel::F32C4 t) {
66  return cl::sycl::float4(t[0], t[1], t[2], t[3]);
67  }
68 
69  /// function convert
70  /// \brief Convert the U8C3 input type to the cl::sycl::float4 output type.
71  /// parameters:
72  /// \param t input type to be converted
73  /// \return float4
74  static inline cl::sycl::float4 convert(visioncpp::pixel::U8C3 t) {
75  return cl::sycl::float4(static_cast<float>(t[0]), static_cast<float>(t[1]),
76  static_cast<float>(t[2]), 0.0f);
77  }
78 
79  /// function convert
80  /// \brief Convert the U8C4 input type to the cl::sycl::float4 output type.
81  /// parameters:
82  /// \param t input type to be converted
83  /// \return float4
84  static inline cl::sycl::float4 convert(visioncpp::pixel::U8C4 t) {
85  return cl::sycl::float4(static_cast<float>(t[0]), static_cast<float>(t[1]),
86  static_cast<float>(t[2]), static_cast<float>(t[3]));
87  }
88 
89  /// function convert
90  /// \brief Convert the float input type to the cl::sycl::float4 output type.
91  /// parameters:
92  /// \param t input type to be converted
93  /// \return float4
94  static inline cl::sycl::float4 convert(float t) {
95  return cl::sycl::float4(t, t, t, t);
96  }
97 };
98 /// \brief specialisation of Convertor when the output is int4
99 template <>
100 struct Convertor<cl::sycl::int4> {
101  /// function convert
102  /// \brief Convert the F32C3 input type to the cl::sycl::int4 output type.
103  /// parameters:
104  /// \param t input type to be converted
105  /// \return int4
106  static inline cl::sycl::int4 convert(visioncpp::pixel::F32C3 t) {
107  return cl::sycl::int4(static_cast<int>(t[0]), static_cast<int>(t[1]),
108  static_cast<int>(t[2]), 0);
109  }
110 
111  /// function convert
112  /// \brief Convert the F32C4 input type to the cl::sycl::int4 output type.
113  /// parameters:
114  /// \param t input type to be converted
115  /// \return int4
116  static inline cl::sycl::int4 convert(visioncpp::pixel::F32C4 t) {
117  return cl::sycl::int4(static_cast<int>(t[0]), static_cast<int>(t[1]),
118  static_cast<int>(t[2]), static_cast<int>(t[3]));
119  }
120 
121  /// function convert
122  /// \brief Convert the U8C3 input type to the cl::sycl::int4 output type.
123  /// parameters:
124  /// \param t input type to be converted
125  /// \return int4
126  static inline cl::sycl::int4 convert(visioncpp::pixel::U8C3 t) {
127  return cl::sycl::int4(static_cast<int>(t[0]), static_cast<int>(t[1]),
128  static_cast<int>(t[2]), 0);
129  }
130 
131  /// function convert
132  /// \brief Convert the U8C4 input type to the cl::sycl::int4 output type.
133  /// parameters:
134  /// \param t input type to be converted
135  /// \return int4
136  static inline cl::sycl::int4 convert(visioncpp::pixel::U8C4 t) {
137  return cl::sycl::int4(static_cast<int>(t[0]), static_cast<int>(t[1]),
138  static_cast<int>(t[2]), static_cast<int>(t[3]));
139  }
140 
141  /// function convert
142  /// \brief Convert the int input type to the cl::sycl::int4 output type.
143  /// parameters:
144  /// \param t input type to be converted
145  /// \return int4
146  static inline cl::sycl::int4 convert(int t) {
147  return cl::sycl::int4(t, t, t, t);
148  }
149 };
150 /// \brief specialisation of the Convertor when the output is uint4
151 template <>
152 struct Convertor<cl::sycl::uint4> {
153  /// function convert
154  /// \brief Convert the F32C3 input type to the cl::sycl::uint4 output type.
155  /// parameters:
156  /// \param t input type to be converted
157  /// \return uint4
158  static inline cl::sycl::uint4 convert(visioncpp::pixel::F32C3 t) {
159  return cl::sycl::uint4(static_cast<unsigned int>(t[0]),
160  static_cast<unsigned int>(t[1]),
161  static_cast<unsigned int>(t[2]), 0);
162  }
163 
164  /// function convert
165  /// \brief Convert the F32C4 input type to the cl::sycl::uint4 output type.
166  /// parameters:
167  /// \param t input type to be converted
168  /// \return uint4
169  static inline cl::sycl::uint4 convert(visioncpp::pixel::F32C4 t) {
170  return cl::sycl::uint4(
171  static_cast<unsigned int>(t[0]), static_cast<unsigned int>(t[1]),
172  static_cast<unsigned int>(t[2]), static_cast<unsigned int>(t[3]));
173  }
174 
175  /// function convert
176  /// \brief Convert the U8C3 input type to the cl::sycl::uint4 output type.
177  /// parameters:
178  /// \param t input type to be converted
179  /// \return uint4
180  static inline cl::sycl::uint4 convert(visioncpp::pixel::U8C3 t) {
181  return cl::sycl::uint4(static_cast<unsigned int>(t[0]),
182  static_cast<unsigned int>(t[1]),
183  static_cast<unsigned int>(t[2]), 0);
184  }
185 
186  /// function convert
187  /// \brief Convert the U8C4 input type to the cl::sycl::uint4 output type.
188  /// parameters:
189  /// \param t input type to be converted
190  /// \return uint4
191  static inline cl::sycl::uint4 convert(visioncpp::pixel::U8C4 t) {
192  return cl::sycl::uint4(
193  static_cast<unsigned int>(t[0]), static_cast<unsigned int>(t[1]),
194  static_cast<unsigned int>(t[2]), static_cast<unsigned int>(t[3]));
195  }
196 
197  /// function convert
198  /// \brief Convert the unsigned int input type to the cl::sycl::uint4 output
199  /// type.
200  /// parameters:
201  /// \param t input type to be converted
202  /// \return uint4
203  static inline cl::sycl::uint4 convert(unsigned int t) {
204  return cl::sycl::uint4(t, t, t, t);
205  }
206 
207  /// function convert
208  /// \brief Convert the unsigned char input type to the cl::sycl::uint4 output
209  /// type.
210  /// parameters:
211  /// \param t input type to be converted
212  /// \return uint4
213  static inline cl::sycl::uint4 convert(unsigned char t) {
214  return cl::sycl::uint4(t, t, t, t);
215  }
216 };
217 /// \brief specialisation of the Convertor when the output is F32C3
218 template <>
220  /// function convert
221  /// \brief Convert the cl::sycl::float4 input type to the F32C3 output type.
222  /// parameters:
223  /// \param t input type to be converted
224  /// \return F32C3
225  static inline visioncpp::pixel::F32C3 convert(cl::sycl::float4 t) {
226  return visioncpp::pixel::F32C3(t.x(), t.y(), t.z());
227  }
228 
229  /// function convert
230  /// \brief Returns the input type.
231  /// parameters:
232  /// \param t input type to be converted
233  /// \return F32C3
235  return t;
236  }
237 
238  /// function convert
239  /// \brief Convert the cl::sycl::int4 input type to the F32C3 output type.
240  /// parameters:
241  /// \param t input type to be converted
242  /// \return F32C3
243  static inline visioncpp::pixel::F32C3 convert(cl::sycl::int4 t) {
244  return visioncpp::pixel::F32C3(static_cast<float>(t.x()),
245  static_cast<float>(t.y()),
246  static_cast<float>(t.z()));
247  }
248 
249  /// function convert
250  /// \brief Convert the cl::sycl::uint4 input type to the F32C3 output type.
251  /// parameters:
252  /// \param t input type to be converted
253  /// \return F32C3
254  static inline visioncpp::pixel::F32C3 convert(cl::sycl::uint4 t) {
255  return visioncpp::pixel::F32C3(static_cast<float>(t.x()),
256  static_cast<float>(t.y()),
257  static_cast<float>(t.z()));
258  }
259 
260  /// function convert
261  /// \brief Convert the float input type to the F32C3 output type.
262  /// parameters:
263  /// \param t input type to be converted
264  /// \return F32C3
265  static inline visioncpp::pixel::F32C3 convert(float t) {
266  return visioncpp::pixel::F32C3(t, t, t);
267  }
268 };
269 /// \brief specialisation of the Convertor when the output is F32C4
270 template <>
272  /// function convert
273  /// \brief Convert the cl::sycl::float4 input type to the F32C4 output type.
274  /// parameters:
275  /// \param t input type to be converted
276  /// \return F32C4
277  static inline visioncpp::pixel::F32C4 convert(cl::sycl::float4 t) {
278  return visioncpp::pixel::F32C4(t.x(), t.y(), t.z(), t.w());
279  }
280 
281  /// function convert
282  /// \brief Returns the F32C4 input type.
283  /// parameters:
284  /// \param t input type to be converted
285  /// \return F32C4
287  return t;
288  }
289 
290  /// function convert
291  /// \brief Convert the cl::sycl::int4 input type to the F32C4 output type.
292  /// parameters:
293  /// \param t input type to be converted
294  /// \return F32C4
295  static inline visioncpp::pixel::F32C4 convert(cl::sycl::int4 t) {
297  static_cast<float>(t.x()), static_cast<float>(t.y()),
298  static_cast<float>(t.z()), static_cast<float>(t.w()));
299  }
300 
301  /// function convert
302  /// \brief Convert the cl::sycl::uint4 input type to the F32C4 output type.
303  /// parameters:
304  /// \param t input type to be converted
305  /// \return F32C4
306  static inline visioncpp::pixel::F32C4 convert(cl::sycl::uint4 t) {
308  static_cast<float>(t.x()), static_cast<float>(t.y()),
309  static_cast<float>(t.z()), static_cast<float>(t.w()));
310  }
311 
312  /// function convert
313  /// \brief Convert the float input type to the F32C4 output type.
314  /// parameters:
315  /// \param t input type needed to be converted
316  /// \return F32C4
317  static inline visioncpp::pixel::F32C4 convert(float t) {
318  return visioncpp::pixel::F32C4(t, t, t, t);
319  }
320 };
321 /// \brief specialisation of the Convertor when the output is U8C3
322 template <>
324  /// function convert
325  /// \brief Convert the cl::sycl::float4 input type to the U8C3 output type.
326  /// parameters:
327  /// \param t input type needed to be converted
328  /// \return U8C3
329  static inline visioncpp::pixel::U8C3 convert(cl::sycl::float4 t) {
330  return visioncpp::pixel::U8C3(t.x(), t.y(), t.z());
331  }
332 
333  /// function convert
334  /// \brief Convert the unsigned char input type to the U8C3 output type.
335  /// parameters:
336  /// \param t input type needed to be converted
337  /// \return U8C3
338  static inline visioncpp::pixel::U8C3 convert(unsigned char t) {
339  return visioncpp::pixel::U8C3(t, t, t);
340  }
341 
342  /// function convert
343  /// \brief Returns the U8C3 input type.
344  /// parameters:
345  /// \param t input type needed to be converted
346  /// \return U8C3
348  return t;
349  }
350 
351  /// function convert
352  /// \brief Convert the cl::sycl::int4 input type to the U8C3 output type.
353  /// parameters:
354  /// \param t input type needed to be converted
355  /// \return U8C3
356  static inline visioncpp::pixel::U8C3 convert(cl::sycl::int4 t) {
357  return visioncpp::pixel::U8C3(static_cast<unsigned char>(t.x()),
358  static_cast<unsigned char>(t.y()),
359  static_cast<unsigned char>(t.z()));
360  }
361 
362  /// function convert
363  /// \brief Convert the cl::sycl::uint4 input type to the U8C3 output type.
364  /// parameters:
365  /// \param t input type needed to be converted
366  /// \return U8C3
367  static inline visioncpp::pixel::U8C3 convert(cl::sycl::uint4 t) {
368  return visioncpp::pixel::U8C3(static_cast<unsigned char>(t.x()),
369  static_cast<unsigned char>(t.y()),
370  static_cast<unsigned char>(t.z()));
371  }
372 };
373 /// \brief specialisation of the Convertor when the output is U8C4
374 template <>
376  /// function convert
377  /// \brief Convert the cl::sycl::float4 input type to the U8C4 output type.
378  /// parameters:
379  /// \param t input type needed to be converted
380  /// \return U8C4
381  static inline visioncpp::pixel::U8C4 convert(cl::sycl::float4 t) {
382  return visioncpp::pixel::U8C4(t.x(), t.y(), t.z(), t.w());
383  }
384 
385  /// function convert
386  /// \brief Convert the unsigned char input type to the U8C4 output type.
387  /// parameters:
388  /// \param t input type needed to be converted
389  /// \return U8C4
390  static inline visioncpp::pixel::U8C4 convert(unsigned char t) {
391  return visioncpp::pixel::U8C4(t, t, t);
392  }
393 
394  /// function convert
395  /// \brief Returns the U8C4 input type.
396  /// parameters:
397  /// \param t input type needed to be converted
398  /// \return U8C4
400  return t;
401  }
402 
403  /// function convert
404  /// \brief Convert the cl::sycl::int4 input type to the U8C4 output type.
405  /// parameters:
406  /// \param t input type needed to be converted
407  /// \return U8C4
408  static inline visioncpp::pixel::U8C4 convert(cl::sycl::int4 t) {
409  return visioncpp::pixel::U8C4(
410  static_cast<unsigned char>(t.x()), static_cast<unsigned char>(t.y()),
411  static_cast<unsigned char>(t.z()), static_cast<unsigned char>(t.w()));
412  }
413 
414  /// function convert
415  /// \brief Convert the cl::sycl::uint4 input type to the U8C4 output type.
416  /// parameters:
417  /// \param t input type needed to be converted
418  /// \return U8C4
419  static inline visioncpp::pixel::U8C4 convert(cl::sycl::uint4 t) {
420  return visioncpp::pixel::U8C4(
421  static_cast<unsigned char>(t.x()), static_cast<unsigned char>(t.y()),
422  static_cast<unsigned char>(t.z()), static_cast<unsigned char>(t.w()));
423  }
424 };
425 /// \brief specialisation of the Convertor when the output is unsigned char
426 template <>
427 struct Convertor<unsigned char> {
428  /// function convert
429  /// \brief Convert the cl::sycl::uint4 input type to the unsigned char output
430  /// type.
431  /// parameters:
432  /// \param t input type needed to be converted
433  /// \return unsigned char
434  static inline unsigned char convert(cl::sycl::uint4 t) { return t.x(); }
435 
436  /// function convert
437  /// \brief Returns the unsigned char input type.
438  /// parameters:
439  /// \param t input type needed to be converted
440  /// \return unsigned char
441  static inline unsigned char convert(unsigned char t) { return t; }
442 };
443 /// \brief specialisation of the Convertor when the output is char
444 template <>
445 struct Convertor<char> {
446  /// function convert
447  /// \brief Convert the cl::sycl::int4 input type to the char output type.
448  /// parameters:
449  /// \param t input type needed to be converted
450  /// \return char
451  static inline char convert(cl::sycl::int4 t) { return t.x(); }
452 
453  /// function convert
454  /// \brief Convert the input type to the output type. When both types are the
455  /// same it does nothing but returns the input.
456  /// parameters:
457  /// \param t input type needed to be converted
458  /// \return char
459  static inline short convert(char t) { return t; }
460 };
461 /// \brief specialisation of the Convertor when the output is unsigned short
462 template <>
463 struct Convertor<unsigned short> {
464  /// function convert
465  /// \brief Convert the cl::sycl::uint4 t input type to the unsigned short
466  /// output type.
467  /// parameters:
468  /// \param t input type needed to be converted
469  /// \return unsigned short
470  static inline unsigned short convert(cl::sycl::uint4 t) { return t.x(); }
471 
472  /// function convert
473  /// \brief Convert the input type to the output type. When both types are the
474  /// same it does nothing but returns the input.
475  /// parameters:
476  /// \param t input type needed to be converted
477  /// \return unsigned short
478  static inline unsigned short convert(unsigned short t) { return t; }
479 };
480 /// \brief specialisation of the Convertor when the output is short
481 template <>
482 struct Convertor<short> {
483  /// function convert
484  /// \brief Convert the cl::sycl::int4 input type to the short output type.
485  /// parameters:
486  /// \param t input type needed to be converted
487  /// \return short
488  static inline short convert(cl::sycl::int4 t) { return t.x(); }
489 
490  /// function convert
491  /// \brief Returns the short input.
492  /// parameters:
493  /// \param t input type needed to be converted
494  /// \return short
495  static inline short convert(short t) { return t; }
496 };
497 /// \brief specialisation of the Convertor when the output is unsigned int
498 template <>
499 struct Convertor<unsigned int> {
500  /// function convert
501  /// \brief Convert the cl::sycl::uint4 input type to the int output type.
502  /// parameters:
503  /// \param t input type needed to be converted
504  /// \return unsigned int
505  static inline int convert(cl::sycl::uint4 t) { return t.x(); }
506 
507  /// function convert
508  /// \brief Returns the unsigned int input type.
509  /// parameters:
510  /// \param t input type needed to be converted
511  /// \return unsigned int
512  static inline unsigned int convert(unsigned int t) { return t; }
513 };
514 /// \brief specialisation of the Convertor when the output is int
515 template <>
516 struct Convertor<int> {
517  /// function convert
518  /// \brief Convert the cl::sycl::int4 input type to the int output type.
519  /// parameters:
520  /// \param t input type needed to be converted
521  /// \return int
522  static inline int convert(cl::sycl::int4 t) { return t.x(); }
523 
524  /// function convert
525  /// \brief Returns the int input type.
526  /// parameters:
527  /// \param t input type needed to be converted
528  /// \return int
529  static inline int convert(int t) { return t; }
530 };
531 /// \brief specialisation of the Convertor when the output is float
532 template <>
533 struct Convertor<float> {
534  /// function convert
535  /// \brief Convert the cl::sycl::float4 input type to the float output type.
536  /// parameters:
537  /// \param t input type needed to be converted
538  /// \return float
539  static inline float convert(cl::sycl::float4 t) { return t.x(); }
540 
541  /// function convert
542  /// \brief Returns the float input type.
543  /// parameters:
544  /// \param t input type needed to be converted
545  /// \return float
546  static inline float convert(float t) { return t; }
547 };
548 
549 /// function convert
550 /// \brief template deduction for Convertor struct
551 /// template parameters
552 /// \tparam T1 the output type
553 /// \tparam T2 the input type
554 /// function parameters
555 /// \param x: the input pixel
556 /// \return T1
557 template <typename T1, typename T2>
558 inline T1 convert(T2 x) {
559  return Convertor<T1>::convert(x);
560 };
561 } // tools
562 } // internal
563 } // visioncpp
564 #endif // VISIONCPP_INCLUDE_FRAMEWORK_TOOLS_CONVERT_HPP_
T1 convert(T2 x)
function convert
Definition: convert.hpp:558
Storage< float, 4 > F32C4
Definition: pixel.hpp:121
Storage< unsigned char, 4 > U8C4
Definition: pixel.hpp:141
Storage< unsigned char, 3 > U8C3
Definition: pixel.hpp:136
Storage< float, 3 > F32C3
Definition: pixel.hpp:116
VisionCpp namespace.
Definition: sycl/device.hpp:24
static char convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:451
static short convert(char t)
function convert
Definition: convert.hpp:459
static cl::sycl::float4 convert(float t)
function convert
Definition: convert.hpp:94
static cl::sycl::float4 convert(visioncpp::pixel::U8C4 t)
function convert
Definition: convert.hpp:84
static cl::sycl::float4 convert(visioncpp::pixel::F32C4 t)
function convert
Definition: convert.hpp:65
static cl::sycl::float4 convert(visioncpp::pixel::U8C3 t)
function convert
Definition: convert.hpp:74
static cl::sycl::float4 convert(visioncpp::pixel::F32C3 t)
function convert
Definition: convert.hpp:56
static cl::sycl::int4 convert(visioncpp::pixel::U8C3 t)
function convert
Definition: convert.hpp:126
static cl::sycl::int4 convert(visioncpp::pixel::F32C4 t)
function convert
Definition: convert.hpp:116
static cl::sycl::int4 convert(visioncpp::pixel::F32C3 t)
function convert
Definition: convert.hpp:106
static cl::sycl::int4 convert(int t)
function convert
Definition: convert.hpp:146
static cl::sycl::int4 convert(visioncpp::pixel::U8C4 t)
function convert
Definition: convert.hpp:136
static cl::sycl::uint4 convert(visioncpp::pixel::F32C4 t)
function convert
Definition: convert.hpp:169
static cl::sycl::uint4 convert(visioncpp::pixel::U8C3 t)
function convert
Definition: convert.hpp:180
static cl::sycl::uint4 convert(visioncpp::pixel::U8C4 t)
function convert
Definition: convert.hpp:191
static cl::sycl::uint4 convert(visioncpp::pixel::F32C3 t)
function convert
Definition: convert.hpp:158
static cl::sycl::uint4 convert(unsigned int t)
function convert
Definition: convert.hpp:203
static cl::sycl::uint4 convert(unsigned char t)
function convert
Definition: convert.hpp:213
static float convert(cl::sycl::float4 t)
function convert
Definition: convert.hpp:539
static float convert(float t)
function convert
Definition: convert.hpp:546
static int convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:522
static int convert(int t)
function convert
Definition: convert.hpp:529
static short convert(short t)
function convert
Definition: convert.hpp:495
static short convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:488
static unsigned char convert(unsigned char t)
function convert
Definition: convert.hpp:441
static unsigned char convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:434
static unsigned int convert(unsigned int t)
function convert
Definition: convert.hpp:512
static int convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:505
static unsigned short convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:470
static unsigned short convert(unsigned short t)
function convert
Definition: convert.hpp:478
static visioncpp::pixel::F32C3 convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:243
static visioncpp::pixel::F32C3 convert(float t)
function convert
Definition: convert.hpp:265
static visioncpp::pixel::F32C3 convert(cl::sycl::float4 t)
function convert
Definition: convert.hpp:225
static visioncpp::pixel::F32C3 convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:254
static visioncpp::pixel::F32C3 convert(visioncpp::pixel::F32C3 t)
function convert
Definition: convert.hpp:234
static visioncpp::pixel::F32C4 convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:295
static visioncpp::pixel::F32C4 convert(float t)
function convert
Definition: convert.hpp:317
static visioncpp::pixel::F32C4 convert(visioncpp::pixel::F32C4 t)
function convert
Definition: convert.hpp:286
static visioncpp::pixel::F32C4 convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:306
static visioncpp::pixel::F32C4 convert(cl::sycl::float4 t)
function convert
Definition: convert.hpp:277
static visioncpp::pixel::U8C3 convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:356
static visioncpp::pixel::U8C3 convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:367
static visioncpp::pixel::U8C3 convert(visioncpp::pixel::U8C3 t)
function convert
Definition: convert.hpp:347
static visioncpp::pixel::U8C3 convert(unsigned char t)
function convert
Definition: convert.hpp:338
static visioncpp::pixel::U8C3 convert(cl::sycl::float4 t)
function convert
Definition: convert.hpp:329
static visioncpp::pixel::U8C4 convert(unsigned char t)
function convert
Definition: convert.hpp:390
static visioncpp::pixel::U8C4 convert(visioncpp::pixel::U8C4 t)
function convert
Definition: convert.hpp:399
static visioncpp::pixel::U8C4 convert(cl::sycl::int4 t)
function convert
Definition: convert.hpp:408
static visioncpp::pixel::U8C4 convert(cl::sycl::uint4 t)
function convert
Definition: convert.hpp:419
static visioncpp::pixel::U8C4 convert(cl::sycl::float4 t)
function convert
Definition: convert.hpp:381
This struct is used to convert the provide struct to flot4, uint4, int4 memory.
Definition: convert.hpp:38
static T convert(T t)
function convert
Definition: convert.hpp:45