digitalmars.D - core.simd 3 operand instructions?
- Benjamin Thaut (10/10) Sep 06 2012 Looking at core.simd I noticed that all simd instructions that take 3
- Walter Bright (3/9) Sep 06 2012 simd support is very important, but I put it on the back burner for the ...
- Benjamin Thaut (5/21) Sep 07 2012 That is nice to hear, I would prefer 64 bit support on windows over simd...
- jerro (14/24) Sep 06 2012 I can't answer your question, but if you are using GDC, you could
Looking at core.simd I noticed that all simd instructions that take 3 operands (usually two operands and some kind of constant third value), are commented out for the opcodes. Most likely because __simd() does not have a 4th parameter which could be used to pass in the additional value for some of the opcodes. Are there plans to fix this? Because for example the shuffle instructions are pretty important (try doing a cross product without simd shuffle instructions...) Kind Regards Benjamin Thaut
Sep 06 2012
On 9/6/2012 12:21 PM, Benjamin Thaut wrote:Looking at core.simd I noticed that all simd instructions that take 3 operands (usually two operands and some kind of constant third value), are commented out for the opcodes. Most likely because __simd() does not have a 4th parameter which could be used to pass in the additional value for some of the opcodes. Are there plans to fix this? Because for example the shuffle instructions are pretty important (try doing a cross product without simd shuffle instructions...)simd support is very important, but I put it on the back burner for the moment while applying the paddles to the Win64 compiler.
Sep 06 2012
Am 06.09.2012 22:45, schrieb Walter Bright:On 9/6/2012 12:21 PM, Benjamin Thaut wrote:That is nice to hear, I would prefer 64 bit support on windows over simd any time ;-) Kind Regards Benjamin ThautLooking at core.simd I noticed that all simd instructions that take 3 operands (usually two operands and some kind of constant third value), are commented out for the opcodes. Most likely because __simd() does not have a 4th parameter which could be used to pass in the additional value for some of the opcodes. Are there plans to fix this? Because for example the shuffle instructions are pretty important (try doing a cross product without simd shuffle instructions...)simd support is very important, but I put it on the back burner for the moment while applying the paddles to the Win64 compiler.
Sep 07 2012
On Thursday, 6 September 2012 at 19:21:22 UTC, Benjamin Thaut wrote:Looking at core.simd I noticed that all simd instructions that take 3 operands (usually two operands and some kind of constant third value), are commented out for the opcodes. Most likely because __simd() does not have a 4th parameter which could be used to pass in the additional value for some of the opcodes. Are there plans to fix this? Because for example the shuffle instructions are pretty important (try doing a cross product without simd shuffle instructions...) Kind Regards Benjamin ThautI can't answer your question, but if you are using GDC, you could use gcc builtins . They have the same names as in GCC - take a look at *mmintrin.h files to find out SSE builtin names). For LDC, you could use pragma intrinsic(http://www.dsource.org/projects/ldc/wiki/Docs) and pragma shufflevector. You declare function that you want to compile to llvm shufflevector instruction like this: pragma(shufflevector) float4 shufflevector(float4, float4, int, int, int, int); Then shufflevector() is used in the same way as Clang's __builtin_shufflevector
Sep 06 2012
On Friday, 7 September 2012 at 05:56:19 UTC, jerro wrote:On Thursday, 6 September 2012 at 19:21:22 UTC, Benjamin Thaut wrote:I forgot to mention Manu's std.simd (https://github.com/TurkeyMan/phobos/blob/master/std/simd.d). It is supposed to be wrapper around compiler specific intrinsics. If your are using SIMD mostly for operation on geometric vectors, it should fit your use case well (for example, it already includes a cross3 function). It currently only really supports GDC, though.Looking at core.simd I noticed that all simd instructions that take 3 operands (usually two operands and some kind of constant third value), are commented out for the opcodes. Most likely because __simd() does not have a 4th parameter which could be used to pass in the additional value for some of the opcodes. Are there plans to fix this? Because for example the shuffle instructions are pretty important (try doing a cross product without simd shuffle instructions...) Kind Regards Benjamin ThautI can't answer your question, but if you are using GDC, you could use gcc builtins . They have the same names as in GCC - take a look at *mmintrin.h files to find out SSE builtin names). For LDC, you could use pragma intrinsic(http://www.dsource.org/projects/ldc/wiki/Docs) and pragma shufflevector. You declare function that you want to compile to llvm shufflevector instruction like this: pragma(shufflevector) float4 shufflevector(float4, float4, int, int, int, int); Then shufflevector() is used in the same way as Clang's __builtin_shufflevector
Sep 06 2012
On 7 September 2012 09:05, jerro <a a.com> wrote:On Friday, 7 September 2012 at 05:56:19 UTC, jerro wrote:Yeah, it's kinda waiting for the missing bits from DMD before I can finish it off. GDC is pretty close, though there are some missing fallback paths for the operations that have efficient SSE4.1 opcodes (which should also implement an SSE2 fallback path). I started preliminary ARM support too, and I got LDC building recently, so I might add that in soon. I don't think it's purely for geometry, all the integer stuff is there, along with permutation and saturating integer operations. But it certainly offers a lot of helpers for geometry work.On Thursday, 6 September 2012 at 19:21:22 UTC, Benjamin Thaut wrote:I forgot to mention Manu's std.simd (https://github.com/TurkeyMan/** phobos/blob/master/std/simd.d<https://github.com/TurkeyMan/phobos/blob/master/std/simd.d> )**. It is supposed to be wrapper around compiler specific intrinsics. If your are using SIMD mostly for operation on geometric vectors, it should fit your use case well (for example, it already includes a cross3 function). It currently only really supports GDC, though.Looking at core.simd I noticed that all simd instructions that take 3 operands (usually two operands and some kind of constant third value), are commented out for the opcodes. Most likely because __simd() does not have a 4th parameter which could be used to pass in the additional value for some of the opcodes. Are there plans to fix this? Because for example the shuffle instructions are pretty important (try doing a cross product without simd shuffle instructions...) Kind Regards Benjamin ThautI can't answer your question, but if you are using GDC, you could use gcc builtins . They have the same names as in GCC - take a look at *mmintrin.h files to find out SSE builtin names). For LDC, you could use pragma intrinsic(http://www.dsource.**org/projects/ldc/wiki/Docs<http://www.dsource.org/projects/ldc/wiki/Docs>) and pragma shufflevector. You declare function that you want to compile to llvm shufflevector instruction like this: pragma(shufflevector) float4 shufflevector(float4, float4, int, int, int, int); Then shufflevector() is used in the same way as Clang's __builtin_shufflevector (http://clang.llvm.org/docs/** )
Sep 12 2012