This commit also refactors how geometric builtins are defined and declared, by sharing more helpers. It also removes an unnecessary gentype-like helper in favour of the more complete math/gentype.inc. There are no changes to the IR for any of these four builtins. The 'normalize' builtin will follow in a subsequent commit because it would involve the addition of missing halfn-type overloads for completeness.
17 lines
580 B
C
17 lines
580 B
C
//===----------------------------------------------------------------------===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#define __CLC_FUNCTION normalize
|
|
#define __CLC_GEOMETRIC_RET_GENTYPE
|
|
#define __CLC_BODY <clc/geometric/unary_decl.inc>
|
|
|
|
#include <clc/math/gentype.inc>
|
|
|
|
#undef __CLC_GEOMETRIC_RET_GENTYPE
|
|
#undef __CLC_FUNCTION
|