forked from JetBrains-Research/boost.simd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix some rounding funtions implementation (agenium-scale#348)
trunc, floor and ceil has been simplified/optimized
- Loading branch information
Showing
40 changed files
with
1,151 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright 2016 - NumScale SAS | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// ------------------------------------------------------------------------------------------------- | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <boost/simd/function/ceil.hpp> | ||
#include <simd_bench.hpp> | ||
#include <boost/simd/function/simd/ceil.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SCALAR_BENCH(scalar_ceil, bs::ceil); | ||
DEFINE_SCALAR_BENCH(scalar_regular_ceil, bs::ceil); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<scalar_ceil, NS_BENCH_IEEE_TYPES>(-10, 10); | ||
nsb::for_each<scalar_regular_ceil, NS_BENCH_NUMERIC_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <boost/simd/function/floor.hpp> | ||
#include <simd_bench.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SCALAR_BENCH(scalar_regular_floor, bs::floor); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<scalar_regular_floor, NS_BENCH_IEEE_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <boost/simd/function/floor.hpp> | ||
#include <boost/simd/function/std.hpp> | ||
#include <simd_bench.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SCALAR_BENCH(scalar_std_floor, bs::std_(bs::floor)); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<scalar_std_floor, NS_BENCH_IEEE_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <simd_bench.hpp> | ||
#include <boost/simd/function/trunc.hpp> | ||
#include <boost/simd/function/raw.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SCALAR_BENCH(scalar_raw_trunc, bs::raw_(bs::trunc)); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<scalar_raw_trunc, NS_BENCH_NUMERIC_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright 2016 - NumScale SAS | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// ------------------------------------------------------------------------------------------------- | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <simd_bench.hpp> | ||
#include <boost/simd/function/simd/trunc.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SCALAR_BENCH(scalar_trunc, bs::trunc); | ||
DEFINE_SCALAR_BENCH(scalar_regular_trunc, bs::trunc); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<scalar_trunc, NS_BENCH_IEEE_TYPES>(-10, 10); | ||
nsb::for_each<scalar_regular_trunc, NS_BENCH_NUMERIC_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright 2016 - NumScale SAS | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// ------------------------------------------------------------------------------------------------- | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
#include <simd_bench.hpp> | ||
#include <boost/simd/function/simd/ceil.hpp> | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <boost/simd/function/ceil.hpp> | ||
#include <boost/simd/pack.hpp> | ||
#include <simd_bench.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SIMD_BENCH(simd_ceil, bs::ceil); | ||
DEFINE_SIMD_BENCH(simd_regular_ceil, bs::ceil); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<simd_ceil, NS_BENCH_IEEE_TYPES>(-10, 10); | ||
nsb::for_each<simd_regular_ceil, NS_BENCH_NUMERIC_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <boost/simd/function/trunc.hpp> | ||
#include <boost/simd/function/raw.hpp> | ||
#include <boost/simd/pack.hpp> | ||
#include <simd_bench.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SIMD_BENCH(simd_raw_trunc, bs::raw_(bs::trunc)); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<simd_raw_trunc, NS_BENCH_NUMERIC_TYPES>(-10, 10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright 2016 - NumScale SAS | ||
// | ||
// Distributed under the Boost Software License, Version 1.0. | ||
// See accompanying file LICENSE.txt or copy at | ||
// http://www.boost.org/LICENSE_1_0.txt | ||
// ------------------------------------------------------------------------------------------------- | ||
//================================================================================================== | ||
/** | ||
Copyright 2016 NumScale SAS | ||
#include <simd_bench.hpp> | ||
Distributed under the Boost Software License, Version 1.0. | ||
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) | ||
**/ | ||
//================================================================================================== | ||
#include <boost/simd/function/simd/trunc.hpp> | ||
#include <boost/simd/pack.hpp> | ||
#include <simd_bench.hpp> | ||
|
||
namespace nsb = ns::bench; | ||
namespace bs = boost::simd; | ||
|
||
DEFINE_SIMD_BENCH(simd_trunc, bs::trunc); | ||
DEFINE_SIMD_BENCH(simd_regular_trunc, bs::trunc); | ||
|
||
DEFINE_BENCH_MAIN() | ||
{ | ||
nsb::for_each<simd_trunc, NS_BENCH_IEEE_TYPES>(-10, 10); | ||
nsb::for_each<simd_regular_trunc, NS_BENCH_NUMERIC_TYPES>(-10, 10); | ||
} |
Oops, something went wrong.