kspaceFirstOrder3D-OMP 1.0
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
Utils/DimensionSizes.h
Go to the documentation of this file.
00001 
00032 #ifndef DIMENSIONSIZES_H
00033 #define  DIMENSIONSIZES_H
00034 
00035 #include <stdlib.h>
00036 #include <stdio.h>
00037 
00038 using namespace std;
00039 
00044 const int SSE_ALIGNMENT = 16;
00045 
00050 struct TDimensionSizes {
00052     size_t X;
00054     size_t Y; 
00056     size_t Z; 
00057     
00059     TDimensionSizes(): X(0), Y(0), Z(0) {};   
00060     
00067     TDimensionSizes(size_t x, size_t y, size_t z): X(x), Y(y), Z(z) {};    
00068    
00073     TDimensionSizes(const TDimensionSizes & src) :
00074             X(src.X), Y(src.Y), Z(src.Z) {};
00075             
00080     size_t GetElementCount () const {return X * Y * Z; };
00081     
00082     
00088      TDimensionSizes& operator = (const TDimensionSizes & src){
00089          if (this != &src){
00090                 X  = src.X;
00091                 Y  = src.Y;
00092                 Z  = src.Z;                
00093          }    
00094         return *this;
00095       };
00096     
00097      
00098      
00104     bool operator== (const TDimensionSizes &other) const {
00105         return ((X == other.X) && (Y == other.Y) &&  (Z == other.Z));
00106         
00107     }
00108     
00114     bool operator!= (const TDimensionSizes &other) const {
00115         return ((X != other.X) || (Y != other.Y) ||  (Z != other.Z));
00116   }
00117     
00118     
00119 }; // end of TDimensionSizes
00120 //------------------------------------------------------------------------------
00121 
00122 
00123 #endif   /* DIMENSIONSIZES_H */
00124 
 All Classes Files Functions Variables Typedefs Enumerations