• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 The SwiftShader 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 #ifndef VK_DEBUG_TYPE_HPP_
16 #define VK_DEBUG_TYPE_HPP_
17 
18 #include <memory>
19 
20 #include <cstdint>
21 #include <string>
22 
23 namespace vk {
24 namespace dbg {
25 
26 // clang-format off
27 template <typename T> struct TypeOf;
28 template <> struct TypeOf<bool>     { static std::string name; };
29 template <> struct TypeOf<uint8_t>  { static std::string name; };
30 template <> struct TypeOf<int8_t>   { static std::string name; };
31 template <> struct TypeOf<uint16_t> { static std::string name; };
32 template <> struct TypeOf<int16_t>  { static std::string name; };
33 template <> struct TypeOf<float>    { static std::string name; };
34 template <> struct TypeOf<uint32_t> { static std::string name; };
35 template <> struct TypeOf<int32_t>  { static std::string name; };
36 template <> struct TypeOf<double>   { static std::string name; };
37 template <> struct TypeOf<uint64_t> { static std::string name; };
38 template <> struct TypeOf<int64_t>  { static std::string name; };
39 // clang-format on
40 
41 }  // namespace dbg
42 }  // namespace vk
43 
44 #endif  // VK_DEBUG_TYPE_HPP_
45