<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: sys_optimize() and SSE</title>
		<atom:link href="http://cycling74.com/forums/topic/sys_optimize-and-sse/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/feed</link>
		<description></description>
		<pubDate>Tue, 18 Jun 2013 17:42:33 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-29386</guid>
					<title><![CDATA[sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-29386</link>
					<pubDate>Wed, 27 Dec 2006 11:02:31 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>I am in the process of converting all my AltiVec<br />
perform methods to SSE.<br />
I am on a Mac PowerBook Pro Intel Core Duo and I am<br />
wondering if I can rely on sys_optimize() to have the<br />
same behavior that it used to have on PowerPCs with<br />
AltiVec.</p>
<p>The conditions for sys_optimize() to return true on<br />
PowerPCs are:</p>
<p>1. Altivec-capable machine<br />
2. User has checked Optimize in the DSP Status window<br />
3. Signal Vector size is a multiple of 4</p>
<p>Is it the same on Intel with SSE or not ?<br />
If not what&#8217;s the best way to integrate SSE vector<br />
code into your external ?</p>
<p>Any comment or suggestion highly appreciated.</p>
<p>Thank you.</p>
<p>- Luigi</p>
<p>
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION.  ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED.  IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT <a href="mailto:SUPERBIGIO@YAHOO.COM">SUPERBIGIO@YAHOO.COM</a> AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>
Do You Yahoo!?<br />
Tired of spam?  Yahoo! Mail has the best spam protection around </p>
<p><a href="http://mail.yahoo.com" rel="nofollow">http://mail.yahoo.com</a></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91785</guid>
					<title><![CDATA[Re: sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91785</link>
					<pubDate>Wed, 27 Dec 2006 11:15:56 +0000</pubDate>
					<dc:creator>Pierre Alexandre Tremblay</dc:creator>

					<description>
						<![CDATA[
						<p>Dear Luigi</p>
<p>> The conditions for sys_optimize() to return true on<br />
> PowerPCs are:<br />
><br />
> 1. Altivec-capable machine<br />
> 2. User has checked Optimize in the DSP Status window<br />
> 3. Signal Vector size is a multiple of 4</p>
<p>As I said in the other thread, I cannot get sys_optimize() to return  <br />
false on my system&#8230; have your tried it lately ?  Please refer to  <br />
the other thread for a description of the problem&#8230;</p>
<p>pa</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91786</guid>
					<title><![CDATA[Re: sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91786</link>
					<pubDate>Wed, 27 Dec 2006 11:36:04 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p>I just tried calling sys_optimize() both with Optimize<br />
On and Off. Yes, I do recompile the DSP chain after<br />
changing the Optimize option in the DSP status<br />
window&#8230; and it always returns false on my system, no<br />
matter what&#8230; It kind of makes sense, since the<br />
function was originally developed for AltiVec capable<br />
machines, and my machine (Mac Powerbook Intel Core<br />
Duo) is not AltiVec capable.</p>
<p>What system are you on ?</p>
<p>- Luigi</p>
<p>&#8212; Pierre Alexandre Tremblay<br />
<tremblap @gmail.com>
wrote:</tremblap></p>
<p>> Dear Luigi<br />
> <br />
> > The conditions for sys_optimize() to return true<br />
> on<br />
> > PowerPCs are:<br />
> ><br />
> > 1. Altivec-capable machine<br />
> > 2. User has checked Optimize in the DSP Status<br />
> window<br />
> > 3. Signal Vector size is a multiple of 4<br />
> <br />
> As I said in the other thread, I cannot get<br />
> sys_optimize() to return  <br />
> false on my system&#8230; have your tried it lately ? <br />
> Please refer to  <br />
> the other thread for a description of the problem&#8230;<br />
> <br />
> pa<br />
> </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION.  ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED.  IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT <a href="mailto:SUPERBIGIO@YAHOO.COM">SUPERBIGIO@YAHOO.COM</a> AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>
Do You Yahoo!?<br />
Tired of spam?  Yahoo! Mail has the best spam protection around </p>
<p><a href="http://mail.yahoo.com" rel="nofollow">http://mail.yahoo.com</a></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91787</guid>
					<title><![CDATA[Re: sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91787</link>
					<pubDate>Wed, 27 Dec 2006 11:43:28 +0000</pubDate>
					<dc:creator>Pierre Alexandre Tremblay</dc:creator>

					<description>
						<![CDATA[
						<p></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91788</guid>
					<title><![CDATA[Re: sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91788</link>
					<pubDate>Wed, 27 Dec 2006 11:46:00 +0000</pubDate>
					<dc:creator>PhiDjee</dc:creator>

					<description>
						<![CDATA[
						<p>Hi Luigi,</p>
<p>I&#8217;m not able to bring back an answer.<br />
However, this page is very useful and provides links to Apple&#8217;s website where SSE is documented:</p>
<p>< <a href="http://www.ffnn.nl/pages/articles/apple-mac-os-x/vectorizing-with-vdsp-and-veclib.php" rel="nofollow">http://www.ffnn.nl/pages/articles/apple-mac-os-x/vectorizing-with-vdsp-and-veclib.php></p>
<p>such:</p>
<p>&#8220;vDSP uses vectorized code to implement functions that operate on single precision data. This code uses AltiVec extensions when a PowerPC G4 or G5 is present, or the SSE extensions when an Intel microprocessor is present. On the PowerPC G3 processor, vDSP uses scalar code.&#8221;</p>
<p>< <a href="http://developer.apple.com/documentation/Performance/Conceptual/Accelerate_sse_migration/index.html" rel="nofollow">http://developer.apple.com/documentation/Performance/Conceptual/Accelerate_sse_migration/index.html></p>
<p>
Bye,<br />
Philippe</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91789</guid>
					<title><![CDATA[Re: sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91789</link>
					<pubDate>Wed, 27 Dec 2006 14:03:02 +0000</pubDate>
					<dc:creator>Luigi Castelli</dc:creator>

					<description>
						<![CDATA[
						<p></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91790</guid>
					<title><![CDATA[Re: sys_optimize() and SSE]]></title>
					<link>http://cycling74.com/forums/topic/sys_optimize-and-sse/#post-91790</link>
					<pubDate>Wed, 27 Dec 2006 16:53:47 +0000</pubDate>
					<dc:creator>AlexHarker</dc:creator>

					<description>
						<![CDATA[
						<p>Quote: Luigi Castelli wrote on Wed, 27 December 2006 04:02<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>> 1. Altivec-capable machine<br />
> 2. User has checked Optimize in the DSP Status window<br />
> 3. Signal Vector size is a multiple of 4<br />
> </p>
<p>Hi Luigi. The deal with SSE and sys_optimise() as you&#8217;ve already discovered seems to be that it is cuurently not reliable. However, in the case of the three above, only 2 is problematic, as this is not something you can discover any other way (asfaik). 3 could be checked manually in the dsp routine and 1 (or the equivalent &#8211; SSE present) is guaranteed on a mac as it is a requirement of the OS. To be absolutely clear it is only SSE2 (which is everything except a few operations) not SSE3 &#8211; this is covered in the basic apple docs for SSE somewhere&#8230;.)</p>
<p>On a PC(or rather windows) of course you probably need to do some other kind of test that I can&#8217;t help you with I&#8217;m afraid.</p>
<p>Oh, I almost forgot &#8211; you may need to get the precompiler to recognise whether it is compiling for intel or ppc in order to do some stuff as a proper universal binary because code will not comile for sse on ppc or altivec on intel &#8211; this can be done with the #if below. It *may* be possible to use the accelerate framework for  everything to get code that will compile on both, but I&#8217;ve been unable to work out what routines to call to get basic operations like multiply and add without calling platform-specific routines, so I use macros to do this which get replaced according to the platform. If anyone knows how to do this via the framework I&#8217;d be grateful to know, but of course  you may prefer a pre-compiler approach, as it might be easier to get code that will work on windows as well&#8230;</p>
<p>
#if (TARGET_RT_LITTLE_ENDIAN)</p>
<p>returns true for intel under mac os and false under ppc</p>
<p>
Regards</p>
<p>Alex</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

