Skip to content

Commit 46598df

Browse files
authored
Bump to version 1.0 (#9)
* Bump to version 1.0 * Fix tests for Julia 1.6 * Update benchmarks
1 parent beff0da commit 46598df

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MutatePlainDataArray"
22
uuid = "3b0f367b-da20-4531-811a-c13cc92422b5"
33
authors = ["Haoran Ni <[email protected]> and contributors"]
4-
version = "1.0.0-dev"
4+
version = "1.0.0"
55

66
[compat]
77
julia = "1.6"

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,9 @@ julia> b
4747
The mutation provided by this package is
4848
- **Efficient**. Under the hood, the mutation is achieved by pointer load/store, where the address offset is known at type inference time.
4949
- **Safe**. Compile-time type check is enforced. Reference to the original vector is obtained to prevent garbage collection. Bounds check is performed unless `@inbounds` is used. This package is inspired by and acts as a safer counterpart to [UnsafePointers.jl](https://github.com/cjdoris/UnsafePointers.jl).
50+
51+
## See also
52+
53+
[StructArrays.jl](https://github.com/JuliaArrays/StructArrays.jl)
54+
[FieldViews.jl](https://github.com/MasonProtter/FieldViews.jl)
55+
[BangBang.jl](https://github.com/JuliaFolds/BangBang.jl)

benchmark/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ BangBang = "198e06fe-97b7-11e9-32a5-e1d131e6ad66"
33
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
44
MutatePlainDataArray = "3b0f367b-da20-4531-811a-c13cc92422b5"
55
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
6+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
67

78
[sources]
89
MutatePlainDataArray = {path = ".."}

benchmark/runbenchmarks.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ using MutatePlainDataArray
22
using BenchmarkTools
33
using Setfield
44
using BangBang
5+
using StaticArrays
6+
7+
M = @SMatrix(ones(10,10))
58

69
struct BAB
710
a::Int
@@ -17,9 +20,9 @@ struct BAI1
1720
c::Int
1821
d::Int
1922
bab::BAB
20-
m::Float64
23+
m::typeof(M)
2124
end
22-
BAI1() = BAI1(0, 0, 0, 0, BAB(), 100)
25+
BAI1() = BAI1(0, 0, 0, 0, BAB(), M)
2326

2427

2528
function inbounds_setinner!_mutate(v, i)

0 commit comments

Comments
 (0)