================
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef __CLC_SUBGROUP_CLC_SUB_GROUP_REDUCE_H__
+#define __CLC_SUBGROUP_CLC_SUB_GROUP_REDUCE_H__
+
+#include "clc/internal/clc.h"
+
+#define __CLC_FUNCTION __clc_sub_group_reduce_add
----------------
wenju-he wrote:

There will be less lines if all sub_group_reduce_* functions are specified in 
the .inc file:
```
_CLC_OVERLOAD _CLC_DECL _CLC_CONST __CLC_GENTYPE
__clc_sub_group_reduce_add(__CLC_GENTYPE x);

_CLC_OVERLOAD _CLC_DECL _CLC_CONST __CLC_GENTYPE
__clc_sub_group_reduce_min(__CLC_GENTYPE x);

_CLC_OVERLOAD _CLC_DECL _CLC_CONST __CLC_GENTYPE
__clc_sub_group_reduce_max(__CLC_GENTYPE x);
```
And then this file only need four lines:
```
#define __CLC_BODY <clc/subgroup/clc_sub_group_reduce.inc>
#include <clc/integer/gentype.inc>

#define __CLC_BODY <clc/subgroup/clc_sub_group_reduce.inc>
#include <clc/math/gentype.inc>
```

https://github.com/llvm/llvm-project/pull/185294
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to