FEAT
3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
half.hpp
1
// FEAT3: Finite Element Analysis Toolbox, Version 3
2
// Copyright (C) 2010 by Stefan Turek & the FEAT group
3
// FEAT3 is released under the GNU General Public License version 3,
4
// see the file 'copyright.txt' in the top level directory for details.
5
6
#pragma once
7
8
// if cuda supports fp16 arithmetics, include the cuda sdk fp16 header for cpu and gpu computing in datatype __half
9
#ifdef FEAT_HAVE_HALFMATH
10
#include <cuda_fp16.h>
11
#endif
// FEAT_HAVE_HALFMATH
12
13
namespace
FEAT
14
{
15
#if defined(FEAT_HAVE_HALFMATH) || defined(DOXYGEN)
25
typedef
__half
Half
;
26
// class Half : public __half
27
// {
28
// public:
29
// // use constructors from __half parent class
30
// using __half::__half;
31
32
// // Half(const int & other) : __half(double(other))
33
// // {
34
// // }
35
36
// // Half(const unsigned int & other) : __half(double(other))
37
// // {
38
// // }
39
40
// // Half(const long & other) : __half(double(other))
41
// // {
42
// // }
43
44
// // Half(const unsigned long & other) : __half(double(other))
45
// // {
46
// // }
47
48
// constexpr Half& operator=(const __half& other)
49
// {
50
// *this = other;
51
// return *this;
52
// }
53
54
// // Half& operator+=(const Half& other)
55
// // {
56
// // float dother(other);
57
// // float dthis(*this);
58
// // dthis += dother;
59
// // *this = dthis;
60
// // return *this;
61
// // }
62
63
// // Half& operator*=(const Half& other)
64
// // {
65
// // float dother(other);
66
// // float dthis(*this);
67
// // dthis *= dother;
68
// // *this = dthis;
69
// // return *this;
70
// // }
71
72
// // Half& operator/=(const Half& other)
73
// // {
74
// // float dother(other);
75
// // float dthis(*this);
76
// // dthis /= dother;
77
// // *this = dthis;
78
// // return *this;
79
// // }
80
81
// // Half& operator-=(const Half& other)
82
// // {
83
// // float dother(other);
84
// // float dthis(*this);
85
// // dthis -= dother;
86
// // *this = dthis;
87
// // return *this;
88
// // }
89
90
// // Half operator-()
91
// // {
92
// // float dthis(*this);
93
// // dthis = -dthis;
94
// // return Half(dthis);
95
// // }
96
// };
97
#endif
// FEAT_HAVE_HALFMATH
98
99
}
// namespace FEAT
FEAT
FEAT namespace.
Definition:
adjactor.hpp:12
FEAT::Half
__half Half
Half data type.
Definition:
half.hpp:25
kernel
util
half.hpp
Generated by
1.9.5