-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixdeps 0.7 #40
Merged
Merged
Fixdeps 0.7 #40
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
5ad41c1
get rid of dep warings
scheidan 8c2f459
require julia 0.7-, remove Compat
scheidan 03e46c8
small fixes
scheidan f70bca4
update CI scripts for 0.7
scheidan d251043
use @info macro
scheidan 4d8e7b0
remove badges of old versions
scheidan 9ee393e
use functions of Sys to detect OS
scheidan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
BinDeps | ||
julia 0.4 | ||
Compat 0.8 | ||
julia 0.7- | ||
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,4 +1,4 @@ | ||
VERSION >= v"0.4.0-dev+6521" && __precompile__() | ||
__precompile__() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can remove this line since precompile is the default in 0.7. |
||
|
||
""" | ||
Julia wrappers around adaptive multidimensional integration routines | ||
|
@@ -11,10 +11,10 @@ simple interfaces to the more basic functionality (1d and >1d | |
integrals of scalar functions). | ||
""" | ||
module Cubature | ||
using Compat | ||
|
||
|
||
export hcubature, pcubature, hcubature_v, pcubature_v, | ||
hquadrature, pquadrature, hquadrature_v, pquadrature_v | ||
hquadrature, pquadrature, hquadrature_v, pquadrature_v | ||
|
||
const libcubature = joinpath(dirname(@__FILE__), "..", "deps", "libcubature") | ||
|
||
|
@@ -29,14 +29,14 @@ const SUCCESS = convert(Int32, 0) | |
const FAILURE = convert(Int32, 1) | ||
|
||
# type to distinguish cubature error codes from thrown exceptions | ||
type NoError <: Exception end # used for integrand_error when nothing thrown | ||
struct NoError <: Exception end # used for integrand_error when nothing thrown | ||
|
||
@compat type IntegrandData{F} | ||
struct IntegrandData{F} | ||
integrand_func::F | ||
integrand_error::Any | ||
(::Type{IntegrandData{F}}){F}(f) = new{F}(f, NoError()) | ||
(::Type{IntegrandData{F}})(f) where F = new{F}(f, NoError()) | ||
end | ||
IntegrandData{F}(f::F) = IntegrandData{F}(f) | ||
IntegrandData(f::F) where F = IntegrandData{F}(f) | ||
|
||
# C cubature code is not interrupt-safe (would leak memory), so | ||
# use sigatomic_begin/end to defer ctrl-c handling until Julia code | ||
|
@@ -109,13 +109,13 @@ for fscalar in (false, true) # whether the integrand is a scalar | |
end | ||
end | ||
|
||
@inline function cf{D}(f, d::D, v) | ||
@inline function cf(f, d::D, v) where D | ||
if v | ||
cfunction(f, Int32, | ||
(UInt32, UInt, Ptr{Float64}, Ref{D}, UInt32, Ptr{Float64})) | ||
@cfunction($f, Int32, | ||
(UInt32, UInt, Ptr{Float64}, Ref{D}, UInt32, Ptr{Float64})) | ||
else | ||
cfunction(f, Int32, | ||
(UInt32, Ptr{Float64}, Ref{D}, UInt32, Ptr{Float64})) | ||
@cfunction($f, Int32, | ||
(UInt32, Ptr{Float64}, Ref{D}, UInt32, Ptr{Float64})) | ||
end | ||
end | ||
function integrands(d, xscalar, fscalar, vectorized) | ||
|
@@ -139,12 +139,12 @@ function integrands(d, xscalar, fscalar, vectorized) | |
end | ||
|
||
# low-level routine, not to be called directly by user | ||
function cubature{F}(xscalar::Bool, fscalar::Bool, | ||
vectorized::Bool, padaptive::Bool, | ||
fdim::Integer, f::F, # Force specialization on F | ||
xmin_, xmax_, | ||
reqRelError::Real, reqAbsError::Real, maxEval::Integer, | ||
error_norm::Integer) | ||
function cubature(xscalar::Bool, fscalar::Bool, | ||
vectorized::Bool, padaptive::Bool, | ||
fdim::Integer, f::F, # Force specialization on F | ||
xmin_, xmax_, | ||
reqRelError::Real, reqAbsError::Real, maxEval::Integer, | ||
error_norm::Integer) where F | ||
dim = length(xmin_) | ||
if xscalar && dim != 1 | ||
throw(ArgumentError("quadrature routines are for 1d only")) | ||
|
@@ -160,8 +160,8 @@ function cubature{F}(xscalar::Bool, fscalar::Bool, | |
end | ||
xmin = Float64[xmin_...] | ||
xmax = Float64[xmax_...] | ||
val = Vector{Float64}(fdim) | ||
err = Vector{Float64}(fdim) | ||
val = Vector{Float64}(undef, fdim) | ||
err = Vector{Float64}(undef, fdim) | ||
d = IntegrandData(f) | ||
fwrap = integrands(d, xscalar, fscalar, vectorized) | ||
# ccall's first arg needs to be a constant expression, so | ||
|
@@ -171,7 +171,7 @@ function cubature{F}(xscalar::Bool, fscalar::Bool, | |
if padaptive | ||
if vectorized | ||
ret = ccall((:pcubature_v,libcubature), Int32, | ||
(UInt32, Ptr{Void}, Any, | ||
(UInt32, Ptr{Nothing}, Any, | ||
UInt32, Ptr{Float64}, Ptr{Float64}, | ||
UInt, Float64, Float64, Int32, | ||
Ptr{Float64}, Ptr{Float64}), | ||
|
@@ -180,7 +180,7 @@ function cubature{F}(xscalar::Bool, fscalar::Bool, | |
val, err) | ||
else | ||
ret = ccall((:pcubature,libcubature), Int32, | ||
(UInt32, Ptr{Void}, Any, | ||
(UInt32, Ptr{Nothing}, Any, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be |
||
UInt32, Ptr{Float64}, Ptr{Float64}, | ||
UInt, Float64, Float64, Int32, | ||
Ptr{Float64}, Ptr{Float64}), | ||
|
@@ -191,7 +191,7 @@ function cubature{F}(xscalar::Bool, fscalar::Bool, | |
else | ||
if vectorized | ||
ret = ccall((:hcubature_v,libcubature), Int32, | ||
(UInt32, Ptr{Void}, Any, | ||
(UInt32, Ptr{Nothing}, Any, | ||
UInt32, Ptr{Float64}, Ptr{Float64}, | ||
UInt, Float64, Float64, Int32, | ||
Ptr{Float64}, Ptr{Float64}), | ||
|
@@ -200,7 +200,7 @@ function cubature{F}(xscalar::Bool, fscalar::Bool, | |
val, err) | ||
else | ||
ret = ccall((:hcubature,libcubature), Int32, | ||
(UInt32, Ptr{Void}, Any, | ||
(UInt32, Ptr{Nothing}, Any, | ||
UInt32, Ptr{Float64}, Ptr{Float64}, | ||
UInt, Float64, Float64, Int32, | ||
Ptr{Float64}, Ptr{Float64}), | ||
|
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,4 +1,4 @@ | ||
using Base.Test | ||
using Test | ||
using Cubature | ||
using Compat | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be
julia 0.7
(no hyphen), in order to only accept released versions.