Loading...
Searching...
No Matches
half.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_GF_HALF_H
8#define PXR_BASE_GF_HALF_H
9
15
16#include "pxr/pxr.h"
17#include "pxr/base/gf/ilmbase_half.h"
18#include "pxr/base/gf/ilmbase_halfLimits.h"
19#include "pxr/base/gf/traits.h"
20
21PXR_NAMESPACE_OPEN_SCOPE
22
24using GfHalf = pxr_half::half;
25
26namespace pxr_half {
28 inline size_t hash_value(const half h) { return h.bits(); }
29 // Explicitly delete hashing via implicit conversion of half to float
30 size_t hash_value(float) = delete;
31}
32
33template <>
35 public std::integral_constant<bool, true>{};
36
37PXR_NAMESPACE_CLOSE_SCOPE
38
39
40#endif // PXR_BASE_GF_HALF_H
pxr_half::half GfHalf
A 16-bit floating point data type.
Definition: half.h:24
size_t hash_value(const half h)
Overload hash_value for half.
Definition: half.h:28
A metafunction which is equivalent to std::is_floating_point but allows for additional specialization...
Definition: traits.h:45