Re: [swift-users] An OpenGL math library in pure Swift - now with SIMD

2016-01-05 Thread David Turnbull via swift-users
On Tue, Jan 5, 2016 at 12:52 PM, David Turnbull wrote: > It's not as fast as packed SIMD but it's still really fast. As fast as C. > This is no longer true. I added SIMD to SwiftGL. Here's one million mat4x4 multiplications: SIMD module direct : 1.489s SwiftGL + SIMD : 1.487s SwiftGL plai

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Janosch Hildebrand via swift-users
> On 05 Jan 2016, at 04:11, David Turnbull via swift-users > wrote: > > I've been working on a math library for SwiftGL. It's looking good. Vector2, > Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented with all > arithmetic. You can even swizzle just like GLSL. > > var myVec =

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Stephen Canon via swift-users
There are three pieces of the simd module on OS X / iOS. - There’s the SDK overlay, which is part of Swift. - There are C/C++ headers /usr/include/simd/*.h, which comprise the bulk of the C implementation. - A small number of routines require external calls, whose implementations are part of lib

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread David Turnbull via swift-users
On Tue, Jan 5, 2016 at 8:27 AM, Michael Ilseman wrote: > What all is mean by “feature parity” with GLSL > The functions in GLSL like normalize(), cross(), dot(), distance(). The idea is that you shouldn't have to remember two APIs to be productive. Like what glm does for C++. -david ___

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread David Turnbull via swift-users
On Tue, Jan 5, 2016 at 8:59 AM, Stephen Canon wrote: > > FYI essentially all of this stuff is already present in the simd module > Yeah, but... 1> import simd repl.swift:1:8: error: no such module 'simd' SwiftGLmath works today for everyone. It's not as fast as packed SIMD but it's still real

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Volodymyr Boichentsov via swift-users
Any plans to make simd open-source? or available for Linux? Best Regards, Volodymyr Boichentsov > On 5 Jan 2016, at 16:59, Stephen Canon via swift-users > wrote: > > Hey David — > > FYI essentially all of this stuff is already present in the simd module > (stdlib/public/SDK/simd/simd.swi

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Stephen Canon via swift-users
Hey David — FYI essentially all of this stuff is already present in the simd module (stdlib/public/SDK/simd/simd.swift.gyb or ‘import simd'), albeit without nice generics, and with some different stylistic choices because simd is at present a straight Swift port of a subset of the simd C/Obj-C/

Re: [swift-users] An OpenGL math library in pure Swift

2016-01-05 Thread Michael Ilseman via swift-users
> On Jan 4, 2016, at 7:11 PM, David Turnbull via swift-users > wrote: > > I've been working on a math library for SwiftGL. It's looking good. Vector2, > Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented with all > arithmetic. You can even swizzle just like GLSL. > > var myVec

[swift-users] An OpenGL math library in pure Swift

2016-01-04 Thread David Turnbull via swift-users
I've been working on a math library for SwiftGL. It's looking good. Vector2, Vector3, Vector4, Matrix2x2, Matrix3x3, Matrix4x4 are implemented with all arithmetic. You can even swizzle just like GLSL. var myVec = vec4(1, 2, 3, 4) myVec.ab = vec2(99, 98) print(myVec) //=> (1, 2, 98, 99) There's