Create embedded-5_0-branch branch for development on ARM embedded cores.
[official-gcc.git] / embedded-5_0-branch / gcc / testsuite / g++.dg / graphite / id-1.C
blob5770e905dfbd9f1f03381f1ab56fee42508885e3
1 #include <vector>
3 template <int rank, int dim> class Tensor;
4 template <int dim>
5 class Tensor<1,dim>
7   public:
8     explicit Tensor (const bool initialize = true);
9     Tensor (const Tensor<1,dim> &);
10     double values[(dim!=0) ? (dim) : 1];
12 template <int dim>
13 Tensor<1,dim>::Tensor (const Tensor<1,dim> &p)
15   for (unsigned int i=0; i<dim; ++i)
16     values[i] = p.values[i];
18 template <int dim>
19 class KellyErrorEstimator
21     struct PerThreadData
22     {
23  std::vector<std::vector<std::vector<Tensor<1,dim> > > > psi;
24  PerThreadData (const unsigned int n_solution_vectors,
25          const unsigned int n_components,
26          const unsigned int n_q_points);
27     };
29 template <int dim>
30 KellyErrorEstimator<dim>::PerThreadData::
31 PerThreadData (const unsigned int n_solution_vectors,
32         const unsigned int n_components,
33         const unsigned int n_q_points)
35   for (unsigned int i=0; i<n_solution_vectors; ++i)
36     for (unsigned int qp=0;qp<n_q_points;++qp)
37       psi[i][qp].resize(n_components);
39 template class KellyErrorEstimator<3>;