Under The Wire

Under The Wire
Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Tuesday, July 14, 2009

Interesting links #2

Google I/O 2009 - The Myth of the Genius Programmer: definitely a worth watching to understand what programming actually is.

10 Privacy Settings for Facebook: I don’t know if it is fair to write in the same sentence both Facebook and Privacy, however have a read and adjust your settings.

"0wnz0red": Programmers who hack their own bodies don't need exercise and never get sick: A new short story from one of science fiction's bright young stars. By Cory Doctorow

Inside Gazelle, Microsoft Research's "browser OS": for sure it will not bury Internet Explorer in the near future. But it is still interesting, really interesting.

Windows 7 is nearly RTM but there is still the need to additional software to Mount ISO images, and make PDF.

If you missed the links we suggested in the past check it out.


Read more...

Saturday, July 11, 2009

Interesting links #1

Google's Microsoft Moment: Google announced its Chrome OS, are they becoming evil (In the case they are not already evil)? Chrome (The browser) its great, I’m waiting to see how the Chrome OS will look like, even if I am not a Linux supporter.

Inside C# 4.0: dynamic typing, optional parameters, covariance and contravariance: how to make the language messy, with some syntax sugar and some useful properties (Respectively).

Office 2010: The Movie: I used to hate every single office software suite. Now I have a reason to prefer LaTeX even to Office 2010, without even having to try it. Microsoft, can you please hire an actual marketing division?

Object Oriented Design: sit watch and learn the principle and the patterns before actually writing the code. It helps a lot.


Read more...

Wednesday, April 15, 2009

Integrate a CUDA kernel in your projects

Recently I told you how to setup a Virtual Machine with VirtualBox running openSUSE (Yeah, this time I spelled it right).

As I wrote on the previous post all the mess was due to a project with nVidia CUDA, porting some data intensive tasks on the GPU.

Working on an existing project I had some troubles integrating the new code with the existing sources editing the makefile.

To build your executable with a CUDA kernel you have to do this:

  • Compile CUDA sources with nvcc (You have to install CUDA toolkit to have it), generating an object file.
    Be sure that when you include functions headers from your C project into the CUDA sources you state that what you are importing is C code. To do that use extern “C” {#incude “whateverYouWant.h”} and it will be fine.
    $ nvcc --compiler-options -fno-strict-aliasing -I. -I/opt/cuda/NVIDIA_CUDA_SDK/common/inc -I/opt/cuda/include -o objectCUDA.o -c SOURCE.cu
  • Compile the project C code with gcc, producing the object files, as you do usually.
  • Link all together, using gcc. Be sure that you link all the required libraries.
    gcc -o EXECUTABLE object1.o object2.o objectCUDA.o -L/opt/cuda/lib -lcudart -L/opt/cuda/NVIDIA_CUDA_SDK/lib -lcutil

With this tips you should be able to edit easily your project makefile and have all the things working.


Read more...

  © Blogger template 'Minimalist E' by Ourblogtemplates.com 2008

Back to TOP