Skip to content

Commit 4c74866

Browse files
committed
Add license boilerplate to single-header include
1 parent 227f987 commit 4c74866

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

combine.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22
import subprocess
33
from datetime import datetime
44

5+
license_boilerplate = """/*
6+
* Kernel Float: Header-only library for vector types and reduced precision floating-point math.
7+
*
8+
* Licensed under the Apache License, Version 2.0 (the "License");
9+
* you may not use this file except in compliance with the License.
10+
* You may obtain a copy of the License at
11+
*
12+
* http://www.apache.org/licenses/LICENSE-2.0
13+
*
14+
* Unless required by applicable law or agreed to in writing, software
15+
* distributed under the License is distributed on an "AS IS" BASIS,
16+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
* See the License for the specific language governing permissions and
18+
* limitations under the License.
19+
*/
20+
21+
"""
22+
523
directory = "include/kernel_float"
624
contents = dict()
725

@@ -28,7 +46,8 @@
2846
except Exception as e:
2947
print(f"warning: {e}")
3048

31-
output = "\n".join([
49+
output = license_boilerplate
50+
output += "\n".join([
3251
"//" + "=" * 80,
3352
"// this file has been auto-generated, do not modify its contents!",
3453
f"// date: {date}",

single_include/kernel_float.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1+
/*
2+
* Kernel Float: Header-only library for vector types and reduced precision floating-point math.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
//================================================================================
218
// this file has been auto-generated, do not modify its contents!
3-
// date: 2023-09-21 09:37:28.638971
4-
// git hash: 07af0ad9ff5c16595790d579577244bc482f0999
19+
// date: 2023-09-21 10:00:11.122069
20+
// git hash: 227f987d3fc10499e680bb68f00e1c579afeda97
521
//================================================================================
622

723
#ifndef KERNEL_FLOAT_MACROS_H

0 commit comments

Comments
 (0)