diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c49857..7c90c1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,20 +1,17 @@ name: julia on: - push: - branches: - - master pull_request: jobs: - testMKLjl: + test: name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: version: - - "1.6" - - "1" + - "1.11" + - "1.10" os: - ubuntu-latest - macOS-latest @@ -40,8 +37,9 @@ jobs: ${{ runner.os }}- - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest - - uses: julia-actions/julia-processcoverage@v1 - - if: matrix.version == '1.8' && matrix.os == 'ubuntu-latest' + - if: matrix.version == '1.10' && matrix.os == 'ubuntu-latest' + uses: julia-actions/julia-processcoverage@v1 + - if: matrix.version == '1.10' && matrix.os == 'ubuntu-latest' uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..efff8b0 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,40 @@ +name: julia +on: + pull_request: + schedule: + - cron: "0 0 * * *" # Runs daily at midnight UTC + +jobs: + test: + name: ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - "nightly" + os: + - ubuntu-latest + - macOS-latest + - windows-latest + arch: + - x64 + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@latest + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - name: Cache artifacts + uses: actions/cache@v4 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/julia-runtest@latest diff --git a/Project.toml b/Project.toml index 440eb6c..8033c93 100644 --- a/Project.toml +++ b/Project.toml @@ -1,13 +1,13 @@ name = "IntelVectorMath" uuid = "c8ce9da6-5d36-5c03-b118-5a70151be7bc" -version = "0.5.3" +version = "0.5.4" [deps] MKL_jll = "856f044c-d86e-5d09-b602-aeab76dc8ba7" [compat] -julia = "1.6" -MKL_jll = "2022, 2023.2, 2024" +julia = "1.10" +MKL_jll = "2022, 2023.2, 2024, 2025" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/src/IntelVectorMath.jl b/src/IntelVectorMath.jl index 8e725ff..ee528e3 100644 --- a/src/IntelVectorMath.jl +++ b/src/IntelVectorMath.jl @@ -15,85 +15,7 @@ function __init__() end end -## list all functions -# all functions that work for Floats and ComplexFloats -unary_real_complex = ( - (:acos, :acos!, :Acos), - (:asin, :asin!, :Asin), - (:acosh, :acosh!, :Acosh), - (:asinh, :asinh!, :Asinh), - (:sqrt, :sqrt!, :Sqrt), - (:exp, :exp!, :Exp), - (:log, :log!, :Ln), -) - -binary_real_complex = ( - (:pow, :pow!, :Pow, true), - (:divide, :divide!, :Div, true), -) - -# all functions that work for Floats only -unary_real = ( - (:cbrt, :cbrt!, :Cbrt), - (:expm1, :expm1!, :Expm1), - (:log1p, :log1p!, :Log1p), - (:log2, :log2!, :Log2), - (:abs, :abs!, :Abs), - (:abs2, :abs2!, :Sqr), - (:ceil, :ceil!, :Ceil), - (:floor, :floor!, :Floor), - (:round, :round!, :Round), - (:trunc, :trunc!, :Trunc), - (:cospi, :cospi!, :Cospi), - (:sinpi, :sinpi!, :Sinpi), - (:tanpi, :tanpi!, :Tanpi), - (:acospi, :acospi!, :Acospi), - (:asinpi, :asinpi!, :Asinpi), - (:atanpi, :atanpi!, :Atanpi), - (:cosd, :cosd!, :Cosd), - (:sind, :sind!, :Sind), - (:tand, :tand!, :Tand), - # Enabled only for Real. MKL guarantees higher accuracy, but at a - # substantial performance cost. - (:atan, :atan!, :Atan), - (:cos, :cos!, :Cos), - (:sin, :sin!, :Sin), - (:tan, :tan!, :Tan), - (:atanh, :atanh!, :Atanh), - (:cosh, :cosh!, :Cosh), - (:sinh, :sinh!, :Sinh), - (:tanh, :tanh!, :Tanh), - (:log10, :log10!, :Log10), - # now in SpecialFunctions (make smart, maybe?) - (:erf, :erf!, :Erf), - (:erfc, :erfc!, :Erfc), - (:erfinv, :erfinv!, :ErfInv), - (:erfcinv, :erfcinv!, :ErfcInv), - (:lgamma, :lgamma!, :LGamma), - (:gamma, :gamma!, :TGamma), - # Not in Base - (:inv_cbrt, :inv_cbrt!, :InvCbrt), - (:inv_sqrt, :inv_sqrt!, :InvSqrt), - (:pow2o3, :pow2o3!, :Pow2o3), - (:pow3o2, :pow3o2!, :Pow3o2), - (:cdfnorm, :cdfnorm!, :CdfNorm), -) - -binary_real = ( - (:atan, :atan!, :Atan2, false), - (:hypot, :hypot!, :Hypot, false), - # Not in Base - (:atanpi, :atanpi!, :Atan2pi, false), -) - -unary_complex_in = ( - (:abs, :abs!, :Abs), - (:angle, :angle!, :Arg), -) - -unary_complex_inout = ( - (:conj, :conj!, :Conj), -) +include("function_list.jl") ## define functions from previous list for all eligible input types diff --git a/src/function_list.jl b/src/function_list.jl new file mode 100644 index 0000000..7cd0ba7 --- /dev/null +++ b/src/function_list.jl @@ -0,0 +1,79 @@ +## list all functions +# all functions that work for Floats and ComplexFloats +unary_real_complex = ( + (:acos, :acos!, :Acos), + (:asin, :asin!, :Asin), + (:acosh, :acosh!, :Acosh), + (:asinh, :asinh!, :Asinh), + (:sqrt, :sqrt!, :Sqrt), + (:exp, :exp!, :Exp), + (:log, :log!, :Ln), +) + +binary_real_complex = ( + (:pow, :pow!, :Pow, true), + (:divide, :divide!, :Div, true), +) + +# all functions that work for Floats only +unary_real = ( + (:cbrt, :cbrt!, :Cbrt), + (:expm1, :expm1!, :Expm1), + (:log1p, :log1p!, :Log1p), + (:log2, :log2!, :Log2), + (:abs, :abs!, :Abs), + (:abs2, :abs2!, :Sqr), + (:ceil, :ceil!, :Ceil), + (:floor, :floor!, :Floor), + (:round, :round!, :Round), + (:trunc, :trunc!, :Trunc), + (:cospi, :cospi!, :Cospi), + (:sinpi, :sinpi!, :Sinpi), + (:tanpi, :tanpi!, :Tanpi), + (:acospi, :acospi!, :Acospi), + (:asinpi, :asinpi!, :Asinpi), + (:atanpi, :atanpi!, :Atanpi), + (:cosd, :cosd!, :Cosd), + (:sind, :sind!, :Sind), + (:tand, :tand!, :Tand), + # Enabled only for Real. MKL guarantees higher accuracy, but at a + # substantial performance cost. + (:atan, :atan!, :Atan), + (:cos, :cos!, :Cos), + (:sin, :sin!, :Sin), + (:tan, :tan!, :Tan), + (:atanh, :atanh!, :Atanh), + (:cosh, :cosh!, :Cosh), + (:sinh, :sinh!, :Sinh), + (:tanh, :tanh!, :Tanh), + (:log10, :log10!, :Log10), + # now in SpecialFunctions (make smart, maybe?) + (:erf, :erf!, :Erf), + (:erfc, :erfc!, :Erfc), + (:erfinv, :erfinv!, :ErfInv), + (:erfcinv, :erfcinv!, :ErfcInv), + (:lgamma, :lgamma!, :LGamma), + (:gamma, :gamma!, :TGamma), + # Not in Base + (:inv_cbrt, :inv_cbrt!, :InvCbrt), + (:inv_sqrt, :inv_sqrt!, :InvSqrt), + (:pow2o3, :pow2o3!, :Pow2o3), + (:pow3o2, :pow3o2!, :Pow3o2), + (:cdfnorm, :cdfnorm!, :CdfNorm), +) + +binary_real = ( + (:atan, :atan!, :Atan2, false), + (:hypot, :hypot!, :Hypot, false), + # Not in Base + (:atanpi, :atanpi!, :Atan2pi, false), +) + +unary_complex_in = ( + (:abs, :abs!, :Abs), + (:angle, :angle!, :Arg), +) + +unary_complex_inout = ( + (:conj, :conj!, :Conj), +)