// SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-License-Identifier: Apache-2.0 #pragma once template struct Promote { /* * The "Promote" object can be used to discover a computation floating type that * is both efficient on hardward, and also doesn't result in a loss of precision. * * Examples: * Promote::type == float * Promote::type == double * Promote::type == float * * Additionally, the promote structure can be used to discover the best computation * type when given heterogeneous input types. * * Examples: * Promote::type == double * Promote::type == float */ typedef float type; }; template<> struct Promote { typedef double type; }; template<> struct Promote { typedef double type; }; template struct Promote { typedef double type; }; template struct Promote { typedef double type; }; template struct Promote { typedef typename Promote::type>::type type; };