<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>After a lot of thought I am going to do something this year that
      I have never done before.  Since I don't want you to spend your
      entire weekend trying to get the Dusty code in C to give correct
      results (as I far know nobody has this working yet), I am going to
      give you a numerically correct working version in C.  It is not
      segmented -- but you can fix that without too much work.<br>
    </p>
    <p>In class tomorrow I will provide you with two different ways to
      do multidimensional dynamic allocation in C with an addendum for
      the best performance in C++.  <br>
    </p>
    <p>I will then, after class, provide you with a link to get my
      version of dusty.c that you can then start trying to optimize.  
      It is FULL of pointer arithmetic.<br>
    </p>
    <p>I want to stress that you could, theoretically, write dusty using
      the stack (compile time allocation) vs the heap (run-time dynamic
      allocation) - but by default the OS is going to limit the amount
      of memory you can access.  You can turn this off with some unix
      commands, but it is generally unsafe.  I honestly think that
      dusty, with a MAXDIM of 50, will run fine if you want to use stack
      memory allocation semantics in your code.   The problem is that to
      see if you code optimization changes are doing anything you
      generally have to increase the size of MAXDIM to well above 50 --
      and that usually causes a stack overflow.  Use at your own risk.<br>
    </p>
    <p><br>
    </p>
    <div class="moz-signature">-- <br>
      <b>Andrew J. Pounds, Ph.D.</b><br>
      <i>Professor of Chemistry and Computer Science</i><br>
      <i>Director of the Computational Science Program</i><br>
      <i>Mercer University, Macon, GA, 31207 (478) 301-5627 </i></div>
  </body>
</html>