← Back to team overview

dolfin team mailing list archive

Re: unsigned int -> std::size_t

 

On Sun, Nov 11, 2012 at 10:22:12AM +0000, Garth N. Wells wrote:
> On Fri, Oct 26, 2012 at 6:22 AM, Anders Logg <logg@xxxxxxxxx> wrote:
> > On Mon, Oct 22, 2012 at 10:32:11AM +0100, Garth N. Wells wrote:
> >> We have discussed briefly in the past changing from unsigned int
> >> (typedef uint) to std::size_t. Starting to solve some really big
> >> problems and some changes in Trilinos make it a good time to bring
> >> this up again. Any thoughts or objections to moving to std::size_t
> >> from uint?
> >
> > I think this would be a good idea.
> >
>
> I've started making some unsigned int -> std::size_t changes as I
> restructure mesh partitioning.
>
> > I suggest we keep the uint typedef and make it point to size_t.
> >
>
> I think we should use std::size_t and not uint. std::size_t is already
> a typedef and it conveys an intention: big enough for the largest
> array that can be allocated on a machine.  Also, it's not a question
> of unsigned int or std::size_t - there are places for both.

So we will keep dolfin::uint for stuff like component indices and
other small integers, and use size_t for everything that can
potentially be large?

How about the Mesh? Should we use size_t for stuff like mesh
connectivity?

--
Anders


Follow ups

References