-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from t20100/update-c-blosc2
Updated `c-blosc2` v2.15.0 and `ZStd` library v1.5.6
- Loading branch information
Showing
338 changed files
with
10,738 additions
and
5,762 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,5 +1,5 @@ | ||
name: CI Fuzz | ||
on: [pull_request] | ||
on: [push, pull_request] | ||
jobs: | ||
Fuzzing: | ||
runs-on: ubuntu-latest | ||
|
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,6 +1,6 @@ | ||
# Blosc - Blocked Shuffling and Compression Library | ||
# | ||
# Copyright (c) 2021 The Blosc Development Team <[email protected]> | ||
# Copyright (c) 2021 Blosc Development Team <[email protected]> | ||
# https://blosc.org | ||
# License: BSD 3-Clause (see LICENSE.txt) | ||
# | ||
|
@@ -271,53 +271,49 @@ endif() | |
# for newer hardware on older machines as well as cross-compilation. | ||
message(STATUS "Building for system processor ${CMAKE_SYSTEM_PROCESSOR}") | ||
message(STATUS "Building for compiler ID ${CMAKE_C_COMPILER_ID}") | ||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL i386 OR | ||
CMAKE_SYSTEM_PROCESSOR STREQUAL i686 OR | ||
CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR | ||
CMAKE_SYSTEM_PROCESSOR STREQUAL amd64 OR | ||
CMAKE_SYSTEM_PROCESSOR STREQUAL AMD64) | ||
if(CMAKE_C_COMPILER_ID STREQUAL GNU) | ||
if(CMAKE_SYSTEM_PROCESSOR MATCHES i386|i686|x86_64|amd64|AMD64) | ||
if(CMAKE_C_COMPILER_ID MATCHES GNU) | ||
# We need C99 (GNU99 more exactly) | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") | ||
set(COMPILER_SUPPORT_SSE2 TRUE) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.7 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 4.7) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 4.7) | ||
set(COMPILER_SUPPORT_AVX2 TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_AVX2 FALSE) | ||
endif() | ||
# GCC 10.3.2 (the version in manylinux_2014) seems to have issues supporting dynamic dispatching | ||
# of AVX512. GCC 11.4 is the first minimal version that works well here. | ||
# That means that Linux wheels will have AVX512 disabled, but that's life. | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 11.4 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 11.4) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.4) | ||
set(COMPILER_SUPPORT_AVX512 TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_AVX512 FALSE) | ||
endif() | ||
elseif(CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) | ||
elseif(CMAKE_C_COMPILER_ID MATCHES Clang|AppleClang) | ||
set(COMPILER_SUPPORT_SSE2 TRUE) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.2 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 3.2) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.2) | ||
set(COMPILER_SUPPORT_AVX2 TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_AVX2 FALSE) | ||
endif() | ||
# Clang 13 is the minimum version that we know that works with AVX512 dynamic dispatch. | ||
# Perhaps lesser versions work too, better to err on the safe side. | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 13.0 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 13.0) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.0) | ||
set(COMPILER_SUPPORT_AVX512 TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_AVX512 FALSE) | ||
endif() | ||
elseif(CMAKE_C_COMPILER_ID STREQUAL Intel) | ||
elseif(CMAKE_C_COMPILER_ID MATCHES Intel|IntelLLVM) | ||
# All Intel compilers since the introduction of AVX512 in 2016 should support it, so activate all SIMD flavors | ||
set(COMPILER_SUPPORT_SSE2 TRUE) | ||
set(COMPILER_SUPPORT_AVX2 TRUE) | ||
set(COMPILER_SUPPORT_AVX512 TRUE) | ||
elseif(MSVC) | ||
set(COMPILER_SUPPORT_SSE2 TRUE) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 18.00.30501 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 18.00.30501) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 18.00.30501) | ||
set(COMPILER_SUPPORT_AVX2 TRUE) | ||
# AVX512 starts to be supported since Visual Studio 17 15.0 | ||
elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER 19.10.25017 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 19.10.25017) | ||
elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 19.10.25017) | ||
set(COMPILER_SUPPORT_AVX512 TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_AVX2 FALSE) | ||
|
@@ -329,17 +325,15 @@ if(CMAKE_SYSTEM_PROCESSOR STREQUAL i386 OR | |
# Unrecognized compiler. Emit a warning message to let the user know hardware-acceleration won't be available. | ||
message(WARNING "Unable to determine which ${CMAKE_SYSTEM_PROCESSOR} hardware features are supported by the C compiler (${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}).") | ||
endif() | ||
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR | ||
CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64 OR | ||
CMAKE_SYSTEM_PROCESSOR STREQUAL arm64) | ||
if(CMAKE_C_COMPILER_ID STREQUAL GNU) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 5.2 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 5.2) | ||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES armv7l|aarch64|arm64) | ||
if(CMAKE_C_COMPILER_ID MATCHES GNU) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 5.2) | ||
set(COMPILER_SUPPORT_NEON TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_NEON FALSE) | ||
endif() | ||
elseif(CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL AppleClang) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.3 OR CMAKE_C_COMPILER_VERSION VERSION_EQUAL 3.3) | ||
elseif(CMAKE_C_COMPILER_ID MATCHES Clang|AppleClang) | ||
if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.3) | ||
set(COMPILER_SUPPORT_NEON TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_NEON FALSE) | ||
|
@@ -350,9 +344,9 @@ elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR | |
message(WARNING "Unable to determine which ${CMAKE_SYSTEM_PROCESSOR} hardware features are supported by the C compiler (${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}).") | ||
endif() | ||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64le|powerpc64le)") | ||
if(CMAKE_C_COMPILER_ID STREQUAL GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 8) | ||
if(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 8) | ||
set(COMPILER_SUPPORT_ALTIVEC TRUE) | ||
elseif(CMAKE_C_COMPILER_ID STREQUAL Clang AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 13) | ||
elseif(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 13) | ||
set(COMPILER_SUPPORT_ALTIVEC TRUE) | ||
else() | ||
set(COMPILER_SUPPORT_ALTIVEC FALSE) | ||
|
@@ -381,13 +375,13 @@ endif() | |
|
||
# Set the "-msse2" build flag only if the CMAKE_C_FLAGS is not already set. | ||
# Probably "-msse2" should be appended to CMAKE_C_FLAGS_RELEASE. | ||
if(CMAKE_C_COMPILER_ID STREQUAL GNU OR CMAKE_C_COMPILER_ID STREQUAL Clang OR CMAKE_C_COMPILER_ID STREQUAL Intel) | ||
if(CMAKE_C_COMPILER_ID MATCHES GNU|Clang|Intel|IntelLLVM) | ||
if(NOT CMAKE_C_FLAGS AND COMPILER_SUPPORT_SSE2) | ||
set(CMAKE_C_FLAGS -msse2 CACHE STRING "C flags." FORCE) | ||
endif() | ||
endif() | ||
|
||
if(CMAKE_C_COMPILER_ID STREQUAL Intel OR CMAKE_C_COMPILER_ID STREQUAL Clang OR HAIKU) | ||
if(CMAKE_C_COMPILER_ID MATCHES Intel|IntelLLVM|Clang OR HAIKU) | ||
# We need to tell Intel and Clang compilers about what level of POSIX they support | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600") | ||
endif() | ||
|
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,14 +1,12 @@ | ||
Some conventions used in C-Blosc2 | ||
================================= | ||
|
||
* Use C99 designated initialization whenever possible (specially in examples). | ||
* Use C99 designated initialization only in examples. Libraries should use C89 initialization, which is more portable, specially with C++ (designated initialization in C++ is supported only since C++20). | ||
|
||
* Use _new and _free for memory allocating constructors and destructors and _init and _destroy for non-memory allocating constructors and destructors. | ||
|
||
* Lines must not exceed 120 characters. If a line is too long, it must be broken into several lines. | ||
|
||
Naming things | ||
------------- | ||
* Conditional bodies must always use braces, even if they are one-liners. The only exception that can be is when the conditional is a single line and the body is a single line: | ||
|
||
Naming is one of the most time-consuming tasks, but critical for communicating effectively. Here it is a preliminary list of names that I am not comfortable with: | ||
|
||
* We are currently calling `filters` to a data transformation function that essentially produces the same amount of data, but with bytes shuffled or transformed in different ways. Perhaps `transformers` would be a better name? | ||
if (condition) whatever(); |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ BSD License | |
For Blosc - A blocking, shuffling and lossless compression library | ||
|
||
Copyright (c) 2009-2018 Francesc Alted <[email protected]> | ||
Copyright (c) 2019-present The Blosc Development Team <[email protected]> | ||
Copyright (c) 2019-present Blosc Development Team <[email protected]> | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ A fast, compressed and persistent data store library for C | |
========================================================== | ||
|
||
|
||
:Author: The Blosc Development Team | ||
:Author: Blosc Development Team | ||
:Contact: [email protected] | ||
:URL: https://www.blosc.org | ||
:Gitter: |gitter| | ||
|
@@ -37,6 +37,7 @@ C-Blosc2 is the new major version of `C-Blosc <https://github.com/Blosc/c-blosc> | |
|
||
See a 3 minutes `introductory video to Blosc2 <https://www.youtube.com/watch?v=ER12R7FXosk>`_. | ||
|
||
|
||
Blosc2 NDim: an N-Dimensional store | ||
=================================== | ||
|
||
|
@@ -119,6 +120,19 @@ More info about the `improved capabilities of C-Blosc2 can be found in this talk | |
C-Blosc2 API and format have been frozen, and that means that there is guarantee that your programs will continue to work with future versions of the library, and that next releases will be able to read from persistent storage generated from previous releases (as of 2.0.0). | ||
|
||
|
||
Open format | ||
=========== | ||
|
||
The Blosc2 format is open and documented in the next documents: | ||
|
||
* [The chunk; the basic building block](https://github.com/Blosc/c-blosc2/blob/main/README_CHUNK_FORMAT.rst) | ||
* [The cframe; this is made of different chunks in contiguous storage](https://github.com/Blosc/c-blosc2/blob/main/README_CFRAME_FORMAT.rst) | ||
* [The sframe; a variation of the cframe for sparse storage](https://github.com/Blosc/c-blosc2/blob/main/README_SFRAME_FORMAT.rst) | ||
* [The b2nd metalayer; info for the n-dimensional data container](https://github.com/Blosc/c-blosc2/blob/main/README_B2ND_METALAYER.rst) | ||
|
||
All these documents take less than 1000 lines of text, so they should be easy to read and understand. In our opinion, this is very important for the long-term success of the library, as it allows for third-party implementations of the format, and also for the users to understand what is going on under the hood. | ||
|
||
|
||
Python wrapper | ||
============== | ||
|
||
|
@@ -250,4 +264,4 @@ See `THANKS document <https://github.com/Blosc/c-blosc2/blob/main/THANKS.rst>`_. | |
|
||
---- | ||
|
||
-- The Blosc Development Team. **We make compression better.** | ||
-- Blosc Development Team. **We make compression better.** |
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
Oops, something went wrong.