Skip to content

Commit 257d60e

Browse files
authored
GPU: fix Float16_t compatibility (#15950)
1 parent 1c4118c commit 257d60e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎GPU/GPUTracking/TPCClusterFinder/GPUTPCNNClusterizerKernels.cxx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ using namespace o2::gpu::tpccf;
2929
namespace o2::OrtDataType
3030
{
3131
struct Float16_t {
32-
half v;
32+
half val;
3333
Float16_t() = default;
34-
Float16_t(float f) : v(f) {}
34+
explicit Float16_t(float v) : val(v) {}
35+
float ToFloat() const { return (float)val; }
36+
explicit operator float() const { return ToFloat(); }
3537
};
3638
} // namespace o2::OrtDataType
3739
#else

0 commit comments

Comments
 (0)