Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/23/04 10:48
Read: times


 
#83693 - on ANSI-ness and portability
Responding to: ???'s previous message
Let me tell a story.

One friend of mine, while doing his PhD, had to solve a set of Schroedinger equations for various boundary conditions (dealing with quantum wells in very thin semiconductor layers) - basically solving differential equations.
He wrote the first version in matlab, it went very rapidly - dealing with matrices of complex numbers etc. is natural in matlab. However, it ran too slowly, taking hours and hours of calculations on a then-high-end 486 PC. He decided to rewrite it to C to speed it up; but he gained access to Apollo (HP) and Sun workstations (running Unix), so he rewrote the software by hand, very carefully, strictly obeying ANSI, debugging on the PC (as machine time on the workstations was very limited) (Borland C has an ANSI-only option) and also trying to optimize the algorithm for speed.
When he went to the workstations, confident he would be able to run it very quickly (being ANSI), it even did not compile for the first time, and then giving bad results. It took a lot of labour to make it SUN-ANSI and Apollo-ANSI.

So much about portability.

Not to mention the peculiarities of a Keil-ANSI compiler.

I should have posted this on the C.vs.asm thread, but maybe useful here, too.

Jan Waclawek


List of 31 messages in thread
TopicAuthorDate
microcontroller link in matlabe            01/01/70 00:00      
   possible, but not practical            01/01/70 00:00      
   Ask Matlab            01/01/70 00:00      
      Matlab+C+ 8051= ??            01/01/70 00:00      
   reply: microcontroller and matlab link            01/01/70 00:00      
      space vector modulator in a mcu...            01/01/70 00:00      
      Matrix issues            01/01/70 00:00      
         ANSI 'C'            01/01/70 00:00      
            on ANSI-ness and portability            01/01/70 00:00      
               ANSI            01/01/70 00:00      
                  "implementation specific" = problem            01/01/70 00:00      
                     At last !            01/01/70 00:00      
         It can be done            01/01/70 00:00      
      maybe a solution - or workaround            01/01/70 00:00      
         Lookup Tables!            01/01/70 00:00      
            Why Excel?            01/01/70 00:00      
         Lookup table            01/01/70 00:00      
            Depending on size of tables,            01/01/70 00:00      
         need to use eprom            01/01/70 00:00      
            Converting to .hex            01/01/70 00:00      
               Bin2hex            01/01/70 00:00      
   App Note References            01/01/70 00:00      
   keil help            01/01/70 00:00      
      Keil            01/01/70 00:00      
      You still need floating point, sqrt...??            01/01/70 00:00      
      Aaaaargh!            01/01/70 00:00      
   variable time interval            01/01/70 00:00      
      use timer interrupt            01/01/70 00:00      
         Space vector modulation            01/01/70 00:00      
            external eprom            01/01/70 00:00      
               EEPROM            01/01/70 00:00      

Back to Subject List