~corrado-maurini/dolfin/tao

« back to all changes in this revision

Viewing changes to dolfin/math/basic.cpp

  • Committer: corrado maurini
  • Date: 2012-12-18 12:16:08 UTC
  • mfrom: (6685.78.207 trunk)
  • Revision ID: corrado.maurini@upmc.fr-20121218121608-nk82ly9jgsld9u84
updating with trunk, fix uint in TAO solver and hacking the check for tao FindTAO.cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
}
36
36
 
37
37
//-----------------------------------------------------------------------------
38
 
dolfin::uint dolfin::ipow(uint a, uint n)
 
38
std::size_t dolfin::ipow(std::size_t a, std::size_t n)
39
39
{
40
 
  uint p = a;
41
 
  for (uint i = 1; i < n; i++)
 
40
  std::size_t p = a;
 
41
  for (std::size_t i = 1; i < n; i++)
42
42
    p *= a;
43
43
  return p;
44
44
}
54
54
  return static_cast<double>(std::rand()) / static_cast<double>(RAND_MAX);
55
55
}
56
56
//-----------------------------------------------------------------------------
57
 
void dolfin::seed(unsigned int s)
 
57
void dolfin::seed(std::size_t s)
58
58
{
59
59
  std::srand(s);
60
60
  rand_seeded = true;