1 | /* Copyright 2015 The TensorFlow Authors. All Rights Reserved. |
2 | |
3 | Licensed under the Apache License, Version 2.0 (the "License"); |
4 | you may not use this file except in compliance with the License. |
5 | You may obtain a copy of the License at |
6 | |
7 | http://www.apache.org/licenses/LICENSE-2.0 |
8 | |
9 | Unless required by applicable law or agreed to in writing, software |
10 | distributed under the License is distributed on an "AS IS" BASIS, |
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 | See the License for the specific language governing permissions and |
13 | limitations under the License. |
14 | ==============================================================================*/ |
15 | |
16 | #ifndef TENSORFLOW_CORE_PLATFORM_TYPES_H_ |
17 | #define TENSORFLOW_CORE_PLATFORM_TYPES_H_ |
18 | |
19 | #include "tensorflow/core/platform/bfloat16.h" |
20 | #include "tensorflow/core/platform/platform.h" |
21 | #include "tensorflow/core/platform/tstring.h" |
22 | #include "tensorflow/tsl/platform/types.h" |
23 | |
24 | namespace tensorflow { |
25 | |
26 | // Alias tensorflow::string to std::string. |
27 | using tsl::string; |
28 | |
29 | using tsl::uint16; |
30 | using tsl::uint32; |
31 | using tsl::uint64; |
32 | using tsl::uint8; |
33 | |
34 | using tsl::int16; |
35 | using tsl::int32; |
36 | using tsl::int64; |
37 | using tsl::int8; |
38 | |
39 | static const uint8 kuint8max = tsl::kuint8max; |
40 | static const uint16 kuint16max = tsl::kuint16max; |
41 | static const uint32 kuint32max = tsl::kuint32max; |
42 | static const uint64 kuint64max = tsl::kuint64max; |
43 | static const int8_t kint8min = tsl::kint8min; |
44 | static const int8_t kint8max = tsl::kint8max; |
45 | static const int16_t kint16min = tsl::kint16min; |
46 | static const int16_t kint16max = tsl::kint16max; |
47 | static const int32_t kint32min = tsl::kint32min; |
48 | static const int32_t kint32max = tsl::kint32max; |
49 | static const int64_t kint64min = tsl::kint64min; |
50 | static const int64_t kint64max = tsl::kint64max; |
51 | |
52 | // A typedef for a uint64 used as a short fingerprint. |
53 | using tsl::bfloat16; |
54 | using tsl::Fprint; |
55 | using tsl::tstring; // NOLINT: suppress 'using decl 'tstring' is unused' |
56 | } // namespace tensorflow |
57 | |
58 | #endif // TENSORFLOW_CORE_PLATFORM_TYPES_H_ |
59 | |