%% --------------------------------------------------------------  
%% (C)Copyright 2007                                               
%% International Business Machines Corporation                     
%% All Rights Reserved.                                            
%%                                                                 
%% Redistribution and use in source and binary forms, with or      
%% without modification, are permitted provided that the           
%% following conditions are met:                                   
%%                                                                 
%% - Redistributions of source code must retain the above copyright
%%   notice, this list of conditions and the following disclaimer. 
%%                                                                 
%% - Redistributions in binary form must reproduce the above       
%%   copyright notice, this list of conditions and the following   
%%   disclaimer in the documentation and/or other materials        
%%   provided with the distribution.                               
%%                                                                 
%% - Neither the name of IBM Corporation nor the names of its      
%%   contributors may be used to endorse or promote products       
%%   derived from this software without specific prior written     
%%   permission.                                                   
%%                                                                 
%% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND          
%% CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,     
%% INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF        
%% MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE        
%% DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR            
%% CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,    
%% SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT    
%% NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;    
%% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)        
%% HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN       
%% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR    
%% OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,  
%% EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.              
%% --------------------------------------------------------------  
%% PROLOG END TAG zYx                                              

The purpose of this package is to calculates the volume of an n-dimentional sphere.
The PPE uses two differnt procedures to calculate the volume.
One procedure calculates random numbers. The other procedure does
the Monte Carlo simulation. 
Each procedure is performed in parallel on multiple SPEs.


The purpose of this package is to learn how to
  - write one PPE program and multiple (two) SPE programs
  - start multiple SPE programs from one PPE program
  - do static and dynamic allocation of aligned memory (example 128 byte aligned)
  - DMA transfer from and to main memory
  - transfer information to SPE by control block
  - use multiple SPEs in parallel
  - solve a problem using a pipline of SPE task



Description of directories and files


- Makefile
- Makefile.defines
- myType.h
- info.txt
- ppu                 : directory
- spu_MC              : directory
- spu_rand            : directory
 

ppu/
- Makefile
- sphereMC_ppu.c

spu_rand/
- Makefile
- spu_rand.h
- spu_rand.c                    : invokes the random number generators, stores random number data to external memory, communicates with PPU
- sdk_0_to_1_array_f4.c
- sb_0_to_1_array_f4.c
- mt_0_to_1_array_f4.c
- ks_0_to_1_array_f4.c
- hw_0_to_1_array_f4.c 
- scalar_0_to_1_array_f4.c

spu_MC/
- Makefile
- spu_MC.c       : invokes the Monte Carlo simulation to calculate the volume of an n-dimension sphere.
- mc_sphere.h
- mc_sphere0.c
- mc_sphere1.c
- mc_sphere2.c
- mc_sphere3.c
- mc_sphere4.c
