// Copyright (c) Advanced Micro Devices, Inc., or its affiliates. // SDX-License-Identifier: MIT #ifndef CK_C_STYLE_POINTER_CAST_HPP #define CK_C_STYLE_POINTER_CAST_HPP #include "type.hpp" #include "enable_if.hpp" namespace ck { template && is_pointer_v, bool>::type = false> __host__ __device__ PY c_style_pointer_cast([[clang::lifetimebound]] PX p_x) { #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wold-style-cast" #pragma clang diagnostic ignored "-Wcast-align" #endif return (PY)p_x; // NOLINT(old-style-cast, cast-align) #ifdef __clang__ #pragma clang diagnostic pop #endif } } // namespace ck #endif