Skip to content

Commit d3f739e

Browse files
authored
Merge pull request #601 from JuliaArrays/fe/fixes
Drop 0.7
2 parents 13a25d9 + 2f541ed commit d3f739e

16 files changed

+71
-106
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
*.jl.cov
22
*.jl.*.cov
33
*.jl.mem
4+
/Manifest.toml

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ os:
44
- linux
55
- osx
66
julia:
7-
- 0.7
87
- 1.0
8+
- 1.1
99
- nightly
1010
notifications:
1111
email: false
@@ -17,12 +17,8 @@ branches:
1717
# allow_failures:
1818
# - julia: nightly
1919
# - os: osx
20-
# uncomment the following lines to override the default test script
21-
#script:
22-
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
23-
# - julia -e 'Pkg.clone(pwd()); Pkg.build("StaticArrays"); Pkg.test("StaticArrays"; coverage=true)'
2420
after_success:
25-
- if [ $TRAVIS_JULIA_VERSION = "0.7" ] && [ $TRAVIS_OS_NAME = "linux" ]; then
21+
- if [ $TRAVIS_JULIA_VERSION = "1.1" ] && [ $TRAVIS_OS_NAME = "linux" ]; then
2622
julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder()); Codecov.submit(Codecov.process_folder())';
2723
fi
2824
- julia -e 'using Pkg; ps=Pkg.PackageSpec(name="Documenter", version="0.19"); Pkg.add(ps); Pkg.pin(ps)'

Project.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name = "StaticArrays"
2+
uuid = "90137ffa-7385-5640-81b9-e52037218182"
3+
version = "0.10.3"
4+
5+
[deps]
6+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
7+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
8+
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
9+
10+
[extras]
11+
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
12+
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
13+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
14+
15+
[targets]
16+
test = ["InteractiveUtils", "SpecialFunctions", "Test"]

REQUIRE

Lines changed: 0 additions & 1 deletion
This file was deleted.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
environment:
22
matrix:
3-
- julia_version: 0.7
43
- julia_version: 1.0
4+
- julia_version: 1.1
55
- julia_version: latest
66

77
platform:

src/MArray.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,7 @@ end
114114

115115
@inline Tuple(v::MArray) = v.data
116116

117-
if isdefined(Base, :dataids) # v0.7-
118-
Base.dataids(ma::MArray) = (UInt(pointer(ma)),)
119-
end
117+
Base.dataids(ma::MArray) = (UInt(pointer(ma)),)
120118

121119
@inline function Base.unsafe_convert(::Type{Ptr{T}}, a::MArray{S,T}) where {S,T}
122120
Base.unsafe_convert(Ptr{T}, pointer_from_objref(a))

src/SArray.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ end
7272

7373
@inline Tuple(v::SArray) = v.data
7474

75-
if isdefined(Base, :dataids) # v0.7-
76-
Base.dataids(::SArray) = ()
77-
end
75+
Base.dataids(::SArray) = ()
7876

7977
# See #53
8078
Base.cconvert(::Type{Ptr{T}}, a::SArray) where {T} = Base.RefValue(a)

src/SizedArray.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ SizedMatrix{S1,S2,T,M} = SizedArray{Tuple{S1,S2},T,2,M}
7272
@inline SizedMatrix{S1,S2}(a::Array{T,M}) where {S1,S2,T,M} = SizedArray{Tuple{S1,S2},T,2,M}(a)
7373
@inline SizedMatrix{S1,S2}(x::NTuple{L,T}) where {S1,S2,T,L} = SizedArray{Tuple{S1,S2},T,2,2}(x)
7474

75-
if isdefined(Base, :dataids) # v0.7-
76-
Base.dataids(sa::SizedArray) = Base.dataids(sa.data)
77-
end
75+
Base.dataids(sa::SizedArray) = Base.dataids(sa.data)
7876

7977
"""
8078
Size(dims)(array)

src/matrix_multiply.jl

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -303,30 +303,16 @@ end
303303
gemm = :cgemm_
304304
end
305305

306-
if VERSION < v"0.7-"
307-
blascall = quote
308-
ccall((Base.BLAS.@blasfunc($gemm), Base.BLAS.libblas), Nothing,
309-
(Ref{UInt8}, Ref{UInt8}, Ref{Base.BLAS.BlasInt}, Ref{Base.BLAS.BlasInt},
310-
Ref{Base.BLAS.BlasInt}, Ref{$T}, Ptr{$T}, Ref{Base.BLAS.BlasInt},
311-
Ptr{$T}, Ref{Base.BLAS.BlasInt}, Ref{$T}, Ptr{$T},
312-
Ref{Base.BLAS.BlasInt}),
313-
transA, transB, m, n,
314-
ka, alpha, a, strideA,
315-
b, strideB, beta, c,
316-
strideC)
317-
end
318-
else
319-
blascall = quote
320-
ccall((LinearAlgebra.BLAS.@blasfunc($gemm), LinearAlgebra.BLAS.libblas), Nothing,
321-
(Ref{UInt8}, Ref{UInt8}, Ref{LinearAlgebra.BLAS.BlasInt}, Ref{LinearAlgebra.BLAS.BlasInt},
322-
Ref{LinearAlgebra.BLAS.BlasInt}, Ref{$T}, Ptr{$T}, Ref{LinearAlgebra.BLAS.BlasInt},
323-
Ptr{$T}, Ref{LinearAlgebra.BLAS.BlasInt}, Ref{$T}, Ptr{$T},
324-
Ref{LinearAlgebra.BLAS.BlasInt}),
325-
transA, transB, m, n,
326-
ka, alpha, a, strideA,
327-
b, strideB, beta, c,
328-
strideC)
329-
end
306+
blascall = quote
307+
ccall((LinearAlgebra.BLAS.@blasfunc($gemm), LinearAlgebra.BLAS.libblas), Nothing,
308+
(Ref{UInt8}, Ref{UInt8}, Ref{LinearAlgebra.BLAS.BlasInt}, Ref{LinearAlgebra.BLAS.BlasInt},
309+
Ref{LinearAlgebra.BLAS.BlasInt}, Ref{$T}, Ptr{$T}, Ref{LinearAlgebra.BLAS.BlasInt},
310+
Ptr{$T}, Ref{LinearAlgebra.BLAS.BlasInt}, Ref{$T}, Ptr{$T},
311+
Ref{LinearAlgebra.BLAS.BlasInt}),
312+
transA, transB, m, n,
313+
ka, alpha, a, strideA,
314+
b, strideB, beta, c,
315+
strideC)
330316
end
331317

332318
return quote

test/MArray.jl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,11 @@
116116

117117
@test length(m) === 4
118118

119-
if isdefined(Base, :mightalias) # v0.7-
120-
@test Base.mightalias(m, m)
121-
@test !Base.mightalias(m, copy(m))
122-
@test Base.mightalias(m, view(m, :, 1))
123-
end
124-
125-
if isdefined(Base, :dataids) # v0.7-
126-
@test Base.dataids(m) == (UInt(pointer(m)),)
127-
end
119+
@test Base.mightalias(m, m)
120+
@test !Base.mightalias(m, copy(m))
121+
@test Base.mightalias(m, view(m, :, 1))
122+
123+
@test Base.dataids(m) == (UInt(pointer(m)),)
128124
end
129125

130126
@testset "setindex!" begin

test/REQUIRE

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/SArray.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@
113113

114114
@test_throws Exception m[1] = 1
115115

116-
if isdefined(Base, :dataids) # v0.7-
117-
@test Base.dataids(m) === ()
118-
end
116+
@test Base.dataids(m) === ()
119117
end
120118

121119
@testset "promotion" begin

test/SizedArray.jl

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,20 +60,18 @@
6060
sa[1] = 2
6161
@test sa.data == [2, 4]
6262

63-
if isdefined(Base, :mightalias) # v0.7-
64-
@testset "aliasing" begin
65-
a1 = rand(4)
66-
a2 = copy(a1)
67-
sa1 = SizedVector{4}(a1)
68-
sa2 = SizedVector{4}(a2)
69-
@test Base.mightalias(a1, sa1)
70-
@test Base.mightalias(sa1, SizedVector{4}(a1))
71-
@test !Base.mightalias(a2, sa1)
72-
@test !Base.mightalias(sa1, SizedVector{4}(a2))
73-
@test Base.mightalias(sa1, view(sa1, 1:2))
74-
@test Base.mightalias(a1, view(sa1, 1:2))
75-
@test Base.mightalias(sa1, view(a1, 1:2))
76-
end
63+
@testset "aliasing" begin
64+
a1 = rand(4)
65+
a2 = copy(a1)
66+
sa1 = SizedVector{4}(a1)
67+
sa2 = SizedVector{4}(a2)
68+
@test Base.mightalias(a1, sa1)
69+
@test Base.mightalias(sa1, SizedVector{4}(a1))
70+
@test !Base.mightalias(a2, sa1)
71+
@test !Base.mightalias(sa1, SizedVector{4}(a2))
72+
@test Base.mightalias(sa1, view(sa1, 1:2))
73+
@test Base.mightalias(a1, view(sa1, 1:2))
74+
@test Base.mightalias(sa1, view(a1, 1:2))
7775
end
7876

7977
@testset "back to Array" begin

test/linalg.jl

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -168,31 +168,21 @@ using StaticArrays, Test, LinearAlgebra
168168

169169
# issue #388
170170
let x = SVector(1, 2, 3)
171-
if VERSION >= v"0.7.0-beta.47"
172-
# current limit: 34 arguments
173-
hcat(
174-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
175-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
176-
allocs = @allocated hcat(
177-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
178-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
179-
@test allocs == 0
180-
vcat(
181-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
182-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
183-
allocs = @allocated vcat(
184-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
185-
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
186-
@test allocs == 0
187-
else
188-
# current limit: 14 arguments
189-
hcat(x, x, x, x, x, x, x, x, x, x, x, x, x, x)
190-
allocs = @allocated hcat(x, x, x, x, x, x, x, x, x, x, x, x, x, x)
191-
@test allocs == 0
192-
vcat(x, x, x, x, x, x, x, x, x, x, x, x, x, x)
193-
allocs = @allocated vcat(x, x, x, x, x, x, x, x, x, x, x, x, x, x)
194-
@test allocs == 0
195-
end
171+
# current limit: 34 arguments
172+
hcat(
173+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
174+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
175+
allocs = @allocated hcat(
176+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
177+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
178+
@test allocs == 0
179+
vcat(
180+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
181+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
182+
allocs = @allocated vcat(
183+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x,
184+
x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x)
185+
@test allocs == 0
196186
end
197187

198188
# issue #561

test/mapreduce.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
using StaticArrays, Test
2-
if VERSION >= v"0.7.0-beta.85"
3-
import Statistics: mean
4-
end
2+
using Statistics: mean
53

64
@testset "Map, reduce, mapreduce, broadcast" begin
75
@testset "map and map!" begin

test/triangular.jl

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,9 @@ end
6464
@test (transpose(SA)*SB)::SMatrix{n,n} transpose(A)*transpose(B)
6565
@test (transpose(SA)*transpose(SB))::SVector{n} transpose(A)*B
6666
@test (transpose(SA)*SB')::SVector{n} transpose(A)*conj(B)
67-
if VERSION < v"0.7-"
68-
@test (SB*SA)::RowVector{<:Any,<:SVector{n}} transpose(B)*A
69-
@test (SB*SA')::RowVector{<:Any,<:SVector{n}} transpose(B)*A'
70-
@test (SB*transpose(SA))::RowVector{<:Any,<:SVector{n}} transpose(B)*transpose(A)
71-
else
72-
@test (SB*SA)::Transpose{<:Any,<:SVector{n}} transpose(B)*A
73-
@test (SB*SA')::Transpose{<:Any,<:SVector{n}} transpose(B)*A'
74-
@test (SB*transpose(SA))::Transpose{<:Any,<:SVector{n}} transpose(B)*transpose(A)
75-
end
67+
@test (SB*SA)::Transpose{<:Any,<:SVector{n}} transpose(B)*A
68+
@test (SB*SA')::Transpose{<:Any,<:SVector{n}} transpose(B)*A'
69+
@test (SB*transpose(SA))::Transpose{<:Any,<:SVector{n}} transpose(B)*transpose(A)
7670
@test (transpose(SB)*SA)::SMatrix{n,n} B*A
7771
@test (SB'*SA)::SMatrix{n,n} conj(B)*A
7872
@test (transpose(SB)*transpose(SA))::SMatrix{n,n} B*transpose(A)
@@ -88,7 +82,7 @@ end
8882
eltyB in (Float64, ComplexF64, Int),
8983
(ta, uploa) in ((UpperTriangular, :U), (LowerTriangular, :L)),
9084
(tb, uplob) in ((UpperTriangular, :U), (LowerTriangular, :L))
91-
85+
9286
A = ta(eltyA == Int ? rand(1:7, n, n) : rand(eltyA, n, n))
9387
B = tb(eltyB == Int ? rand(1:7, n, n) : rand(eltyB, n, n))
9488

0 commit comments

Comments
 (0)