osc copypac from project:devel:languages:haskell:ghc-9.10.x package:ghc-bitvec revision:3, using keep-link
OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-bitvec?expand=0&rev=12
This commit is contained in:
commit
387d4c9137
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
bitvec-1.1.5.0.tar.gz
Normal file
3
bitvec-1.1.5.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:83d27cee5be1d5342ddbf39999d0c8ea54cb433d0891eea5471fbfaa29f8dec5
|
||||
size 40076
|
172
bitvec.cabal
Normal file
172
bitvec.cabal
Normal file
@ -0,0 +1,172 @@
|
||||
name: bitvec
|
||||
version: 1.1.5.0
|
||||
x-revision: 2
|
||||
cabal-version: 2.0
|
||||
build-type: Simple
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
copyright: 2019-2022 Andrew Lelechenko, 2012-2016 James Cook
|
||||
maintainer: Andrew Lelechenko <andrew.lelechenko@gmail.com>
|
||||
homepage: https://github.com/Bodigrim/bitvec
|
||||
synopsis: Space-efficient bit vectors
|
||||
description:
|
||||
A newtype over 'Bool' with a better 'Vector' instance: 8x less memory, up to 3500x faster.
|
||||
.
|
||||
The <https://hackage.haskell.org/package/vector vector>
|
||||
package represents unboxed arrays of 'Bool's
|
||||
spending 1 byte (8 bits) per boolean.
|
||||
This library provides a newtype wrapper 'Bit' and a custom instance
|
||||
of an unboxed 'Vector', which packs bits densely,
|
||||
achieving an __8x smaller memory footprint.__
|
||||
The performance stays mostly the same;
|
||||
the most significant degradation happens for random writes
|
||||
(up to 10% slower).
|
||||
On the other hand, for certain bulk bit operations
|
||||
'Vector' 'Bit' is up to 3500x faster than 'Vector' 'Bool'.
|
||||
.
|
||||
=== Thread safety
|
||||
.
|
||||
* "Data.Bit" is faster, but writes and flips are not thread-safe.
|
||||
This is because naive updates are not atomic:
|
||||
they read the whole word from memory,
|
||||
then modify a bit, then write the whole word back.
|
||||
Concurrently modifying non-intersecting slices of the same underlying array
|
||||
may also lead to unexpected results, since they can share a word in memory.
|
||||
* "Data.Bit.ThreadSafe" is slower (usually 10-20%),
|
||||
but writes and flips are thread-safe.
|
||||
Additionally, concurrently modifying non-intersecting slices of the same underlying array
|
||||
works as expected. However, operations that affect multiple elements are not
|
||||
guaranteed to be atomic.
|
||||
.
|
||||
=== Similar packages
|
||||
.
|
||||
* <https://hackage.haskell.org/package/bv bv> and
|
||||
<https://hackage.haskell.org/package/bv-little bv-little>
|
||||
do not offer mutable vectors.
|
||||
.
|
||||
* <https://hackage.haskell.org/package/array array>
|
||||
is memory-efficient for 'Bool', but lacks
|
||||
a handy 'Vector' interface and is not thread-safe.
|
||||
|
||||
category: Data, Bit Vectors
|
||||
author: Andrew Lelechenko <andrew.lelechenko@gmail.com>,
|
||||
James Cook <mokus@deepbondi.net>
|
||||
|
||||
tested-with: GHC ==8.4.4 GHC ==8.6.5 GHC ==8.8.1 GHC ==8.8.2 GHC ==8.8.4 GHC ==8.10.7 GHC ==9.0.2 GHC ==9.2.7 GHC ==9.4.4 GHC ==9.6.1
|
||||
extra-doc-files:
|
||||
changelog.md
|
||||
README.md
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: git://github.com/Bodigrim/bitvec.git
|
||||
|
||||
flag simd
|
||||
description:
|
||||
Use a C SIMD implementation for the ultimate performance of `zipBits`, `invertBits` and `countBits`.
|
||||
Disable this flag if there are problems with the C FFI.
|
||||
default: True
|
||||
manual: True
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
Data.Bit
|
||||
Data.Bit.ThreadSafe
|
||||
build-depends:
|
||||
base >=4.11 && <5,
|
||||
bytestring >=0.10 && <0.13,
|
||||
deepseq <1.6,
|
||||
primitive >=0.5,
|
||||
vector >=0.11 && <0.14
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: src
|
||||
other-modules:
|
||||
Data.Bit.F2Poly
|
||||
Data.Bit.F2PolyTS
|
||||
Data.Bit.Immutable
|
||||
Data.Bit.ImmutableTS
|
||||
Data.Bit.Internal
|
||||
Data.Bit.InternalTS
|
||||
Data.Bit.Mutable
|
||||
Data.Bit.MutableTS
|
||||
Data.Bit.PdepPext
|
||||
Data.Bit.Utils
|
||||
ghc-options: -O2 -Wall -Wcompat
|
||||
include-dirs: src
|
||||
|
||||
if impl(ghc <9.0)
|
||||
build-depends: integer-gmp
|
||||
else
|
||||
build-depends: ghc-bignum
|
||||
|
||||
if flag(simd) && !arch(javascript) && !arch(wasm32)
|
||||
c-sources: cbits/bitvec_simd.c
|
||||
cc-options: -fopenmp-simd
|
||||
cpp-options: -DUseSIMD
|
||||
other-modules:
|
||||
Data.Bit.SIMD
|
||||
|
||||
test-suite bitvec-tests
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Main.hs
|
||||
build-depends:
|
||||
base,
|
||||
bitvec,
|
||||
primitive >=0.5 && <0.10,
|
||||
quickcheck-classes-base <0.7,
|
||||
quickcheck-classes >=0.6.1 && <0.7,
|
||||
vector >=0.11,
|
||||
tasty <1.6,
|
||||
tasty-quickcheck <0.12
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: test
|
||||
other-modules:
|
||||
Support
|
||||
Tests.Conc
|
||||
Tests.F2Poly
|
||||
Tests.MVector
|
||||
Tests.MVectorTS
|
||||
Tests.SetOps
|
||||
Tests.SetOpsTS
|
||||
Tests.Vector
|
||||
ghc-options: -Wall -threaded -rtsopts -Wcompat
|
||||
include-dirs: test
|
||||
|
||||
if impl(ghc <9.0)
|
||||
build-depends: integer-gmp <1.2
|
||||
else
|
||||
build-depends: ghc-bignum
|
||||
|
||||
benchmark bitvec-bench
|
||||
build-depends:
|
||||
base,
|
||||
bitvec,
|
||||
containers <0.8,
|
||||
random <1.3,
|
||||
tasty,
|
||||
tasty-bench >=0.3.2 && <0.5,
|
||||
vector
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Bench.hs
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: bench
|
||||
other-modules:
|
||||
Bench.BitIndex
|
||||
Bench.Common
|
||||
Bench.GCD
|
||||
Bench.Invert
|
||||
Bench.Intersection
|
||||
Bench.Product
|
||||
Bench.RandomFlip
|
||||
Bench.RandomRead
|
||||
Bench.RandomWrite
|
||||
Bench.Remainder
|
||||
Bench.Reverse
|
||||
Bench.Sum
|
||||
Bench.Union
|
||||
ghc-options: -O2 -Wall -Wcompat
|
||||
|
||||
if impl(ghc <9.0)
|
||||
build-depends: integer-gmp
|
||||
else
|
||||
build-depends: ghc-bignum
|
47
ghc-bitvec.changes
Normal file
47
ghc-bitvec.changes
Normal file
@ -0,0 +1,47 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 15 19:56:01 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update bitvec to version 1.1.5.0 revision 2.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 8 21:08:37 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update bitvec to version 1.1.5.0 revision 1.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 15 20:29:27 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update bitvec to version 1.1.5.0.
|
||||
# 1.1.5.0
|
||||
|
||||
* Make `zipBits` unconditionally strict in its second bit
|
||||
vector argument (thanks to @treeowl).
|
||||
|
||||
* Add `simd` flag (enabled by default) to use a C SIMD
|
||||
implementation for `zipBits`, `invertBits`, `countBits`,
|
||||
`bitIndex`, `nthBitIndex`, `selectBits`, `excludeBits`,
|
||||
`reverseBits` (thanks to @konsumlamm).
|
||||
|
||||
* Decomission `libgmp` flag.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 30 17:05:59 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Updated spec file to conform with ghc-rpm-macros-2.5.2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 20 22:35:27 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update bitvec to version 1.1.4.0.
|
||||
# 1.1.4.0
|
||||
|
||||
* Include `Data.Bit.Gmp` only if `libgmp` flag is set.
|
||||
* Tweak inlining pragmas to inline less aggressively.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 19 21:30:49 UTC 2022 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Add bitvec at version 1.1.3.0.
|
||||
|
143
ghc-bitvec.spec
Normal file
143
ghc-bitvec.spec
Normal file
@ -0,0 +1,143 @@
|
||||
#
|
||||
# spec file for package ghc-bitvec
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global pkg_name bitvec
|
||||
%global pkgver %{pkg_name}-%{version}
|
||||
%bcond_with tests
|
||||
Name: ghc-%{pkg_name}
|
||||
Version: 1.1.5.0
|
||||
Release: 0
|
||||
Summary: Space-efficient bit vectors
|
||||
License: BSD-3-Clause
|
||||
URL: https://hackage.haskell.org/package/%{pkg_name}
|
||||
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
|
||||
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/2.cabal#/%{pkg_name}.cabal
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-base-devel
|
||||
BuildRequires: ghc-base-prof
|
||||
BuildRequires: ghc-bytestring-devel
|
||||
BuildRequires: ghc-bytestring-prof
|
||||
BuildRequires: ghc-deepseq-devel
|
||||
BuildRequires: ghc-deepseq-prof
|
||||
BuildRequires: ghc-primitive-devel
|
||||
BuildRequires: ghc-primitive-prof
|
||||
BuildRequires: ghc-rpm-macros
|
||||
BuildRequires: ghc-vector-devel
|
||||
BuildRequires: ghc-vector-prof
|
||||
ExcludeArch: %{ix86}
|
||||
%if %{with tests}
|
||||
BuildRequires: ghc-quickcheck-classes-base-devel
|
||||
BuildRequires: ghc-quickcheck-classes-base-prof
|
||||
BuildRequires: ghc-quickcheck-classes-devel
|
||||
BuildRequires: ghc-quickcheck-classes-prof
|
||||
BuildRequires: ghc-tasty-devel
|
||||
BuildRequires: ghc-tasty-prof
|
||||
BuildRequires: ghc-tasty-quickcheck-devel
|
||||
BuildRequires: ghc-tasty-quickcheck-prof
|
||||
%endif
|
||||
|
||||
%description
|
||||
A newtype over 'Bool' with a better 'Vector' instance: 8x less memory, up to
|
||||
3500x faster.
|
||||
|
||||
The <https://hackage.haskell.org/package/vector vector> package represents
|
||||
unboxed arrays of 'Bool's spending 1 byte (8 bits) per boolean. This library
|
||||
provides a newtype wrapper 'Bit' and a custom instance of an unboxed 'Vector',
|
||||
which packs bits densely, achieving an __8x smaller memory footprint.__ The
|
||||
performance stays mostly the same; the most significant degradation happens for
|
||||
random writes (up to 10% slower). On the other hand, for certain bulk bit
|
||||
operations 'Vector' 'Bit' is up to 3500x faster than 'Vector' 'Bool'.
|
||||
|
||||
=== Thread safety
|
||||
|
||||
* "Data.Bit" is faster, but writes and flips are not thread-safe. This is
|
||||
because naive updates are not atomic: they read the whole word from memory,
|
||||
then modify a bit, then write the whole word back. Concurrently modifying
|
||||
non-intersecting slices of the same underlying array may also lead to
|
||||
unexpected results, since they can share a word in memory. *
|
||||
"Data.Bit.ThreadSafe" is slower (usually 10-20%), but writes and flips are
|
||||
thread-safe. Additionally, concurrently modifying non-intersecting slices of
|
||||
the same underlying array works as expected. However, operations that affect
|
||||
multiple elements are not guaranteed to be atomic.
|
||||
|
||||
=== Similar packages
|
||||
|
||||
* <https://hackage.haskell.org/package/bv bv> and
|
||||
<https://hackage.haskell.org/package/bv-little bv-little> do not offer mutable
|
||||
vectors.
|
||||
|
||||
* <https://hackage.haskell.org/package/array array> is memory-efficient for
|
||||
'Bool', but lacks a handy 'Vector' interface and is not thread-safe.
|
||||
|
||||
%package devel
|
||||
Summary: Haskell %{pkg_name} library development files
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: ghc-compiler = %{ghc_version}
|
||||
Requires(post): ghc-compiler = %{ghc_version}
|
||||
Requires(postun): ghc-compiler = %{ghc_version}
|
||||
|
||||
%description devel
|
||||
This package provides the Haskell %{pkg_name} library development files.
|
||||
|
||||
%package -n ghc-%{pkg_name}-doc
|
||||
Summary: Haskell %{pkg_name} library documentation
|
||||
Requires: ghc-filesystem
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n ghc-%{pkg_name}-doc
|
||||
This package provides the Haskell %{pkg_name} library documentation.
|
||||
|
||||
%package -n ghc-%{pkg_name}-prof
|
||||
Summary: Haskell %{pkg_name} profiling library
|
||||
Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
|
||||
Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
|
||||
|
||||
%description -n ghc-%{pkg_name}-prof
|
||||
This package provides the Haskell %{pkg_name} profiling library.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pkg_name}-%{version}
|
||||
cp -p %{SOURCE1} %{pkg_name}.cabal
|
||||
|
||||
%build
|
||||
%ghc_lib_build
|
||||
|
||||
%install
|
||||
%ghc_lib_install
|
||||
|
||||
%check
|
||||
%cabal_test
|
||||
|
||||
%post devel
|
||||
%ghc_pkg_recache
|
||||
|
||||
%postun devel
|
||||
%ghc_pkg_recache
|
||||
|
||||
%files -f %{name}.files
|
||||
%license LICENSE
|
||||
|
||||
%files devel -f %{name}-devel.files
|
||||
%doc README.md changelog.md
|
||||
|
||||
%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
|
||||
%license LICENSE
|
||||
|
||||
%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user