Skip to content

Commit 63b5692

Browse files
authored
[libclc] Relicense gen_convert.py (#132213)
Similar to work done in 82912fd, this commit re-licenses both the gen_convert.py script and the file it generates. It previously possessed an MIT license, with three additional individual copyrights. The file it generated was similar, but to only two of the three individuals. LLVM's policy is not to accept contributions that include in-source copyright notices [1]. I'm not aware whether the individuals concerned signed the re-licensing agreement or not. It takes the opportunity to update the description(s) in the header files, since the previous comments were out of date. [1] https://llvm.org/docs/DeveloperPolicy.html#embedded-copyright-or-contributed-by-statements
1 parent 6328506 commit 63b5692

File tree

1 file changed

+29
-51
lines changed

1 file changed

+29
-51
lines changed

libclc/generic/lib/gen_convert.py

Lines changed: 29 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,27 @@
1-
# OpenCL built-in library: type conversion functions
1+
##===----------------------------------------------------------------------===##
22
#
3-
# Copyright (c) 2013 Victor Oliveira <[email protected]>
4-
# Copyright (c) 2013 Jesse Towner <[email protected]>
5-
# Copyright (c) 2024 Romaric Jodin <[email protected]>
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
66
#
7-
# Permission is hereby granted, free of charge, to any person obtaining a copy
8-
# of this software and associated documentation files (the "Software"), to deal
9-
# in the Software without restriction, including without limitation the rights
10-
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11-
# copies of the Software, and to permit persons to whom the Software is
12-
# furnished to do so, subject to the following conditions:
7+
##===----------------------------------------------------------------------===##
138
#
14-
# The above copyright notice and this permission notice shall be included in
15-
# all copies or substantial portions of the Software.
16-
#
17-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23-
# THE SOFTWARE.
24-
25-
# This script generates the file convert_type.cl, which contains all of the
9+
# This script generates OpenCL type conversion builtins, which are all of the
2610
# OpenCL functions in the form:
2711
#
28-
# convert_<destTypen><_sat><_roundingMode>(<sourceTypen>)
12+
# <prefix>convert_<destTypen><_sat><_roundingMode>(<sourceTypen>)
13+
#
14+
# The internal "CLC" versions of these builtins, with the <prefix> '__clc_'
15+
# contain the actual implementations. These are generated by passing the
16+
# '--clc' flag to the script.
17+
#
18+
# The OpenCL builtins, without any prefix, forward on to the CLC versions.
19+
#
20+
##===----------------------------------------------------------------------===##
2921

3022
import argparse
3123
from sys import stderr
24+
from os import path
3225

3326
parser = argparse.ArgumentParser()
3427
parser.add_argument(
@@ -196,34 +189,19 @@ def conditional_guard(src, dst):
196189
)
197190

198191
print(
199-
f"""/* !!!! AUTOGENERATED FILE generated by convert_type.py !!!!!
200-
201-
DON'T CHANGE THIS FILE. MAKE YOUR CHANGES TO convert_type.py AND RUN:
202-
$ ./generate-conversion-type-cl.sh
203-
204-
OpenCL type conversion functions
205-
206-
Copyright (c) 2013 Victor Oliveira <[email protected]>
207-
Copyright (c) 2013 Jesse Towner <[email protected]>
208-
209-
Permission is hereby granted, free of charge, to any person obtaining a copy
210-
of this software and associated documentation files (the "Software"), to deal
211-
in the Software without restriction, including without limitation the rights
212-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
213-
copies of the Software, and to permit persons to whom the Software is
214-
furnished to do so, subject to the following conditions:
215-
216-
The above copyright notice and this permission notice shall be included in
217-
all copies or substantial portions of the Software.
218-
219-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
220-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
221-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
222-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
223-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
224-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
225-
THE SOFTWARE.
226-
*/
192+
f"""//===----------------------------------------------------------------------===//
193+
//
194+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
195+
// See https://llvm.org/LICENSE.txt for license information.
196+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
197+
//
198+
//===----------------------------------------------------------------------===//
199+
//
200+
// Automatically generated from {path.basename(__file__)}, do not edit!
201+
//
202+
// OpenCL type conversion functions
203+
//
204+
//===----------------------------------------------------------------------===//
227205
228206
{nl.join(['#include ' + f for f in includes])}
229207
#include <clc/clc_convert.h>

0 commit comments

Comments
 (0)