mirror of
				https://github.com/intel/intel-graphics-compiler.git
				synced 2025-10-30 08:18:26 +08:00 
			
		
		
		
	Add support for enum type in RTCompileOptionsT
Add support for enum type in RTCompileOptionsT
This commit is contained in:
		| @ -18,11 +18,12 @@ SPDX-License-Identifier: MIT | ||||
|  | ||||
| #include <type_traits> | ||||
| #include <assert.h> | ||||
| #include "AdaptorCommon/API/igc.h" | ||||
|  | ||||
| namespace Interface { | ||||
|  | ||||
| template <typename T> class Optional { | ||||
|   static_assert(std::is_arithmetic_v<T>, "simple types for now!"); | ||||
|   static_assert(std::is_arithmetic_v<T> || std::is_enum_v<T>, "simple types for now!"); | ||||
|  | ||||
|   T Val; | ||||
|   bool Valid = false; | ||||
| @ -59,4 +60,8 @@ public: | ||||
|   void reset() { Valid = false; } | ||||
| }; | ||||
|  | ||||
| template <typename T> inline bool operator==(const Optional<T> &, const Optional<T> &) { | ||||
|   return true; | ||||
| } | ||||
|  | ||||
| } // namespace Interface | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jarosz, Piotr
					Jarosz, Piotr