dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25562
Re: About form signature strings
Here's another good reason from a C++ compiler error:
error
: string literal of length 186851 exceeds maximum length 65536 that
C++ compilers are required to support [-
Werror,-pedantic,-Woverlength-strings]
I get this using a non-gcc compiler on the code generated for the
hyperelasticity demo. The error is cause by the repr string which is
too long.
Garth
On 22 March 2012 23:36, Anders Logg <logg@xxxxxxxxx> wrote:
> On Thu, Mar 22, 2012 at 03:28:30PM +0100, Martin Sandve Alnæs wrote:
>> For complex forms, the repr(form) signature string used today may grow
>> quite large.
>>
>> An alternative is to use a short signature, e.g. the sha1 checksum
>> of the same repr string or of some equally unique data.
>>
>> Do we actually use the repr string of the form for anything?
>> It's nice to have in the generated code to see what the code
>> came from, but that could eventually be replaced with something
>> more readable. At least if the repr string is stored in a comment in
>> the generated code instead of in the signature() function, the C++
>> compiler can discard it quickly and it won't take up memory in the
>> final program.
>
> I don't think it is used for anything. It is usually pretty messy.
>
> It sounds good to just return the hash in the signature and put the
> full signature in a comment.
>
> --
> Anders
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
--
Garth N. Wells
Department of Engineering, University of Cambridge
http://www.eng.cam.ac.uk/~gnw20
References