brintos

brintos / llvm-project-archived public Read only

0
0
Text · 954 B · 9bef3a9 Raw
32 lines · plain
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include <clc/internal/clc.h>10 11_CLC_DEF _CLC_OVERLOAD float __clc_fmin(float x, float y) {12  return __builtin_fminf(x, y);13}14 15#ifdef cl_khr_fp6416#pragma OPENCL EXTENSION cl_khr_fp64 : enable17_CLC_DEF _CLC_OVERLOAD double __clc_fmin(double x, double y) {18  return __builtin_fmin(x, y);19}20#endif21 22#ifdef cl_khr_fp1623#pragma OPENCL EXTENSION cl_khr_fp16 : enable24_CLC_DEF _CLC_OVERLOAD half __clc_fmin(half x, half y) {25  return __builtin_fminf16(x, y);26}27#endif28 29#define __CLC_FUNCTION __clc_fmin30#define __CLC_BODY <clc/shared/binary_def_scalarize.inc>31#include <clc/math/gentype.inc>32