34 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#include <clc/math/clc_ldexp.h>11 12#define __CLC_FUNCTION __clc_ldexp13#define __CLC_ARG2_TYPE int14#define __CLC_MIN_VECSIZE 115 16#ifdef __HAS_LDEXPF__17// This defines all the ldexp(floatN, intN) variants.18#define __CLC_FLOAT_ONLY19#define __CLC_IMPL_FUNCTION __builtin_amdgcn_ldexpf20#define __CLC_BODY <clc/shared/binary_def_scalarize.inc>21#include <clc/math/gentype.inc>22#undef __CLC_IMPL_FUNCTION23#endif24 25#ifdef cl_khr_fp6426#pragma OPENCL EXTENSION cl_khr_fp64 : enable27// This defines all the ldexp(doubleN, intN) variants.28#define __CLC_DOUBLE_ONLY29#define __CLC_IMPL_FUNCTION __builtin_amdgcn_ldexp30#define __CLC_BODY <clc/shared/binary_def_scalarize.inc>31#include <clc/math/gentype.inc>32#undef __CLC_IMPL_FUNCTION33#endif34