LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2013, 03:54 AM   #1
BrajZore
Member
 
Registered: Sep 2007
Location: Vxj
Distribution: Slackware
Posts: 50

Rep: Reputation: 15
Learn Assembly before CUDA?


Hi,

Should I learn Assembly programmering before I get started with CUDA programmering? What do u guys recommend?
 
Old 03-01-2013, 01:02 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170Reputation: 3170
"programming"

My suggestion is ... "learn programming." As you do so, you'll discover that "there's more than one way to do it." Different tools and approaches are used in different situations, and you really need to acquaint yourself with several of them.

Surprisingly, even when you're dealing with very low-level stuff like CUDA, "good ol' 'C' with the occasional asm{} block" is still the way that most things are done ... as you can plainly see if you snoop around the /arch subdirectory of any Linux distribution.

Fact is, modern microprocessors really aren't designed to be programmed "by hand." Hardware implementors work very closely with compiler implementors to build features that might be tricky for a human to deal with, but that can easily be incorporated into an architecture-aware compiler (like GCC). So, even though this might at first blush sound counter-intuitive, you can often produce faster code with a compiler than you can with assembly. The compiler just might turn out to be a better code-generator than you are.

Last edited by sundialsvcs; 03-01-2013 at 01:04 PM.
 
Old 03-01-2013, 02:54 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,400

Rep: Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584Reputation: 2584
there are as many opinions as there are programmers so...
but some general options
learn something like python first
move to say something like FORTRAN next ( it is making a come back )
then c and c++
then go on to nvidia's own language "CG" ( C for Graphics")
CUDA uses CG
 
Old 03-03-2013, 09:23 AM   #4
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 123Reputation: 123
Quote:
Originally Posted by John VV View Post
there are as many opinions as there are programmers so...
Here is another programmer with another opinion .

Learn C. Learn how to use pointers (eg by using pointers instead of array indexes). Learn about type casting, learn about structures and pointers to structures.

Once you have that mastered then some concepts in assembly language will be much easier to grasp (especially indirection) and you will be in a good position to understand object orientated languages like Java and C++.
 
Old 03-04-2013, 08:18 PM   #5
CTech
LQ Newbie
 
Registered: Aug 2012
Location: TN
Distribution: Ubuntu
Posts: 17
Blog Entries: 1

Rep: Reputation: 0
It also depends on what your goal in programming are? If you are wanting to write a compiler or just make some GUI. You must choose an appropriate language. Also, I would personally recommend learning as many languages as you can. You may never use it, but if you have a wide variety of skills it will help you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Linux Assembly: write and receive assembly data errigour Programming 2 09-22-2012 10:54 AM
[SOLVED] cuda for gfortran ? aihaike Programming 4 09-26-2010 09:07 PM
CUDA on 11.2 (64 bit) marios_auth SUSE / openSUSE 1 04-02-2010 11:46 PM
How to learn assembly language? darkangel29 Programming 8 01-12-2009 01:30 PM
What are some good resources to learn assembly Language? theunixwizard General 16 07-24-2008 04:27 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration