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
21#include <cstddef>
22
23PXR_NAMESPACE_OPEN_SCOPE
24
26using GfHalf = pxr_half::half;
27
28namespace pxr_half {
30 inline std::size_t hash_value(const half h) { return h.bits(); }
31 // Explicitly delete hashing via implicit conversion of half to float
32 std::size_t hash_value(float) = delete;
33}
34
35template <>
37 public std::integral_constant<bool, true>{};
38
39PXR_NAMESPACE_CLOSE_SCOPE
40
41
42#endif // PXR_BASE_GF_HALF_H
pxr_half::half GfHalf
A 16-bit floating point data type.
Definition: half.h:26
std::size_t hash_value(const half h)
Overload hash_value for half.
Definition: half.h:30
A metafunction which is equivalent to std::is_floating_point but allows for additional specialization...
Definition: traits.h:45