Skip to content

Commit 3a82756

Browse files
committed
add Apache 2.0 license header
1 parent 84e3a47 commit 3a82756

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

xls/dslx/stdlib/round.x

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(type_inference_v2)]
2-
31
// Copyright 2025 The XLS Authors
42
//
53
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -14,6 +12,8 @@
1412
// See the License for the specific language governing permissions and
1513
// limitations under the License.
1614

15+
#![feature(type_inference_v2)]
16+
1717
// Implements rounding for all rounding modes defined by the IEEE 754 standard.
1818
//
1919
// It handles unsigned, signed (two's complement), and sign-and-magnitude values.

xls/dslx/stdlib/tests/gen_round_tests.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Copyright 2025 The XLS Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
115
"""Generate DSLX round() tests.
216
317
This script produces a comprehensive set of DSLX tests that exercise the
@@ -31,8 +45,8 @@
3145

3246

3347
class RoundingMode(Enum):
34-
RNE = auto() # convergent / bankers-rounding (nearest, ties-to-even)
35-
RNA = auto() # away from zero
48+
RNE = auto() # nearest, ties-to-even
49+
RNA = auto() # nearest, ties away from zero
3650
RTZ = auto() # towards zero
3751
RTN = auto() # towards -∞
3852
RTP = auto() # towards +∞

xls/dslx/stdlib/tests/round_tests.x

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2025 The XLS Authors
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#![feature(type_inference_v2)]
216

317
import std;

0 commit comments

Comments
 (0)