Files
clang-p2996/libclc/clc/lib/generic/math/clc_ep_log.cl
Fraser Cormack db98e2922f [libclc] Move log1p/asinh/acosh/atanh to the CLC library (#132956)
These four functions all related in that they share tables and helper
functions. Furthermore, the acosh and atanh builtins call log1p.

As with other work in this area, these builtins are now vectorized. To
enable this, there are new table accessor functions which return a
vector of table values using a vector of indices. These are internally
scalarized, in the absence of gather operations. Some tables which were
tables of multiple entries (e.g., double2) are split into two separate
"low" and "high" tables. This might affect the performance of memory
operations but are hopefully mitigated by better codegen overall.
2025-03-27 09:19:07 +00:00

24 lines
692 B
Common Lisp

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifdef cl_khr_fp64
#include <clc/clc_convert.h>
#include <clc/internal/clc.h>
#include <clc/math/clc_ep_log.h>
#include <clc/math/clc_fma.h>
#include <clc/math/math.h>
#include <clc/math/tables.h>
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#define __CLC_BODY <clc_ep_log.inc>
#include <clc/math/gentype.inc>
#endif