Slashdot Mirror


Intel Releases Threading Library Under GPL 2

littlefoo writes "Intel Software Dispatch have announced the availability of the Threading Building Blocks (TBB) template library under the GPL v2 with the run-time exception — so this previously commercial only package is now open for all the use, whether for open-source projects or commercial offerings (although they are explicitly encouraging open source use). The interface is more task-based then thread-based, but with a somewhat different view of things than, e.g. OpenMP. From the Intel release: 'Intel® Threading Building Blocks (TBB) offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you leverage multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability.'"

41 of 158 comments (clear)

  1. Woohoo by jshriverWVU · · Score: 2, Insightful

    If it's as smooth as the Intel C compilers this ought to be a treat. Now if only they'd release the icc under a similiar license.

  2. GPL 2 by raffe · · Score: 2, Informative

    As the GPL 2 they link to says:
    "Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation"

    You can of course get it as GPL 3....

    1. Re:GPL 2 by PhrostyMcByte · · Score: 2, Informative
      The source explicitly says version 2. The "any later version" clause was left out.

      Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.
    2. Re:GPL 2 by onecheapgeek · · Score: 2, Informative

      Is the license 'GPL v2' or 'GPL v2 or later'?
      Version 2, Changed by RANDY SMITH on 7/21/2007
      Created by: RANDY SMITH
      GPL v2. Later versions will be reviewed, when final, for future consideration.


      No you can't.
    3. Re:GPL 2 by Aladrin · · Score: 3, Informative

      It depends on which version of the GPL you use. There's a 'runtime exception' version (That Intel chose for this project) that allows you MORE freedom than the LGPL in the case of libraries.

      Simply put, you can link in the code as a library without worrying about LGPL's library requirements. (Namely the need to be able to replace the library with an upgraded version.) Intel notes that this is necessary for C++ libraries because of the way they have to be linked.

      For the parent's code, I doubt he chose to have this clause in the GPL he chose, and it wouldn't be possible with his.

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
    4. Re:GPL 2 by sumdumass · · Score: 2, Interesting

      Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version"


      Actually it says (and "any later version").The part of the program that says this is licensed under the GPL would have to say the "OR" version. The portion you and many others who don't know the GPL well enough to discern the intent pick the part outside the GPL entitled how to apply this for reference. It isn't part of the GPL and it isn't anything other then how to apply the GPL to a new program. And to that point, it is only a guidline on applying it because you can specifically remove parts of the license, more specifically (and later version). The GPL is what you need to look at and be concerned with.

      I'm starting to see this from a lot of novice GPL users and I'm wondering if it isn't the intent of the "how to apply section". It would appear they the wording difference is there to intentionally mislead people so little snots like this AC can jump up and grab your code on a technicality. I'm saddened to see that this is what the GPLv3 is becoming about, getting things on a technicality. Anyway, I would hope this is representative of a few mental midgets and not the entirety of the FOSS community.

      Anyways, you couldn't pull this into GPLv3 because you would have to have the right to give everyone else the ability to use any patents that the GPLv3 mandates. You will find that pulling stuff over without this ability will lend yourself into severe legal distress if the owners decide to go back on it. Sure, your defense might be the latewr version clause, but they will says the same spirit and then note giving away their patent rights isn't in the spirit of the GPLv2. My suggestion is to tread lightly around issues like this and make sure you are in the clear on them. Else wise you may be poisoning anyone who uses the code after your changing of the license as well as finding yourself in a large bit of legal troubles. Buy placing the code under the GPLv3, according to the patent sections, you are the one authorizing the use of the patents, not the person who placed it under the GPLv2.
    5. Re:GPL 2 by Aladrin · · Score: 2, Interesting

      While it might be possible to use the code to create a more efficient multi-processor aware compiler, that wouldn't mean much to the compiled programs.

      You are correct that Intel's code would be used by the final program. (I hesitate to say 'become part of' because it's still a seperate library, just used by the program. When you wear glasses, they don't become part of you, no matter how necessary they are to your continued existance.)

      --
      "If you make people think they're thinking, they'll love you; But if you really make them think, they'll hate you." - DM
  3. Open-Source vs Commercial? by malfunct · · Score: 2, Insightful

    I find it interesting that the original poster took the trouble to differentiate between open source and commercial offerings as if there has to be a difference.

    --

    "You can now flame me, I am full of love,"

  4. I'm glad to hear it by ookabooka · · Score: 5, Informative

    I attended a seminar about this at GDC (Game Developers Conference) this year. It is really nifty stuff, automatically parallelizes things for you and helps take the load off of the OS scheduler. It is also trivial to implement in many cases, for instance there are parallel loops that execute things in parallel, all you have to do is write it like a normal loop but use a different keyword (ok so it is a wee bit more involved, but you get the idea). If I recall correctly it is basically a thread-pool that manages scheduling itself better than the OS because it knows ahead of time the needs of the code. Also you don't have to know the # of cores or anything as it handles that transparently. Also it isn't limited to Intel processors, I'm pretty sure at GDC it was actually being demoed on some sparc machines. If I had the time and/or a reason to use it I would definately investigate further.

    --
    If you are about to mod me down, keep in mind that this post was most likely sarcastic.
    1. Re:I'm glad to hear it by High+Hat · · Score: 2, Informative

      This is not quite correct. There is so-called OS-level threading, which you are referring to, and runtime or language-level threading, which is not managed by the OS. It is well possible that the latter is the case here, although I'm too lazy to RTFA...

  5. Looks good, but a little hampered by C++ by TomorrowPlusX · · Score: 4, Insightful

    I looked at some of the tutorials yesterday, and I believe I'm going to dip my toes in this.

    But. As much as I love C++ ( and I do ) the real weakness is the lack of usable closures/lambda. The parallel_for example requires you to pass a functor to execute on ranges, which is fine, it makes sense, but since you can't define the closure in the calling-scope in C++ you end up filling your namespace with one-off function objects.

    This is not a critique of TBB, but rather of C++. In java I can make an anonymous subclass within function scope. In python and hell even javascript I can make anonymous functions to pass around. But in C++ I can't, and this means that my code will be ugly.

    Not that this is new news. I use Boost.thread for threading right now, and most of my functors are defined privately in class scope ( which is, at the very least, not polluting my namespace ) but it's too bad that I don't have a more elegant option in C++.

    That being said, Boost.lambda makes my brain hurt a little, so my complaints are really just a tempest in a teacup. If I were smarter and could really grok C++ I could probably use Boost.Lambda and this would be a non-issue.

    --

    lorem ipsum, dolor sit amet
    1. Re:Looks good, but a little hampered by C++ by ray-auch · · Score: 3, Informative

      Erm, yes, C++ has local classes, however there is a "BUT" and it's a big one:

      Local classes / structs do not have external linkage and therefore can't be used as template arguments. So, for functors etc., which is precisely where you'd want something like a local class (ie. because you really want a closure), they are useless.

      Hence why we have Boost lambda. Expect, and I agree with the GP, the syntax ends up so horrible (due to the constraints of C++, not in any way the fault of the Boost devs) that you end up not using it. Not a lot of point in trying to do something because it is technically cleaner and neater if it ends up unreadable and therefore unmaintainable (for that, there is always Perl).

    2. Re:Looks good, but a little hampered by C++ by ray-auch · · Score: 2, Informative

      Local classes are definitely standard, section 9.8 I think.

      Local _functions_ aren't in C++, but may be a GCC extension - which might be confusing you.

  6. Re:As if enough people weren't already confused... by ookabooka · · Score: 3, Informative

    Thats the thing, it makes programming easier by making the whole parallel thing a bit more transparent. Basically picture a foreach loop. This thing allows you to do the same thing but instead can do multiple instances of the loop at once and automatically uses the "optimal" number of threads based on the cores available, you just have to call parallel_for. It's not quite as simple as that but it certainly does take the grunt work out of parallelizing things.

    --
    If you are about to mod me down, keep in mind that this post was most likely sarcastic.
  7. Great news! by jgarra23 · · Score: 2, Interesting

    Hopefully their compiler will follow suit. This sounds like a great move for Intel especially since the lion's share of income is from processors & semi-conductors this will encourage more people to use their tools.

  8. Re:CS courses by IndieKid · · Score: 2, Insightful

    Like most things in CS, I think it's important to understand the theory of writing multi-threaded applications before letting software do it for you.

    That said, I'm sure most CS courses teach at least the basics of memory management, but people are still happy to rely on the Java garbage collector ;-)

  9. Re:task based then thread based by Holi · · Score: 5, Funny

    >There are 11 types of people in the world, those who know binaries and those who don't.

    Obviously you are in the those who don't group.

    --
    Sorry, teleporters just kill you and then make a copy. A perfect, soul-less copy.
  10. Re:I'm thinking by hrieke · · Score: 5, Informative

    The AMD question was raised on their Forums, and there is no issues with TTB running on AMD CPUs.
    And, if there was, well it's under the GPL now, and I'm sure someone would have added / corrected that mistake.

    --
    III.IIVIVIXIIVIVIIIVVIIIIXVIIIXIIIIIIIIVIIIIVVIIIV IIVIIIIIIVIII...
  11. Re:As if enough people weren't already confused... by Doctor+Memory · · Score: 3, Informative

    it makes programming easier by making the whole parallel thing a bit more transparent I'd argue that it makes things more opaque, by abstracting away the need to explicitly deal with threads. Instead, you just define "tasks" that can run concurrently, and the toolkit takes care of mapping the tasks to actual threads.

    Agreed it does look to take a lot of the grunt work out of writing parallel-processing code. There are supposedly Java and .NET versions under development, it'll be interesting to see if they're able to implement the concepts as cleanly as in C++. My guess is both implementations will be a little "clunky" (cumbersome and less efficient).
    --
    Just junk food for thought...
  12. GPL 2 only by oneandoneis2 · · Score: 2, Informative

    From the Development download src/tbb/Makefile:

    # Copyright 2005-2007 Intel Corporation. All Rights Reserved.
    #
    # This file is part of Threading Building Blocks.
    #
    # Threading Building Blocks is free software; you can redistribute it
    # and/or modify it under the terms of the GNU General Public License
    # version 2 as published by the Free Software Foundation.

    There's no "Or Later" in there. This is GPL v2 only.

    --
    So.. it has come to this
    1. Re:GPL 2 only by networkBoy · · Score: 4, Interesting

      Which is perfectly fine. I have a friend at Intel and based on what I've heard of the corporate culture, open ended licenses are a no-go. That doesn't mean they won't later release under GPL v3, just that they want their lawyers to have a chance to review any license they release under and don't want to be beholden to the unknown. Frankly I think that's a good thing. In theory GPLv4 could say: this can be used in closed source proprietary DRM schemes. and if they had the "or later" clause they would have to allow it.
      -nB

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
  13. Difficult to implement by diehard2 · · Score: 2, Interesting

    I've got a program that does benefit enormously from using multiple cores. I looked into the TBB first, and I have to say my head hurt for an hour after looking at their examples. It would have required a serious rewrite of my core numerical routines, and not in a pretty way. I've found the OpenMP pragmas to be the easiest way to maintain the structure of existing code while leveraging the multiple cores. Now, there are very few examples of OpenMP that do anything useful on the web, but after a couple of hours of reading, I was able to very easily integrate it with maybe an extra couple of lines of code and some very minor reworking of the existing code.

  14. Compatibility kinda sucks by VGPowerlord · · Score: 2, Informative

    I know this comes as a great surprise, but the OSes and processors this runs on are limited. If you want your programs to run on non-Intel platforms, or on any of the BSDs, I suggest you skip it and use something else.

    Processors:

    • Intel® Pentium® 4 processor
    • Intel® Xeon® processor
    • Intel Pentium D processor
    • 64-bit Intel Xeon processor
    • Intel® Core Solo processor
    • Intel Core Duo processor
    • Intel Core 2 Duo processor
    • Intel® Itanium® 2 processor (Linux systems only)
    • Non Intel processors compatible with the above processor

    OSes:

    • Microsoft Windows Systems
      • Microsoft Windows XP Professional
      • Microsoft Windows Server 2003
      • Microsoft Windows Vista
    • Linux Systems
      • Red Hat Enterprise Linux 3, 4 and 5 (when using Red Hat Enterprise Linux 4 with Intel Itanium processors, operating system Update 2 or higher is recommended)
      • Red Hat Fedora Core 4, 5 and 6 (not with Intel Itanium processors)
      • Asianux 2.0
      • Red Flag DC Server 5.0
      • Haansoft Linux Server 2006
      • Miracle Linux v4.0
      • SuSE Linux Enterprise Server (SLES) 9 and 10
      • SGI Propack 4.0 (with Intel Itanium processors only)
      • SGI Propack 5.0 (not with IA-32 architecture processors)
      • Mandriva/Mandrake Linux 10.1.06 (not with Intel Itanium processors)
      • Turbolinux GreatTurbo Enterprise Server 10 SP1 (not with Intel Itanium processors)
    • Mac OS X 10.4.4 (Intel) or higher

    Compilers:

    • Microsoft Visual C++ 7.1 (Microsoft Visual Studio .NET 2003, Windows systems only)
    • Microsoft Visual C++ 8.0 (Microsoft Visual Studio 2005, Windows systems only)
    • Intel® C++ Compiler 9.0 or higher (Windows and Linux systems)
    • Intel® C++ Compiler 9.1 or higher (Mac OS systems)
    • For each supported Linux operating system, the standard gcc version provided with that operating system is supported, including: 3.2, 3.3, 3.4, 4.0, 4.1
    • For each supported Mac OS operating system, the standard gcc version provided with that operating system is supported, including: 4.0.1 (Xcode tool suite 2.2.1 or higher)

    P.S. Slashdot pulled out all the trademark symbols, and doesn't support the sup tag, so you'll just have to picture them in all the appropriate spots. :P

    --
    GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
    1. Re:Compatibility kinda sucks by GooberToo · · Score: 3, Informative

      I compiled and ran the examples on my AMD system. They run without issue.

    2. Re:Compatibility kinda sucks by James_Intel · · Score: 4, Informative

      We've been supporting Linux, Windows and Mac OS X for x86, x86-64 and Itanium processors in the commercial product for a year. And, yes, those include Intel and AMD processors. The commercial product information only lists those.

      The commercial product information quoted does not include some ports which were completed for the open source project only days before the open source release.

      Preparing for open source, we were able to get G5 for Mac OS X as well as support for Solaris and FreeBSD (both x86 and x86-64) working before releasing on Tuesday. It was tight - but they made it. I wasn't sure until the week before what we would have - but the team got them working. I think it will be easier now that the project is started - and we can let other join in to help us.

      I should also say we got a bunch more Linux distributions working for builds too. We have tested them enough to see no issues - but we haven't enough experience to call them supported on the product pages (commercial product). Please look for the latest ports on the open source project threadingbuildingblocks.org. We'll work with anyone who has processors/system expertise and needs any advice we can offer. Understandably, we don't have a lot of non-Intel hardware inside Intel to test upon and we are hoping others can help a bit with that.

      For compilers - we have gcc, Intel, Microsoft and Apple (gcc in Xcode environment) compilers all working with the builds. It seems like we may have something to do for Sun's compilers and/or environment working - some Sun engineers are in touch and helping us double check this. No schedule - just working together - which I have faith will get results to put out in an updated open source copy in the not too distant future - non-binding wish - this is not a promise ;-) We're talking about what to do together to add SPARC support to - which shouldn't be too hard but will take some work.

      The biggest issues from processor to processor is knowing how to implement a few key locks, and atomic operations, best in assembly language. Since we have support for processors with both weak and strong memory consistency models - we know TBB is up to the task.

      TBB is very strongly tied to shared memory, and so a port to a Cell processor (or a GPU) would be a bit more challenging - but might be doable for the Cell. We've had only a few discussions/thoughts - no progress I know of figuring out a good approach there. That will almost certainly take someone with more Cell experience than we have at this time. I'm open to learning - but I'd need a teacher for sure.

  15. GPLv2 only by starseeker · · Score: 2, Informative

    As near as I can tell, this is GPLv2 ONLY (without the "or any later version" clause). Checking a random source file in the distribution, there is no "later version" language present.

    This doesn't surprise me much, actually - I imaging Intel wouldn't want to commit their code to an unknown future license, and I expect they're still evaluating GPLv3. Even if they were done with that evaluation, the process for releasing this under v2 probably took a LONG time to complete - Intel is after all a large corporation. Restarting with GPLv3 probably would have just delayed it, although I suppose the only ones who would actually know that work for Intel.

    --
    "I object to doing things that computers can do." -- Olin Shivers, lispers.org
    1. Re:GPLv2 only by DRJlaw · · Score: 2, Informative

      Thus, I expect that a court would find that Intel would be bound to the verbatim GPLv2 (which has "or any later version") unless they specifically say something of the kin of "modified GPLv2" wherever they mention the license they're using, and particularize the modifications prominently in their version.

      I would not. The verbatim GPLv2 states:

      If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

      The verbatim GPLv2 does not prevent the licensor from specifying GPLv2, and programs licensed under "GPLv2" without "any later version" are expressly contemplated by the terms of the license.

      They would also be in violation of the GPLv2 by having modified the version they are distributing, contrary to the terms of the license for distribution.

      But they haven't.

      However, anyone with a copy of this existing version would seemingly have the GPLv2 license in its original glory (and hence GPLv3 may apply).

      And they do but it doesn't.

      I haven't looked at the details; this is based on what you've just said. It's very interesting.

      That is not an excuse. Your speculation concerning the terms of the GPLv2 had no basis in the grandparent's post.

  16. Memory requirements - bummer by ohell · · Score: 3, Interesting

    I read on their FAQ that TBB requires 512MB to run, though they recommend 1GB. This appears to be very high, especially when compared to Boost.Threads etc. I can't think of a reason why they need to allocate this much - and it would probably be a problem for consumer applications.

    Also from the FAQ, the so-called concurrent containers still need to be locked before access. So no change from normal STL containers there.

    But I will download it just for the memory allocator they supply, since it can be plugged into STL, and claims to hand out cache-aligned memory. It can apparently be built independently of the rest of TBB.

    --
    Three o'clock is always too late or too early for anything you want to do. - Jean-Paul Sartre
    1. Re:Memory requirements - bummer by James_Intel · · Score: 2, Informative

      Sorry - the requirements are more about the likely memory needed on a system for that OS + a C++ program, etc. In other words - have a system with 512M in general, not for TBB. This is confusing me now!

      TBB really has minimal requirements of its own... using TBB won't really change the memory needs enough to worry about it.

      I'll see if we can find a way to update the web page so it makes sense. Sorry for the confusion.

      The concurrent containers are much more scalable than those in STL - much more scalable. The queue, vector and hash table we provide are much better choices in a threaded application (with or without the other features of TBB) than using STL containers.

      The scalable memory allocator is definitely a gem. The library for it is completely separate from the rest of TBB - so definitely a good place to start if you have a threaded application which still calls malloc()

  17. Re:Nice Offering by origin2k · · Score: 2, Informative
    Actually you can build commercial products using this new library, taken from their FAQ

    What is GPL v2 with the runtime exception?
    Version 1, Changed by RANDY SMITH on 7/21/2007
    Created by: RANDY SMITH
    GPLv2 with the runtime exception is the license under which the source code of libstdc++ is distributed (see gcc.gnu.org/onlinedocs/libstdc++/17_intro/license. html). This 'runtime exception' is therefore a standard for distributing template libraries - and that is why TBB uses it.


    http://softwarecommunity.intel.com/tbbWiki/FAQ/606 .htm
  18. Re:task based then thread based by dubbreak · · Score: 3, Funny
    I fixed it for him:

    There are 11 types of people in the world: those who know binaries, those who don't and those who don't.


    The then/than mixup is kind of funny though. Reminds me of something I read in the engineering faculty on a white board (I assume a first year engineer):
    "I'd rather be retarded then do my engineering homework.."

    Looks like he had the pre-requisite fulfilled and should have just got on with the homework.
    --
    "If you are going through hell, keep going." - Winston Churchill
  19. Re:As if enough people weren't already confused... by ookabooka · · Score: 2, Insightful

    Well. . .c++ abstracts away from ASM, so is it bad too? Abstraction isn't a problem really, especially when it handles a bunch of grunt work correctly and efficiently. Yeah some programmers might not understand exactly what they are doing, but tools that add a layer of abstraction are OK in my book so long as they don't make things more complicated or grossly inefficient. Besides, if you really wanted to do it differently you could either modify the GPL code or write it from scratch. Hopefully, handling threads manually will become like inline assembly, there for people that need that low-level access but an easier and more abstract way of doing things is readily available (regular C/C++ code). Honestly I think libraries like this are going to be more and more common, multi-core is definitely the way of the future and it will take a whole new set of tools and programming paradigms to really harness it. Most programming languages weren't designed with the notion of parallelizing everything.

    --
    If you are about to mod me down, keep in mind that this post was most likely sarcastic.
  20. Re:task based then thread based by Framboise · · Score: 2, Funny

    Variation: There are 1 types of people in the world, those who program in C, and those who don't.

  21. Neither Linux nor Intel specific by AHumbleOpinion · · Score: 2, Informative

    That intel figured out that 5 percent market share mattered a whole lot when it's only a two player game, and it's running close. Obviously, if intel can control the entire *NIX world, AMD is in for some hurt.

    It is neither Linux nor Intel specific

    http://threadingbuildingblocks.org/

    Cross platform support:
    * Provides a single solution for Windows*, Linux*, and Mac OS* on 32-bit and 64-bit platforms using Intel®, Microsoft, and GNU compilers.
    * Supports industry-leading compilers from Intel, Microsoft and GNU.

    Threading Building Blocks supports the following processors:
    * Non Intel processors compatible with the above processors

  22. Re:This and XEN by TheRaven64 · · Score: 2, Interesting
    If you have a sensible architecture, then every instruction that modifies some bit of global scope will raise an exception if you try to execute it outside of privileged mode. This is not the case on x86, where there are 17 instructions that silently fail if run outside of ring 0 (the highest privilege level on x86). When you are writing a virtual machine monitor, or hypervisor, you need to emulate all of the privileged instructions so that a guest operating system can run without interfering with other guests.

    Due to this limitation, virtual machines on x86 used one of two work-arounds:

    • Binary re-writing, where the instruction stream is scanned for privileged instructions, and these are replaced by jumps to the emulated versions (and a lot of other tricks to get around side-effects of doing this). This is what VMWare does.
    • Paravirtualisation, where you replace all of the occurrences of privileged instructions with something like a system call (a hypercall), which performs the operation on behalf of the guest. This is what Xen does.
    Paravirtualisation is fast, and less error-prone than binary rewriting (which has a huge number of irritating corner cases you have to cover), but it has the disadvantage that it requires fairly considerable modification to the running guest, on a source-code level. You could, in theory, write a scanner that would read a binary and replace all privileged operations with jumps to a library that performed hypercalls, but no one has done this. This means, you can't run an operating system on something like Xen without access to the source code.

    This changed somewhat recently. Both Intel and AMD added extra modes to their latest chips which can be used to trap all privileged instructions, allowing pure trap-and-emulated virtualisation. By using this, Xen can run unmodified guests, although they are slower than paravirtualised ones. Since this feature is highly dependent on hardware support, it will only work on chips with the correct hardware assistance mode.

    None of this has anything to do with a threading library, however. I don't know quite where you got that idea from.

    --
    I am TheRaven on Soylent News
  23. Re:As if enough people weren't already confused... by Anonymous Coward · · Score: 2, Interesting

    C# has something called the CCR - Concurrency and Coordination Runtime.
    As the developers themselves are well aware of, gluing "true" concurrency onto procedural languages such as C/C++/C#/Java will always be "ugly".
    There is actually a microsoft labs-developed "fork" of C# called COmega which tries to integrate concurrent programming more tightly into the language.

    Just to point out:
    1) C# is actually further along in some ways to realizing true and easy-to-use concurrent programming (also ref C# 3.5).
    2) Modern C++ could hardly be considered clean or simple -- It's a huge and complicated language, ever changing and with arguably the most dense syntax this side of perl. Not that there's anything wrong with that, but C++ is fast approaching a lisp-like state of unapproachability imho.

  24. Re:I'm thinking by Phroggy · · Score: 2, Insightful

    Intel wants TBB to be ubiquitous. Not only can you run it on AMD, you can run it on PPC. However, they did say that they don't have very many G5 Macs at Intel, so the engineers say the PPC port is "alpha quality".

    --
    $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
    $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
  25. PS3? by LinuxGeek · · Score: 3, Interesting

    I checked the site and forum, but no search results on PS3. Having just bought a shiny new 60gig PS3, this release makes me wonder just how easy it could be to take fairly good advantage of all the cores.

    Hmmm, it may be one of my first projects; six cores running @ 3.2GHz and an easy method of putting them to use. It would be interesting to parallelize pi calculation and see how long it would take to get one million digits.

    --

    Kindness is the language which the deaf can hear and the blind can see. - Mark Twain
    1. Re:PS3? by Doctor+Memory · · Score: 3, Informative

      Having just bought a shiny new 60gig PS3, this release makes me wonder just how easy it could be to take fairly good advantage of all the cores. That should be interesting, since the Cell is a non-orthagonal multi-core CPU (sort of like a PPC core with multiple AltiVec units). Opcodes for the main core (the PPE) are Power/PowerPC, while the satellite processors (the SPEs) run a vector (similar to the AltiVec or VMX) instruction set. I believe the PPE can also execute the vector instructions, so maybe it would be possible to just target that. I'm not sure how general-purpose those opcodes are, though, and since I don't believe the PPE has the SPE's complement of 128 registers, you might wind up to just supporting whatever register set the PPE has.
      --
      Just junk food for thought...
  26. But the thing is by Sycraft-fu · · Score: 3, Informative

    C++ (or C) is where all the fast code is still written. Thus it is the most relevant place for this kind of thing. If you look at Intel's page, you'll see they sell compilers, but only for two languages: C/C++ and Fortran. The reason is that their compilers are specifically to get as much performance as possible on an x86/x64 chip. So they target the languages people use when they are performance oriented. There are lots of other great languages out there, but face it, you aren't (or at least shouldn't) be using a managed language like Java when every last clock cycle counts.

    You'll find that this is rather evident in most games. While it is increasingly common to write large portions of the game in a scripting language since that make it easier to write and perhaps more importantly easier to mod, you'll find that the high speed stuff is still C++. Take Civ 4 for example. They wrote almost the whole damn game in XML and Python. All data (like unit definitions, technology tree, etc) is stored in XML files, all the scripting necessary to make them work is Python. Makes the game extremely easy to mod. However, the AI code, which they also released to end users, is in C++. The reason is that the AI is highly intensive and would have run too slow in Python. Also, the core engine of the game (not released to users) is C++ as well.

    So it isn't surprising this is where Intel is targeting their optimisations. Also, I'd argue that to a large degree any of this kind of thing for a managed language is the responsibility of the runtime itself. If Java is to have better support for automatically threading things, the JRE is probably where that should be done.

  27. A job for Fortran . . . by hawk · · Score: 2, Informative

    No, not FORTRAN IV, or even 77 . . .

    Fortran 90 and later already have the structures for this (Forall, etc).

    *sigh*

    hawk, who hasn't written a line in over two years