linux/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.c

// SPDX-License-Identifier: MIT
//
// Copyright 2024 Advanced Micro Devices, Inc.


#include "lib_float_math.h"

#define ASSERT(condition)

#define isNaN(number)

 /*
  * NOTE:
  *   This file is gcc-parseable HW gospel, coming straight from HW engineers.
  *
  * It doesn't adhere to Linux kernel style and sometimes will do things in odd
  * ways. Unless there is something clearly wrong with it the code should
  * remain as-is as it provides us with a guarantee from HW that it is correct.
  */

double math_mod(const double arg1, const double arg2)
{}

double math_min2(const double arg1, const double arg2)
{}

double math_max2(const double arg1, const double arg2)
{}

double math_floor2(const double arg, const double significance)
{}

double math_floor(const double arg)
{}

double math_ceil(const double arg)
{}

double math_ceil2(const double arg, const double significance)
{}

double math_max3(double v1, double v2, double v3)
{}

double math_max4(double v1, double v2, double v3, double v4)
{}

double math_max5(double v1, double v2, double v3, double v4, double v5)
{}

float math_pow(float a, float exp)
{}

double math_fabs(double a)
{}

float math_log(float a, float b)
{}

float math_log2(float a)
{}

// approximate log2 value of a input
//  - precise if the input pwr of 2, else the approximation will be an integer = floor(actual_log2)
unsigned int math_log2_approx(unsigned int a)
{}

double math_round(double a)
{}