From 2ffe635962ed03eae4e40778b0f06d1eb7b115e4 Mon Sep 17 00:00:00 2001 From: "John K. Luebs" Date: Wed, 30 Oct 2024 17:23:31 -0500 Subject: [PATCH] Add CI --- .github/workflows/swift.yml | 5 ++--- LICENSE | 32 ++++++++++++++++++++++++++++++++ LICENSE.txt | 18 ------------------ Package.swift | 1 + README.md | 6 +++++- 5 files changed, 40 insertions(+), 22 deletions(-) create mode 100644 LICENSE delete mode 100644 LICENSE.txt diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index b90cfb9..0026107 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,17 +13,16 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - swift: ["5.9", "5.10, "6.0"] + swift: ["5.9", "5.10", "6.0"] steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up Swift ${{ matrix.swift }} - uses: fwal/setup-swift@v1 + uses: NeedleInAJayStack/setup-swift@feat/swift-6 with: swift-version: ${{ matrix.swift }} - os: ${{ matrix.os }} - name: Build and Run Tests run: | diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..680ffc4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,32 @@ +BSD 3-Clause License + +Copyright (c) 2024 John K. Luebs +Copyright (c) 2020 Dario Mambro (dario.mambro@gmail.com) +Copyright (c) 2019 Hayati Ayguen (h_ayguen@web.de) +Copyright (c) 2013 Julien Pommier (pommier@modartt.com) +Copyright (c) 2004 the University Corporation for Atmospheric Research ("UCAR"). All rights reserved. Developed by NCAR's Computational and Information Systems Laboratory, UCAR, www.cisl.ucar.edu. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 639c0d0..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,18 +0,0 @@ -Copyright (c) 2024 John K. Luebs -Copyright (c) 2020 Dario Mambro (dario.mambro@gmail.com) -Copyright (c) 2019 Hayati Ayguen (h_ayguen@web.de) -Copyright (c) 2013 Julien Pommier (pommier@modartt.com) -Copyright (c) 2004 the University Corporation for Atmospheric -Research ("UCAR"). All rights reserved. Developed by NCAR's -Computational and Information Systems Laboratory, UCAR, -www.cisl.ucar.edu. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Package.swift b/Package.swift index 68e3db6..f07a9f4 100644 --- a/Package.swift +++ b/Package.swift @@ -20,6 +20,7 @@ let package = Package( publicHeadersPath: "include", cSettings: [ .define("PFFFT_SCALVEC_ENABLED", to: "1"), + .define("PFFFT_ENABLE_NEON"), .define("_USE_MATH_DEFINES"), .define("NDEBUG"), ] diff --git a/README.md b/README.md index 3e58392..93f62be 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[![CI](https://github.com/jkl1337/SwiftPFFFT/actions/workflows/swift.yml/badge.svg)](https://github.com/jkl1337/SwiftPFFFT/actions/workflows/swift.yml) +[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fjkl1337%2FSwiftPFFFT%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/jkl1337/SwiftPFFFT) +[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fjkl1337%2FSwiftPFFFT%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/jkl1337/SwiftPFFFT) + # SwiftPFFFT Swift package providing a PFFFT (Pretty Fast, Fast Fourier Transform) library with wrapper. @@ -21,7 +25,7 @@ performance with much simpler usage and a permissive 3 clause BSD license. let fft = try FFT>(n: 16) let signal = fft.makeSignalBuffer() -signal.mutateEach { (i, v) in +signal.mapInPlace { (i, v) in v = Complex(Float(i) + 1.0, Float(i) - 2.0) }