dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #26123
Re: unsigned int -> std::size_t
-
To:
"Garth N. Wells" <gnw20@xxxxxxxxx>
-
From:
Anders Logg <logg@xxxxxxxxx>
-
Date:
Sun, 11 Nov 2012 11:36:53 -0800
-
Cc:
DOLFIN Mailing List <dolfin@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CAA4C66O8+hFcnJRd=8R833+zDFda-LnQ_YPGGvSGaEF=4DtiSA@mail.gmail.com>
-
User-agent:
Mutt/1.5.21 (2010-09-15)
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