35 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/math/clc_log.h>10 11float __nv_logf(float);12double __nv_log(double);13 14_CLC_OVERLOAD _CLC_DEF float __clc_log(float x) { return __nv_logf(x); }15 16#ifdef cl_khr_fp6417#pragma OPENCL EXTENSION cl_khr_fp64 : enable18 19_CLC_OVERLOAD _CLC_DEF double __clc_log(double x) { return __nv_log(x); }20 21#endif22 23#ifdef cl_khr_fp1624#pragma OPENCL EXTENSION cl_khr_fp16 : enable25 26_CLC_OVERLOAD _CLC_DEF half __clc_log(half x) {27 return (half)__clc_log((float)x);28}29 30#endif31 32#define __CLC_FUNCTION __clc_log33#define __CLC_BODY <clc/shared/unary_def_scalarize.inc>34#include <clc/math/gentype.inc>35