/[escript]/branches/arrexp_2137_win_merge/escript/src/DataVector.cpp
ViewVC logotype

Diff of /branches/arrexp_2137_win_merge/escript/src/DataVector.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 121 by jgs, Fri May 6 04:26:16 2005 UTC revision 122 by jgs, Thu Jun 9 05:38:05 2005 UTC
# Line 13  Line 13 
13  */  */
14    
15  #include <iostream>  #include <iostream>
16    #include <cassert>
17    
18  #include "escript/Data/DataVector.h"  #include "escript/Data/DataVector.h"
19  #include "escript/Data/Taipan.h"  #include "escript/Data/Taipan.h"
# Line 40  DataVector::DataVector(const DataVector& Line 41  DataVector::DataVector(const DataVector&
41    m_N(other.m_N)    m_N(other.m_N)
42  {  {
43    m_array_data = arrayManager.new_array(m_dim,m_N);    m_array_data = arrayManager.new_array(m_dim,m_N);
44    for (int i=0; i<m_size; i++) {    int i;
45      #pragma omp parallel for private(i) schedule(static)
46      for (i=0; i<m_size; i++) {
47      m_array_data[i] = other.m_array_data[i];      m_array_data[i] = other.m_array_data[i];
48    }    }
49  }  }
# Line 85  DataVector::resize(const DataVector::siz Line 88  DataVector::resize(const DataVector::siz
88    m_N = newSize / newBlockSize;    m_N = newSize / newBlockSize;
89    m_array_data = arrayManager.new_array(m_dim,m_N);    m_array_data = arrayManager.new_array(m_dim,m_N);
90    
91    for (int i=0; i<m_size; i++) {    int i;
92      m_array_data[i]=newValue;    #pragma omp parallel for private(i) schedule(static)
93      for (i=0; i<m_size; i++) {
94        m_array_data[i] = newValue;
95    }    }
96  }  }
97    
# Line 102  DataVector::operator=(const DataVector& Line 107  DataVector::operator=(const DataVector&
107    m_N = other.m_N;    m_N = other.m_N;
108    
109    m_array_data = arrayManager.new_array(m_dim,m_N);    m_array_data = arrayManager.new_array(m_dim,m_N);
110    for (int i=0; i<m_size; i++) {    int i;
111      #pragma omp parallel for private(i) schedule(static)
112      for (i=0; i<m_size; i++) {
113      m_array_data[i] = other.m_array_data[i];      m_array_data[i] = other.m_array_data[i];
114    }    }
115    

Legend:
Removed from v.121  
changed lines
  Added in v.122

  ViewVC Help
Powered by ViewVC 1.1.26