1 /*
2  * Copyright (C) 2020-2021 Intel Corporation
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  */
7 
8 #pragma once
9 
10 namespace L0 {
11 namespace ult {
12 
13 template <typename Type>
14 struct WhiteBox : public Type {
15     using Type::Type;
16 };
17 
18 template <typename Type>
whitebox_cast(Type * obj)19 WhiteBox<Type> *whitebox_cast(Type *obj) {
20     return static_cast<WhiteBox<Type> *>(obj);
21 }
22 
23 template <typename Type>
whitebox_cast(Type & obj)24 WhiteBox<Type> &whitebox_cast(Type &obj) {
25     return static_cast<WhiteBox<Type> &>(obj);
26 }
27 
28 template <typename Type>
blackbox_cast(WhiteBox<Type> * obj)29 Type *blackbox_cast(WhiteBox<Type> *obj) {
30     return static_cast<Type *>(obj);
31 }
32 
33 } // namespace ult
34 } // namespace L0
35