Skip to content

Commit ebcca07

Browse files
committed
update
1 parent 78922ca commit ebcca07

File tree

8 files changed

+43
-10
lines changed

8 files changed

+43
-10
lines changed
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
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-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
19
#ifndef __CLC_MATH_CLC_ILOGB_H__
210
#define __CLC_MATH_CLC_ILOGB_H__
311

4-
#define __CLC_BODY <clc/math/clc_ilogb.inc>
12+
#define __CLC_FUNCTION __clc_ilogb
13+
#define __CLC_BODY <clc/math/unary_decl_with_int_return.inc>
514
#include <clc/math/gentype.inc>
615

7-
#undef __CLC_BODY
16+
#undef __CLC_FUNCTION
817

918
#endif // __CLC_MATH_CLC_ILOGB_H__

libclc/clc/include/clc/math/clc_ilogb.inc

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
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-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
19
#ifndef __CLC_MATH_CLC_LOGB_H__
210
#define __CLC_MATH_CLC_LOGB_H__
311

412
#define __CLC_FUNCTION __clc_logb
513
#define __CLC_BODY <clc/shared/unary_decl.inc>
614
#include <clc/math/gentype.inc>
715

8-
#undef __CLC_BODY
916
#undef __CLC_FUNCTION
1017

1118
#endif // __CLC_MATH_CLC_LOGB_H__

libclc/generic/include/clc/math/ilogb.inc renamed to libclc/clc/include/clc/math/unary_decl_with_int_return.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
_CLC_OVERLOAD _CLC_DECL __CLC_INTN ilogb(__CLC_GENTYPE x);
9+
_CLC_OVERLOAD _CLC_DECL __CLC_INTN __CLC_FUNCTION(__CLC_GENTYPE x);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#include <clc/utils.h>
10+
11+
#ifndef __CLC_FUNCTION
12+
#define __CLC_FUNCTION(x) __CLC_CONCAT(__clc_, x)
13+
#endif
14+
15+
_CLC_OVERLOAD _CLC_DEF __CLC_INTN FUNCTION(__CLC_GENTYPE a) {
16+
return __CLC_FUNCTION(FUNCTION)(a);
17+
}

libclc/generic/include/clc/math/ilogb.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#define __CLC_BODY <clc/math/ilogb.inc>
9+
#define __CLC_FUNCTION ilogb
10+
#define __CLC_BODY <clc/math/unary_decl_with_int_return.inc>
1011

1112
#include <clc/math/gentype.inc>
13+
14+
#undef __CLC_FUNCTION

libclc/generic/lib/math/ilogb.cl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
#include <clc/clc.h>
1010
#include <clc/math/clc_ilogb.h>
1111

12-
#define __CLC_BODY "ilogb.inc"
12+
#define FUNCTION ilogb
13+
#define __CLC_BODY <clc/math/unary_def_with_int_return.inc>
1314
#include <clc/math/gentype.inc>

libclc/generic/lib/math/ilogb.inc

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)