diff options
| author | CoprDistGit <infra@openeuler.org> | 2024-11-05 15:13:18 +0000 | 
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2024-11-05 15:13:18 +0000 | 
| commit | 9520a0728fc51145991da3ba8cf8ce62545a2b85 (patch) | |
| tree | 4bf87c6bb1e4176135da6303704bc85bf1f11048 | |
| parent | 7afb37588015d1a7764092ad013d8d6966544ad4 (diff) | |
automatic import of fxdiv
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | fxdiv.spec | 82 | ||||
| -rw-r--r-- | sources | 1 | 
3 files changed, 84 insertions, 0 deletions
@@ -0,0 +1 @@ +/FXdiv-63058ef.tar.gz diff --git a/fxdiv.spec b/fxdiv.spec new file mode 100644 index 0000000..9fd2a40 --- /dev/null +++ b/fxdiv.spec @@ -0,0 +1,82 @@ +%global commit0 63058eff77e11aa15bf531df5dd34395ec3017c8 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global date0 20201208 +%global upstream_name FXdiv +  +Summary:        Header for division via fixed-point math +Name:           fxdiv +License:        MIT +Version:        1.0^git%{date0}.%{shortcommit0} +Release:        5%{?dist} +  +# Only a header +BuildArch:      noarch +  +URL:            https://github.com/Maratyszcza/%{name} +Source0:        %{url}/archive/%{commit0}/%{upstream_name}-%{shortcommit0}.tar.gz +  +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: gtest-devel +  +%description +Header-only library for division via fixed-point multiplication by inverse +  +On modern CPUs and GPUs integer division is several times slower +than multiplication. FXdiv implements an algorithm to replace an +integer division with a multiplication and two shifts. This +algorithm improves performance when an application performs repeated +divisions by the same divisor. +  +Features +  * Integer division for uint32_t, uint64_t, and size_t +  * Header-only library, no installation or build required +  * Compatible with C99, C++, OpenCL, and CUDA +  * Uses platform-specific compiler intrinsics for optimal performance +  * Covered with unit tests and microbenchmarks +  +%package devel +  +Summary:        Header for division via fixed-point math +Provides:       %{name}-static = %{version}-%{release} +  +%description devel +Header-only library for division via fixed-point multiplication by inverse +  +On modern CPUs and GPUs integer division is several times slower +than multiplication. FXdiv implements an algorithm to replace an +integer division with a multiplication and two shifts. This +algorithm improves performance when an application performs repeated +divisions by the same divisor. +  +Features +  * Integer division for uint32_t, uint64_t, and size_t +  * Header-only library, no installation or build required +  * Compatible with C99, C++, OpenCL, and CUDA +  * Uses platform-specific compiler intrinsics for optimal performance +  * Covered with unit tests and microbenchmarks +  +%prep +%autosetup -p1 -n %{upstream_name}-%{commit0} +  +%build +  +%cmake \ +       -DFXDIV_USE_SYSTEM_LIBS=ON \ +       -DFXDIV_BUILD_TESTS=ON \ +       -DFXDIV_BUILD_BENCHMARKS=OFF \ +        +%cmake_build +%check +%ctest +%install +%cmake_install +%files devel +%license LICENSE +%doc README.md +%{_includedir}/fxdiv.h +  +%changelog +  +* Tue Nov 05 2024 Zheng Zhenyu <zhengzhenyu@openeuler.sh> - 1.0^git20201208.63058ef-1 +- Initial package @@ -0,0 +1 @@ +f38793da662d4376b5545c06b95ba8d4  FXdiv-63058ef.tar.gz  | 
