Changes and a problematic problem.

2007-06-07

Changes and a problematic problem.

Permalink 12:11:49, Categories: Optimisation Framework  

It's been a while since my last entry, so I'll quickly update on what I've done.

Right now, basic runtime detection for Windows, x86 linux and PPC are done. I've changed quite significantly the original plan for that, now I have a base class with the inline bool HasMMX() type functions and the bool hasMMX; type vars. I've used a template on that, so I can pass the correct platform specific class to it when creating an object instance of it, then I use another class as an access point for the outside world which has it's own Has*() functions (which call the specific equivalent in the base class).

When a check for one instruction set is done, checks for all of them are done and a bitmask is returned. Then the correct instruction is fetched from this result.

So a check for MMX on windows would do something like this:

http://www.xordan.com/code

I think this is quite a nice solution. It allows us to easily add new checks in the future.

While writing some configure checks for xmmintrin.h and __m128 I ran into a problematic problem. GCC requires -msse to be enabled for me to access builtin intrinsic functions. However, -msse also tells the compiler to optimize non-floating point code with sse instructions :) To quote from the GCC manual:

"These options will enable GCC to use these extended instructions in generated code, even without -mfpmath=sse. Applications which perform runtime CPU detection must compile separate files for each supported architecture, using the appropriate flags. In particular, the file containing the CPU detection code should be compiled without these options."

To me, this is not a great option. I'm not sure why the GCC devs decided to force compiler optimizations upon us if we want to use intrinsics at all, but that's the way it is... maybe. I'm going to experiment on defining what the xmmintrin.h header requires to be defined.. maybe that will work. If not then we'll have to try what the manual suggests, making each file which uses intrinsics compile with the required flags. The third option is to say "screw this" and write my own versions of the intrinsics using asm. I'll still need to use the builtin stuff for x86_64, but that's okay because -msse and crew are defined by default on that platform. My hope is that I can trick the headers that all is good without giving the compiler an 'okay' to optimize.

Once a solution for this is done, I need to work out a code path for using these optimizations. Right now I'm favouring either using templates along with my own functions, or having a function like blah(SIMDcode, C++Code, arg1, arg2, argn); I haven't decided. Obviously I need to keep the overhead and code duplication down to a minimum. More on this later.

Trackback address for this post:

This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Comments, Trackbacks, Pingbacks:

I love your blog.. very nice colors & theme. Did you design this website yourself or did
you hire someone to do it for you? Plz respond as I'm looking to design my own blog and would like to find out where u got this from. thank you
PermalinkPermalink 2012-11-08 @ 18:57
An outstanding share! I have just forwarded this onto a colleague
who has been doing a little homework on this. And he
actually bought me dinner simply because I stumbled upon
it for him... lol. So let me reword this.... Thanks for the
meal!! But yeah, thanks for spending time to talk about this topic here on your web site.
PermalinkPermalink 2012-11-14 @ 01:47
Comment from: green smoke coupon code [Visitor] · http://vtipy.vsetko.com/forum/profile.php?id=58261
In the event it becomes hard to puff, which is a sign how the
battery must be recharged. In the event that doesn't repair get in touch with our own customer service team.
PermalinkPermalink 2013-03-22 @ 05:34
Comment from: www.updated.asia [Visitor] · http://www.updated.asia/article.php?id=2943
Hi there! I just wanted to ask if you ever have any trouble with hackers?
My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no backup.
Do you have any methods to prevent hackers?
PermalinkPermalink 2013-03-28 @ 06:08
Comment from: wiki.forumphp.web.id [Visitor] · http://wiki.forumphp.web.id/index.php?title=Pengguna:AshelyDri
A lot of areas have banned the act of smoking in public and in
eating joints, to support those who don't smoke sit in an environment where they aren't at
a risk from inhaling the toxins released.
PermalinkPermalink 2013-03-31 @ 23:15
Comment from: Gilda [Visitor] · http://support.jodohost.com/members/niukeira.50487/
I have been smoking regarding 25 years a 20 a day gentleman (sometimes much more
when I am working from home). I have tried more-or-less every
thing to stop at once or another and constantly failed I
just like the smoking encounter and areas don't change that.
PermalinkPermalink 2013-04-02 @ 15:59
you're truly a just right webmaster. The site loading speed is incredible. It kind of feels that you're doing any unique trick.
In addition, The contents are masterpiece.
you've performed a magnificent job in this matter!
PermalinkPermalink 2013-04-07 @ 14:28
Comment from: Joy [Visitor] · http://dev.promo121.com/profile/jolenesche
Right here is the perfect website for everyone who wants
to find out about this topic. You understand so much its almost hard to argue with
you (not that I actually will need to_HaHa).
You certainly put a new spin on a topic which has been discussed for ages.
Great stuff, just wonderful!
PermalinkPermalink 2013-04-08 @ 16:19
Comment from: Svcmc.Jbcourse.Com [Visitor] · http://svcmc.jbcourse.com/user/view.php?id=33752&course=1
I was a bit more than reluctant to try smoking.
I had to give up with the horrible smell of the traditional
cigarettes to keep around my buddies who are chain smokers largely.
Now, I don't compromise, while i have my very own set of custom-made and noble E-cigs by Eco-friendly Smoke. We look the smartest with these specifically designed smoking. I use the actual zero cigarette smoking highly tasting menthol ice Eco-friendly Smoke e-cig.
PermalinkPermalink 2013-04-10 @ 03:14
Nice post. I learn something totally new and challenging on sites I stumbleupon
on a daily basis. It's always useful to read content from other writers and practice a little something from their websites.
PermalinkPermalink 2013-04-11 @ 21:49
Comment from: Http://www.iconcompanions.com [Visitor] · http://eco.guyana.virtualhealthlibrary.org/tiki-index.php?page=UserPagebellyyia
Just desire to say your article is as astounding.
The clarity in your post is just cool and i can assume you
are an expert on this subject. Well with your permission allow me to grab your RSS feed to keep updated with forthcoming post.
Thanks a million and please carry on the rewarding work.
PermalinkPermalink 2013-04-15 @ 01:03
Comment from: http://ebx.ch/mediawiki1/index.php?title=Bright_Green_Smoke_Coupons_The_Same_Articles [Visitor] · http://ebx.ch/mediawiki1/index.php?title=Bright_Green_Smoke_Coupons_The_Same_Articles
Hello There. I found your weblog the use of msn.
This is an extremely neatly written article.
I'll make sure to bookmark it and come back to read more of your useful information. Thank you for the post. I'll certainly comeback.
PermalinkPermalink 2013-04-17 @ 01:19
Comment from: v2 cigs Review [Visitor] · http://www.internet-friedhof.de/userinfo.php?uid=12876
you are in point of fact a excellent webmaster. The site loading velocity is amazing.
It sort of feels that you're doing any distinctive trick. In addition, The contents are masterpiece. you have done a great activity in this subject!
PermalinkPermalink 2013-04-18 @ 14:27
Useful info. Fortunate me I discovered your website by accident, and I'm stunned why this accident didn't came about earlier!
I bookmarked it.
PermalinkPermalink 2013-04-19 @ 17:09
Comment from: Www.libanonchat.org [Visitor] · http://Www.libanonchat.org/index.php?do=/profile-100591/info/
Awesome post.
PermalinkPermalink 2013-04-20 @ 20:44
Comment from: Power Ecig Reviews [Visitor] · http://klaniny.pl/tiki/tiki-index.php?page=UserPagemichelsey
This is really interesting, You are a very skilled blogger.
I have joined your feed and look forward to seeking
more of your great post. Also, I have shared your website in my social networks!
PermalinkPermalink 2013-04-25 @ 11:48
Comment from: http://www.prnewswire.com/news-releases/v2-cigs-coupon-codes-released-at-theecigexpertscom-183592391 [Visitor] · http://wiki.fastzep.scholtz.sk/FastZep?title=Redaktor:KendrickU
Correct following it was introduced in the global market place, cigarette users about the world
discovered one thing new to rave about.
PermalinkPermalink 2013-04-28 @ 13:40
Have you ever thought about writing an e-book or guest authoring on
other sites? I have a blog centered on the same subjects you discuss and would love to have you share some stories/information.
I know my readers would appreciate your work. If you are even
remotely interested, feel free to send me an email.
PermalinkPermalink 2013-05-01 @ 16:18
Comment from: Author's external home page... [Visitor] · http://www.turktour.no/author/PorterCon
Hello, I enjoy reading all of your article post.

I wanted to write a little comment to support you.
PermalinkPermalink 2013-05-04 @ 22:49
Comment from: click the Following document [Visitor] · http://successring.com/profile/OlliePres
Saved as a favorite, I like your site!
PermalinkPermalink 2013-05-08 @ 19:58
Hello! I've been following your website for some time now and finally got the bravery to go ahead and give you a shout out from Lubbock Tx! Just wanted to say keep up the excellent work!
PermalinkPermalink 2013-05-09 @ 03:22
Heya i am for the first time here. I came across this board and I find It
truly useful & it helped me out a lot. I hope to give something back and help others like you aided me.
PermalinkPermalink 2013-05-28 @ 02:33
Comment from: Flex Belt [Visitor] · http://bolo.jkaawaz.com/article.php?id=9007
So what can this all mean?
PermalinkPermalink 2013-05-31 @ 15:53
Comment from: anti Snoring mouthpiece [Visitor] · http://www.prweb.com/releases/reviews/zquietreview/prweb10513260.htm
Magnificent goods from you, man. I've understand your stuff previous to and you're just extremely
excellent. I actually like what you have acquired here, certainly like what you're stating and the way in which you say it. You make it entertaining and you still take care of to keep it smart. I cant wait to read far more from you. This is actually a great web site.
PermalinkPermalink 2013-06-05 @ 07:44
Comment from: simply click the up coming webpage [Visitor] · http://imnitp2.tu.koszalin.pl/mediawiki/index.php?title=How_Does_A_Clove_Flavored_E
Link exchange is nothing else however it is just placing
the other person's website link on your page at proper place and other person will also do same in favor of you.
PermalinkPermalink 2013-06-06 @ 05:46
Comment from: legitimate business [Visitor] · http://6000amonthclub.com
I am not sure where you're getting your information, but great topic. I needs to spend some time learning more or understanding more. Thanks for excellent information I was looking for this info for my mission.

legitimate business
PermalinkPermalink 2013-06-07 @ 22:48
Comment from: no2 maximus muscle [Visitor] · http://no2maximusfact.com/
Greetings! Very useful advice within this article!

It's the little changes that make the greatest changes. Many thanks for sharing!
PermalinkPermalink 2013-06-08 @ 10:38
Comment from: weight loss [Visitor] · http://nuvagenicfact.com
Hi there! Someone in my Myspace group shared this site with us
so I came to give it a look. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this to my followers!

Excellent blog and amazing style and design.
PermalinkPermalink 2013-06-08 @ 21:56
Comment from: Slim XS Diets [Visitor] · http://slimxsblog.com
I've been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. Personally, if all webmasters and bloggers made good content as you did, the web will be a lot more useful than ever before.
PermalinkPermalink 2013-06-18 @ 10:49
Comment from: be your own boss [Visitor] · http://profitwebsystem.net/
I think everything posted was very reasonable.
However, what about this? suppose you were to create a
awesome post title? I am not saying your content is not good.
, however suppose you added a title to maybe grab folk's attention? I mean Xordan's
blog - Changes and a problematic problem. is a little vanilla.
You ought to peek at Yahoo's front page and note how they create post headlines to grab people to click. You might add a related video or a related picture or two to get readers interested about everything've written.
In my opinion, it could bring your website a little livelier.
PermalinkPermalink 2013-06-19 @ 03:52
Ahaa, its nice conversation concerning this piece of writing at this
place at this webpage, I have read all that, so now me also commenting at this
place.
PermalinkPermalink 2013-06-20 @ 14:44
Comment from: mouse click the next web page [Visitor] · http://www.xlango.com/RitaMadis
I visited several web pages however the audio quality for audio songs current at this
web site is in fact wonderful.
PermalinkPermalink 2013-06-25 @ 23:16
Comment from: Weight Lifting Supplements [Visitor] · http://work.emploi-jobs.com/work/ripped-xl-supplements-2668.htm
Hello there! I could have sworn I've been to this blog before but after browsing through many of the articles I realized it's new to
me. Anyways, I'm certainly pleased I came across it and I'll be book-marking it and checking back often!
PermalinkPermalink 2013-06-27 @ 01:28
Comment from: Max Robust Xtreme [Visitor] · http://textusa.setxpatriots.com/Max_Robust_Xtreme
I have read so many posts concerning the blogger lovers
but this post is in fact a pleasant post, keep it up.
PermalinkPermalink 2013-06-29 @ 18:17
wonderful publish, very informative. I'm wondering why the other specialists of this sector do not realize this. You must continue your writing. I am confident, you have a great readers' base already!
PermalinkPermalink 2013-07-01 @ 00:01
Comment from: life cell reviews [Visitor] · http://www.ekulan.com/Clifton41J
I have read so many posts regarding the blogger lovers
but this paragraph is actually a fastidious post, keep it up.



http://www.ekulan.com/EllaWarden
PermalinkPermalink 2013-07-01 @ 19:37
Comment from: Instant income blog [Visitor] · http://www.veterans.se/index.php/Anv%C3%A4ndare:LillianAu
Hi! I've been following your blog for a long time now and finally got the courage to go ahead and give you a shout out from New Caney Tx! Just wanted to mention keep up the excellent work!
PermalinkPermalink 2013-07-01 @ 23:15
Comment from: Green Detox [Visitor] · http://bestwebarticles.net/76160/raw-burn/
I'm not sure why but this site is loading very slow for me. Is anyone else having this issue or is it a problem on my end? I'll check back later and see if the
problem still exists.
PermalinkPermalink 2013-07-07 @ 16:59
Comment from: Lipo Slim Plus [Visitor] · http://liposlimblog.net
Heya i am for the primary time here. I came across this board
and I find It truly useful & it helped me out much.
I am hoping to provide something back and aid others such as you helped me.
PermalinkPermalink 2013-07-10 @ 23:44
Comment from: http://www.legendecelebrityart.com/news/the-worlds-iconic-rock-images-by-gered-mankowitz-new-at- [Visitor] · http://www.legendecelebrityart.com/news/the-worlds-iconic-rock-images-by-gered-mankowitz-new-at-legende/attachment/mick-aston/
What's up, just wanted to say, I liked this article. It was inspiring. Keep on posting!
PermalinkPermalink 2013-07-12 @ 15:41
Comment from: http://www.terres-de-belenos.com/wiki/index.php?title=Discussion_utilisateur:JulianLed [Visitor] · http://www.terres-de-belenos.com/wiki/index.php?title=Discussion_utilisateur:JulianLed
Thanks , I've recently been looking for info approximately this subject for a long time and yours is the best I've found out so far.
But, what in regards to the bottom line? Are you certain in
regards to the source?
PermalinkPermalink 2013-07-12 @ 16:25
Comment from: Xtreme Gain Supplement [Visitor] · http://mayunwana.com/index.php?title=Redaktor:AKSPennysijir
Attractive section of content. I just stumbled
upon your weblog and in accession capital to assert that I get actually enjoyed account your blog posts.
Any way I'll be subscribing to your augment and even I achievement you access consistently quickly.
PermalinkPermalink 2013-07-16 @ 21:00
Comment from: www.tecnoguide.net [Visitor] · http://www.tecnoguide.net/descargar-pandora-para-blackberry/
Hello to all, it's genuinely a good for me to go to see this web site, it includes important Information.
PermalinkPermalink 2013-07-17 @ 03:43
I'm really enjoying the design and layout of your blog. It's
a very easy on the eyes which makes it much more pleasant for
me to come here and visit more often. Did you hire out a designer to create your
theme? Excellent work!
PermalinkPermalink 2013-07-17 @ 18:42
Comment from: minecraft [Visitor] · http://www.minecraft.org/
Answer: This is a bug with Apple's version of Java. There is a workaround, however. The workaround can be found by clicking here.
PermalinkPermalink 2013-07-27 @ 21:34
Excellent blog here! Also your web site loads up very fast!

What web host are you using? Can I get your affiliate link to
your host? I wish my web site loaded up as quickly as yours lol
PermalinkPermalink 2013-08-04 @ 15:55
Comment from: http://fans.lavozdigital.es [Visitor] · http://fans.lavozdigital.es/merche/?p=1867&preview=true
I got this web page from my friend who informed me about this web
page and now this time I am visiting this web site and reading very informative articles
or reviews at this time.
PermalinkPermalink 2013-08-06 @ 08:45
If you are going for finest contents like
myself, just visit this site daily as it gives feature contents, thanks
PermalinkPermalink 2013-08-06 @ 08:48
Comment from: http://www.sveaskolan.se [Visitor] · http://www.sveaskolan.se/wiki/index.php?title=Renta_car_beograd
It's in fact very complex in this active life to listen news on Television, therefore I simply use web for that purpose, and take the newest news.
PermalinkPermalink 2013-08-06 @ 08:58
Hi, I think your website might be having browser compatibility issues.

When I look at your blog in Opera, it looks fine but when opening in Internet
Explorer, it has some overlapping. I just wanted to give you a quick
heads up! Other then that, very good blog!
PermalinkPermalink 2013-08-06 @ 09:00
Comment from: Samantha [Visitor] · http://www.okushin.co.jp/kodanuki/2012/02/post-93.html
You actually make it seem so easy with your presentation
but I find this topic to be really something which I think I would never understand.

It seems too complex and very broad for me.

I am looking forward for your next post, I will try to get the hang of it!
PermalinkPermalink 2013-08-06 @ 09:27
Comment from: www.jennys-sketchbook.com [Visitor] · http://www.jennys-sketchbook.com/2013/06/time-lapse-sunflower.html
I read this paragraph fully concerning the resemblance of most up-to-date and preceding technologies,
it's amazing article.
PermalinkPermalink 2013-08-08 @ 06:49
Comment from: my website [Visitor] · http://www.9teno9tfake2.com
Applying on the internet is one in the easiest ways
to get loans quickly as online applications tend to be simpler to
complete my website the better score may enable you to shave several points from the rate of
interest and have a long run, dropping your monthly payment considerably.
PermalinkPermalink 2013-08-20 @ 05:27

Comments are not allowed from anonymous visitors.

August 2014
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search

Archives

Misc

XML Feeds

What is this?

powered by
b2evolution