comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Help on record to a Newbie
Date: Fri, 28 Dec 2012 07:36:40 -0800 (PST)
Date: 2012-12-28T07:36:40-08:00	[thread overview]
Message-ID: <584cab7e-318f-415c-936c-8e98d9540cec@googlegroups.com> (raw)
In-Reply-To: <f06526ef-c173-4569-b918-71f8a8614893@googlegroups.com>

On Friday, December 28, 2012 5:52:42 AM UTC-6, Cedric wrote:
> Hi again,
> 
> The comments with "register" in it were meant to define variables that can access processor registers. As I learnt last night, this is normally not needed when using Ada. I try to find a solution with the Ada way.

"Pragma Volatile(VARIABLE);" will mark a variable as 'undecidably mutable', something like a memory-mapped clock where any access of the value could have a different value -- I don't recall any way to bind a variable to a register, and in any case that's likely a bad idea: the compiler is typically smart enough to know when to put things in a register. -- Many men, working multiple years on the problem, are likely to have a better understanding of the how/when... this is precisely why the "big new overhaul" in programming is parallelism: the market selected C/C++ and thus bonded to a low-level view of computing (because it was "more efficient" and they had more "control") which is inherently a poor fit for the problem of parallelization.

You will get the same result every time you try to fit the code to the machine rather than the code to the problem. (Of course, sometimes the machine is the 'problem' as is the case with OSes and device rivers.)



  reply	other threads:[~2012-12-28 15:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 19:31 Help on record to a Newbie Cedric
2012-12-27 19:50 ` Jeffrey Carter
2012-12-27 19:51 ` Niklas Holsti
2012-12-27 20:25 ` Shark8
2012-12-27 23:53 ` Cedric
2012-12-28  8:00   ` Niklas Holsti
2012-12-28  8:30     ` Cedric
2012-12-28  9:29       ` Simon Wright
2012-12-30 17:29       ` Niklas Holsti
2012-12-28 11:52 ` Cedric
2012-12-28 15:36   ` Shark8 [this message]
2012-12-30 16:03   ` Niklas Holsti
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox