<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">There are three pieces of the simd module on OS X / iOS.</div><div class=""><br class=""></div><div class="">- There’s the SDK overlay, which is part of Swift.</div><div class="">- There are C/C++ headers /usr/include/simd/*.h, which comprise the bulk of the C implementation.</div><div class="">- A small number of routines require external calls, whose implementations are part of libSystem (to clarify for Linux folks, libSystem is a dynamic library that contains all the low-level runtime stuff: libc, libm, compiler-rt, etc).</div><div class=""><br class=""></div><div class="">The first is part of the Swift open-source project; the other two are not, so the simd interfaces are not available in open-source Swift. However, only a small subset of the Swift operations depend on the C/C++ headers and library for their implementation; most of the implementations for Swift are in the SDK overlay itself. It would be easy for someone to provide implementations for the remaining operations (inverse and determinant, IIRC) if they were so inclined. With that done, I don’t believe there would be any other obstacles to the use of the SDK overlay as a native Swift module.</div><div class=""><br class=""></div><div class="">– Steve</div><div class=""><br class=""></div><div class="">If you’re asking if the C library that Apple ships will be open-sourced, that’s an Apple product-planning question that’s out of scope for this list. We (Apple) will definitely take such a request into account, but please file a formal request (Radar) at <a href="http://bugreporter.apple.com" class="">bugreporter.apple.com</a>. Thanks!</div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On Jan 5, 2016, at 2:45 PM, Volodymyr Boichentsov <<a href="mailto:sakristx@gmail.com" class="">sakristx@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Any plans to make simd open-source? or available for Linux?<div class=""><div class=""><br class=""><div class="">
<div style="font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Best R<span style="text-align: -webkit-auto;" class="">egards,</span></div><div class=""><div class=""><div style="orphans: auto; widows: auto;" class="">Volodymyr Boichentsov</div></div></div></div>
</div>
<br class=""><div class=""><blockquote type="cite" class=""><div class="">On 5 Jan 2016, at 16:59, Stephen Canon via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Hey David —</span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">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/C++ library on OS X and iOS (the most important distinction is that the vector types are compatible with clang extended vectors in C languages).</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Making the simd module more “swifty” is something that will need to happen eventually, and there’s a lot of other opportunities for other improvements, but you should be aware that it’s available.</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">– Steve</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 4, 2016, at 10:11 PM, David Turnbull via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">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.</div><div class=""><br class=""></div><div class=""><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;"><span class="" style="color: rgb(187, 44, 162);">var</span><span class="Apple-converted-space"> </span>myVec =<span class="Apple-converted-space"> </span><span class="" style="color: rgb(79, 129, 135);">vec4</span>(<span class="" style="color: rgb(39, 42, 216);">1</span>,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(39, 42, 216);">2</span>,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(39, 42, 216);">3</span>,<span class="Apple-converted-space"> </span><span class="" style="color: rgb(39, 42, 216);">4</span>)</div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(79, 129, 135);">myVec<span class="">.</span>ab<span class=""><span class="Apple-converted-space"> </span>=<span class="Apple-converted-space"> </span></span>vec2<span class="">(</span><span class="" style="color: rgb(39, 42, 216);">99</span><span class="">,<span class="Apple-converted-space"> </span></span><span class="" style="color: rgb(39, 42, 216);">98</span><span class="">)</span></div><div class="" style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(0, 132, 0);"><span class="" style="color: rgb(61, 29, 129);">print</span><span class="">(</span><span class="" style="color: rgb(79, 129, 135);">myVec</span><span class="">)<span class="Apple-converted-space"> </span></span>//=> (1, 2, 98, 99)</div></div><div class=""><br class=""></div><div class="">There's still a lot to do. I hope to have feature parity with GLSL done this week. But it's ready to set free and get feedback.</div><div class=""><br class=""></div><a href="https://github.com/AE9RB/SwiftGL" class="">https://github.com/AE9RB/SwiftGL</a><br class=""><div class=""><br class=""></div><div class="">And a couple questions. Is there any way to make <span class="" style="font-family: Menlo; font-size: 11px; color: rgb(187, 44, 162);">import</span><span class="" style="font-family: Menlo; font-size: 11px;"><span class="Apple-converted-space"> </span>SwiftGL.Math </span>work? Note the dot. Also, is there anything reasonable I can do to improve the compile time? 3.5 minutes for 2000 lines of code can't be right.</div><div class=""><br class=""></div><div class="">-David "Expression was too complex to be solved" Turnbull<br class=""></div><div class=""><br class=""></div></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=pngPxwQ4BiP5IDU2rQC6TcjbiXVR4eqjpuzmzac21kgdXH73jniHBsDxJ6T5HJYr0KguHsACGEUypEMVk2s5b9W2KAEg76J4o9KWOz0ShkMv2CqkOKHKWg6u9oEo84DojZl-2Bjmc5-2FHOYpViJUnZMEzIie1htW0yyr2qfnj-2B5PN0zCloJMxJx3nyJC6oGtpF8uty-2FXc1b0Q-2Bw-2By-2FYXLGNipAh0wbSL4vZcG9tV5EIPXg-3D" alt="" width="1" height="1" border="0" class="" style="height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;"><span class="Apple-converted-space"> </span>_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" class="">https://lists.swift.org/mailman/listinfo/swift-users</a><br class=""></div></blockquote></div><br class=""></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=XeOzyrJ2-2FBBuXS43gF72CRNkhV9C67AqKb9fcFuaN7rX5J6khPImj-2BGdqXM8anrQcTm1ZGG8lD3wpJi3HjUTkLbwPRB3EhPgF5-2B3xCa1bEzv9cghTOL2KoUTLTsK6NChl5FZeKG12ixMRW0tMLlBPe0fRgpfNh61UiYTeLosZjulpwRfKH3QSIB-2BGIeABvzGZ-2FNenBQUlVwhKh5ZOZ2TwaNhvuSYuLSs6-2FxPNG6drgU-3D" alt="" width="1" height="1" border="0" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class=""><span class="Apple-converted-space"> </span>_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">swift-users mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="mailto:swift-users@swift.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">swift-users@swift.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-users" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-users</a></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></body></html>