Low Energy, High Performance: Compression and Accelerate (712) Eric Bainville, Steve Canon, Luke Chang
vImage, vDSP, vForce, BLAS, LAPACK, Linear Algebra Sparse BLAS (new)
libm simd - vector types that map directly to cpu vector units compression (new)
Lossless data compression Unified API Selection of algorithms with high efficiency and performance
All compared against zlib
lzma
better compression, ratio lower speed
lz4
better speed, lower compression ratio
lbfse
(new) slightly better speed and better compression ratio to zlib
Replaces hoffman in zlib with “Finate State Entropy” better performance characteristics on modern micro-architectures. Same compression ratio but significant performance and energy usage wins
compression_algorithm algorithm = COMPRESSION_LZFSE; size_t dst_size = compression_encode_buffer(destination, destination_capacity, source, source_size, NULL, algorithm)
Similar to buffer API, more state
- 2,3,4 dimensional vectors and matrices, closely mirrors Metal shading language
- (new) added swift support
let x = float3(1,2,3)
var y = float3(1,3,5)
y += 2*x
Vectors of floats, doubles, and 32-bit integers Lengths 2,3, and 4
func reflect(x: float3, n: float3) -> float3 {
return x - 2*dot(x,n)*n;
}
dot,project,length,norm_one,norm_inf,normalize,distance,cross,reflect,refract
floatNxM and doubleNxM N is number of columns M is number of rows N and M are both 2, 3 or 4
var m = float4x4(2) // 2s on diagonal
m[3] = [1,2,3,1]
let x = float4x4(3) * m
No conversions required between objective c for vectors, do need to initialize swift matrices from objective c matrix
Industry standard interfaces for linear algebra, descended from FORTRAN
Introduced in Yosemite and iOS 8, greatly simplified interfaces for a few commonly used operations
How fast can you solve a system of equations, use accelerate it crushes everything
New in iOS 9, single and double precision for linear algebra on sparse matrices. Available operations:
- Products
- Triangular solves
- Norms
- Trace
- Permutes
- Insert/Extract
Only store non-zero values with indices/number of non-zero values.
Opaque pointer (Create, operate, destroy) Memory is managed for you Storage format is decided for you, and conversions handled automatically
Data insertion is batched, forced by commit function or automatically when you perform matrix operations