CUDA compiler goes Open Source


NVIDIA would be announcing the latest versions of their development CUDA toolkits. Parallel Nsight, NVIDIA’s Visual Studio development toolkit, has just had its second release candidate for version 2.1 released. CUDA 4.1 is also being released as a release candidate.

Till date the CUDA compiler toolchain was developed entirely within NVIDIA as a proprietary product; developers could write tools that could generate PTX code (NVIDIA’s intermediate virtual ISA). The compiling of PTX to binary code was handled by NVIDIA’s tools. Next week at GTC Asia, CUDA 4.1 brings a different way: the CUDA compiler is now being built against LLVM, the modular compiler.

LLVM ain’t a true compiler i.e. it doesn’t generate binary code on its own, but as a modular compiler it’s earned quite a reputation for generating efficient intermediate code and for being easy to add new support for new languages and architectures to. If you can generate code that goes into LLVM, then you can get out code for any architecture LLVM supports and it will probably be pretty efficient too. LLVM has been around for quite some time – and is most famously used as the compiler for Mac OS X and iOS starting with Mac OS X 10.6 – but this is the first time it’s been used for a GPU in this fashion.

Benefits of LLVM for CUDA

  • Immediate benefits include shorter compile times (upto 50% times faster) and slightly faster performing code for CUDA developers. Meanwhile the nature of GPU computing means that application/kernel performance won’t improve nearly as much – LLVM can’t parallelize your code for you – but it should be able to generate slightly smarter code, particularly code from non-NVIDIA languages where developers haven’t been able to invest as much time in optimizing their PTX code generation.
  • Moving to LLVM is not completely about immediate performance benefits, it also marks the start of a longer transition by NVIDIA.
  • In NVIDIA’s case moving to LLVM not only allows them to open up GPU computing to additional developers by making it possible to support more languages, but it allows CUDA developers to build CUDA applications for more architectures than just NVIDIA’s GPUs. Currently it’s possible to compile CUDA down to x86 through The Portland Group’s proprietary x86 CUDA compiler, and the move to LLVM would allow NVIDIA to target not just x86, but ARM too. ARM in fact is more than likely the key to all of this – just as how developers want to be able to use CUDA on their x86 + NVGPU clusters, they will want to be able to use CUDA on their Denver (ARM) + NVGPU clusters.

Accoriding to the source, NVIDIA will not be releasing CUDA LLVM in a truly open source manner, but they will be releasing the source in a manner akin to Microsoft’s “shared source” initiative – eligible researchers and developers will be able to apply to NVIDIA for access to the source code. This allows NVIDIA to share CUDA LLVM with the necessary parties to expand its functionality without sharing it with everyone and having the inner workings of the Fermi code generator exposed.

[via]

Advertisements

[Book Review] Xcode 4 iOS Development Beginner’s Guide


XCode IDE

“Apple has always been covertly operating while the leaders of technology were sweating to convince the world with their inventions. On one fine day, Apple finally opened the gates to reveal a mysterious remarkable piece of technology that mesmerized the world, which never expected, which never saw, and would have never thought of. The first multi-touch fluid user-interface gesture built for the iPhone and later for the iPod. This is the same famous Apple line of portable media players which soon became the market leader after its launch. iPod was not only capable of playing music and videos, but games too. Later launch of iPhone took by storm. In 2007, Steve Jobs realized that developers could create applications that will act as native apps for these devices. The same year Apple announced the SDK for the mass developers around the world. Powered by the iOS which is derived from the Apple Mac OS X, specially designed for Apple embedded hardware, got thousands of apps in few months and later this number went to lakhs in few years. Building applications was never easier on a Mac, when XCode took the developers to the next level. XCode is a suite of tools that assist the complete nurturing of the developers and development cycle. The ‘weird looking language’, also best known as the Objective-C is in the heart of this toolset. XCode has gone 4 major version changes, latest being the 4.2. This book will take you to the roller-coaster ride of the new features of XCode 4.”

                       

Xcode 4 iOS Development Beginner’s Guide

Author Steven F. Daniel
Pages 432
Publisher Packt Publishing Ltd.
Rating 8.5/10
ISBN 978-1849691307
About the Book “Use the powerful XCode 4 suite of tools to build applications for the iPhone and iPad from scratch”

About the Author

Steven F. Daniel has been developing desktop and web-based applications for more than 13 years for a number of companies, in various sectors. He was also a member of the SQL Server Special Interest Group (SQLSIG) and the Java Community. Daniel owns and is founder of GenieSoft Studios, a software development company based in Melbourne, Victoria, that currently develops games and business applications for the iOS, Android, and Windows platforms.

He also co-founded SoftMpire Pty Ltd., a company that focused primarily on developing business applications for the iOS and Android
platforms.

Xcode 4 iOS  Development Beginner’s Guide happens to be his first effort in writing and authoring book. Before we begin exploring, being the first book, Author has shown great effort designing this book.

About the Book

‘Xcode 4 iOS  Development Beginner’s Guide’ was published in August, 2011 by Packt Publishers under the ISBN 978-1849691307. The book covers lots of necessary information to glue your hands on to the XCode Environment. The chapters includes number of topics from introducing to the tool, such as introduction to XCode4, IDE Workspace, IB or the Interface builder (UI Drag and Drop), with good examples and theory for XCode libraries, designing Apps with MVC approach, and Multi-touch. Familiarizes with developer tools i.e. debugging and inbuilt source control, and finally optimizing apps and deployment on iOS enabled devices.

The book’s web-page is maintained by the Packt Publishers. The page contains sample chapters, table of contents, and errata info. The book can be purchased in PDF and hard-back forms. Exclusive source code and resource access is only for Packt premium members. For more information on the purchase, please visit the Packt Publishers Page. The book’s preface is short, precise and gives a complete overview of the contents of the book.

Chapter Quality

First Chapter is all about introduction to the XCode and a compatible Mac version. Since the release of the iPhone in 2007 there have been large number of Apple owners and this has lured maximum developers to build application for them. If you are completely new to XCode and interested in developing applications then this chapter would be a good kick-start. To begin with XCode, author presumes that XCode 4.x is installed on a Mac machine. If you don’t have one, then you might want to skip this review and don’t buy the book! :). Mac is not like windows and won’t install on most machines unless tweaked ;). XCode is very much downloadable and free from Apple’s developer site and definitely, you want to grab a copy ASAP. As of now, there is an updated version 4.2 of XCode is available, which is only compatible with Mac OS X 10.7 Lion. However, the topics covered and explained in this book doesn’t change much. Further, this chapter gives reader a nice insight of the iOS architecture, explains how each layer is organized into frameworks, explains the Cocoa framework and Cocoa touch. There is a very short introduction to Objective-C, which is not very catchy. The chapter finally ends with overview of XCode tools and new features of version 4.

XCode 4 interface is completely different from the previous versions. Second chapter proves beneficial as it introduces the reader to various IDE workspace areas such as Navigator Area for project and files, Editing Area for writing code, Utility Area for properties, and Debugger Area and Libraries such as File Templates, code snippets and Object library. To familiarize with any environment, one needs to try it. There are few sample projects that reader can create, compile and launch (in a iPhone emulator) to get the feel of development on this environment. Later reader will explore more on the Unified navigation toolbar, workspace elements for assistance in programming, and finally setting preferences for XCode environment. Truthfully, if you have worked on any IDE such as Visual Studio (the most famous of all) or may be Netbeans/Eclipse, XCode interface won’t differ much and more or likely is similar, the only difference lies in the look and feel.

Transition to XCode 4

A good IDE makes life easier for developers and XCode is one of them. IB or the Interface Builder of XCode is a visual tool that enables the user to design an interface for devices such as iPAD and iPOD, by dragging and dropping views on to the window. This tool is comparable to any design tool that follow WYSIWYG (pronounced: Weesiwyg). Chapter 3 is all about this design tool and contains topic such as creating First GUI application with explanation of the basic application life cycle (this is must for device applications to perform better), View with Auto-rotate interface (Accelerometer input), attaching events to object for user interaction like button click and message display, repositioning controls such as on-screen keyboards that change according to the objects and orientation of the device, document based applications to view or write text, and then saving into files. The chapter is well organised, contains enough screenshots and code snippets to ensure the reader’s smooth pickup speed.

At the heart of iOS architecture, resides the Cocoa framework that provides the shared resources such as dynamic library references, image files, header files to the application whenever needed. Cocoa framework is comparable to the .NET/JRE that provides runtime references like DLL/JAR for their respective applications. Chapter 4 lists down framework names, (or the namespaces for better understanding) that are used predominantly. There are hands-on examples to create database applications that uses SQLite (data centric applications) very similar to SQL adapter classes in .NET and Java,  demo applications using AV (Audio-Video) framework for managing audio and video content,  GPS application for Geo-awareness, and lastly a task for the reader to modify existing demo application. This chapter is a good introduction to the framework namespaces and, good for programming references.

Developing iOS application requires reader to be aware of MVC architecture. Chapter 5 serves a resource for iOS MVC architecture and contains good explanation of the pattern, followed by a pizza order application where all the MVC concepts are shown as examples.   This chapter also introduces the Table-views, adding controls to the view and reposition or resize them. It also covers how to use components such as Switches, Sliders, Segmented Controls, ScrollingViews, WebViews, Controls, ScrollingViews, WebViews, Scrolling Views, Web Views, Pickers, Date Pickers, Custom Pickers using Interface Builder or IB. To control any of these view controllers, a control object is bound using outlets and actions, which is again same as any delegates, listeners , in short, events. If the user is aware of any major languages this would seem very easy. Chapter 5 would serve a good reference point for developing serious applications since it covers lots of important concepts and techniques.

Chapter 6 is more or less an extension of chapter 5. This chapter mainly focuses on interacting with users and alerting them with the application status in case of errors or some notifications. In my opinion this chapter should have been integrated with chapter 5, a separate chapter was not at all required.

Apple’s Multitouch technology by detecting finger gestures is evolutionary. In Apple devices screen is the only interface with which a user can communicate to the device application. Chapter 7 begins with a very brief explanation of the Multi-touch architecture followed by examples to attach UI events for taps, swipe to change color, and zooming effect using pinch gesture. Apple gestures can also be produced using tilting or shaking, which is governed by an on-chip accelerometer. Examples includes the shake and motion effect to detect change in motions, creating applications that can switch to landscape or portrait view depending on the device’s orientation change. The topics covered here only forms the basis of the iOS development and very much explained in beginner’s guide fashion. Do remember that the multi-touch is a hardware feature that cannot be emulated. Overall flow of the chapter is acceptable.

Writing codes without mistakes!………………that is something impossible to believe. XCode environment comes with set of tools to debug iOS application and trace them down efficiently. XCode 4 debugger has been modified to sophistically monitors the running code and reports information line-by-line. XCode contains a wide variety of debugging tools that provides assistance to the iOS developers and this chapter contains a real good explanation for each of them. Topics covered such as classic debugging, LLVM debugging to highlight erroneous lines while typing in code, the new improved in-editor debugging tools, scheme editor for device or emulator based debugging, static analyzer to scan and automatically fix syntax errors, advanced functions like detecting an memory leak, and orphaned/uninitialized objects/variables. The last two topics of this chapter is about intellisense and disable code suggestions, which are more or less editor features and should have been covered in initial chapters.

Version control is an important aspect of team development as it keeps track of the whole development process. With XCode 4.0, the version editor control is now a part of the development environment.  In Chapter 9: “Source Code Management with the Version Editor“, reader will get acquainted with the subversion systems by creating local subversion and repositories. This subversion control is almost similar to other systems such as Tortoise SVN, CVS, and the most popular Team Foundation Server. This chapter is pretty much informative and recommended for professional or serious XCode developers.

The next chapter runs the reader through inbuilt facilities that can be effectively used for measuring application performance. XCode comes with an “Instrument” which can be used to collect information about the application over time. Topics include introduction to the Instrument tool, designing an application to use this tool and profiling it, adding and configuring instruments for trace, and new instruments in XCode 4. As the new instruments are little advanced topic, beginner’s guide wont suffice and author has only provided very little information about each instrument, which is understandable.

Last chapter deals with deployment of application to the app store. Author has provided good amount of steps from getting iTunes premium membership to uploading the application to the Apple app store.

Likes

  1. Very smooth flow and transition of topics from basic to advanced.
  2. Quite impressive usage of informative (Usage of arrows and boxes to highlight areas of an image) images and codes through out the book.
  3. Every example is explained in step by step manner following the beginner’s approach, followed by a detail information in “What just happened” section.
  4. While explaining a feature, author has compared XCode  to other analogous development environments.
  5. References and links are provided wherever required keeping the context clean and unambiguous.
  6. Excellently providing useful introduction to OOPS, MVC Architecture, and accelerometers or gyroscope.

Dislikes

  1. “Pop Quiz” section is poorly designed and not at all impressive.
  2. There are certain chapters that have been presented separately, which was basically not required.
  3. Intellisense and preferences topics in chapter 7 are misplaced.

Language and Tone

Author has used class room approach to convey the working behind each concept with the usage of simple words without exaggerating the topics.

Concluding Words

Making iOS apps on Mac was never so easier, thanks to Apple’s extensive R&D on XCode development environment, and with version 4.0 comes a whole new package of feature set. Daniel’s first attempt to author this book is amazing and would be a good start for beginner’s. I found the book very, informative, and simple to follow. If you are experienced in one or more IDE’s, then this book would be very lucid.

Some part of the code snippets mentioned in the book may confuse at times, make sure you have the source code with you, available at Packt’s site. iOS development requires you to be acquainted with Objective-C. Unfortunately, this book won’t teach you Objective-C, as it requires a dedicated book. For learning objective-c language grab Programming in Objective-C by Stephen G. Kochan.

Finally, this book is a nice informative book for XCode 4 IDE only. There are other useful resources at Apple’s developer site which will be a helpful reference while reading this book.

Here are the individual ratings of each component that I chose to review this title:

RATING COMPONENT

RATING

CONTENT* 10/10
TOPIC EXPLANATION – BASIC* 10/10
TOPIC EXPLANATION – IN-DEPTH* 10/10
TONE OF THE BOOK* 10/10
BEGINNER’S APPROACH* 10/10
RELEVANCE TO THE XCode 4* 10/10
CONFUSION CREATED** 0.5/10
MISC FEATURE – Pop Quiz* 8/10
GENERAL AUDIENCE LET DOWN**
1/10
QUALITY OF EXAMPLES* 9/10
SOURCE CODE* 10/10

Overall Rating for the book

8.5/10

* higher is Better. ** Lower is better.

GPUToaster rates this book 8.5/10.

This book is available from the publishers site, Packt as well as from the major sites such as AmazonBarnes and Nobel.

Xcode 4 iOS Development Beginner's Guide

Xcode 4 iOS Development Beginner's Guide Full-fills most of the expectations, recommended reading for beginner's.

NVIDIA brings updates to developers


NVIDIA PhysX 3.1

As per the roadmap that was revealed quite a few months back, NVIDIA brings in the new update for the PhysX for the 3.x generation of Physics engine.

“NVIDIA PhysX provides game physics solutions for a variety of platforms including PC and all current major game consoles, in both software and hardware-accelerated configurations.”

NVIDIA PhysX first time integrates the SDK for Android. The Tegra 2 line of smartphones will now get the power of GPU accelerated PhysX in competition to the Unity and UDK (Epic Games).

PhysX SDK 3.1 will support,

  • Multiple platforms viz. PC, Xbox 360, PS3, Android, OSX, and Linux
  • New Destruction Tutorial added
  • New improved  Clothing Tutorials added for 3ds Max, Maya, and UE3
  • Upgraded 3ds Max and Maya Plugin
  • VC10 support has been introduced. This version will not support the VC8 anymore.
  • CUDA 4 is fully supported for GPU enhancement.
  • New and Improved APEX library
  • Extensions, Character Controller and Vehicle source code made available in binary distribution.
  • Improved and enhanced examples for developers that will aid in quick learning
  • Backward compatibility with older generation GPU’s
  • Categorized files and folders for XBOX360
  • User’s guide is no more traditional and contains more readable content.

 Developers will get benefit as, [Src]

  • Various improvements to Foundation and classes shared with APEX.
  • Extensions, Character Controller and Vehicle source code made available in binary distribution.
  • Namespaces cleaned up.
  • Cleaned up a large number of warnings at C++ warning level 4, and set SDK to compile with warnings as errors.
  • No longer passing NULL pointers to user allocator to deallocate.
  • Added x86,x64 suffix to PxTaskCUDA.dll
  • Removed boolean return value from PxScene::addActor(…), and similar API calls.
  • Removed individual sample executables in favor of SampleAllInOne from PC and console builds.

Cloth

  • A new solution for simulating cloth and clothing.

TEGRA 2 ANDROID DEVELOPMENT PACK

Tegra 2

Tegra is NVIDIA’s family of system-on-a-chip (SoC) mobile processors designed to enable high resolution and engaging experiences on tablet, clamshell, mobile phone and other mobile computing platforms. As an SoC, Tegra comprises CPU, GPU and image, video & sound processors in a highly energy efficient package that runs a variety of operating systems including Android, Linux and Windows. For full system specifications of the NVIDIA Tegra 250 SoC, please click here.

Tegra Android Development Pack 1.0

The Tegra Android Development Pack installs all software tools required to develop for Android on NVIDIA’s Tegra platform and is the perfect companion for developing native applications for Tegra Developer Kits. This toolkit includes following:

  • NVIDIA Debug Manager for Eclipse 12.0.0
  • Android SDK r12
  • Android NDK r6b
  • JDK 6u24
  • Cygwin 1.7
  • Eclipse 3.6.2
  • CDT 7.0.2
  • ADT 12.0.0
  • Apache Ant 1.8.2

SHADOWGUN: iPhone and iPad, Android planned too!!


Unity 3D has powered one more game for the Apple and Android users, Shadowgun by Madfinger, which has been released for atleast Apple users on September 28, 2011.

Shadowgun is the most advanced game that is available for smartphones till date. The quality and performance of the game is very optimised and quite resembles console gaming. Mindgamers did try to bring console gaming experience to smartphone users.

Shadowgun definitely proves the potential of smartphone, iOS devices and tablets in todays market. Shadowgun is reported to support Android mobile devices powered by the NVIDIA Tegra. Availability in Tegra Zone app and Android Market is currently unknown, but expect it to come soon.

Authored with the Unity development platform, SHADOWGUN combines tactical combat with third person harrowing action, ushering in a new visual standard for handheld gaming. SHADOWGUN puts players into the role of John Slade, a professional bounty hunter in the year 2350. Slade’s mission: hunt down Dr. Edgar Simon, renowned geneticist and former employee of the trans-galactic corporation Toltech Enterprises. Players must lead “shadowgun” John Slade as he infiltrates Dr. Simon’s mountain fortress and fights his personal army of mutants, cyborgs, and genetically-enhanced humanoids. Using state-of-the-art weaponry, ships, and the assistance of S.A.R.A.—Slade’s personal android assistant. The story is written by award winning author Micah Nathan who has joined the MadFinger team as executive creative consultant for SHADOWGUN.

More at [via]