Re: [fpc-devel] Aligned dynamic arrays

2019-03-27 Thread Ryan Joseph
> On Mar 27, 2019, at 9:13 PM, Martin Frb wrote: > > 2 Ideas, well 1 Idea, 1comment... > > The Idea: > Would it not be easier to: > - allocate mem, with extra space for align, unless memmanager can handle > align. > - return the alligned pointer for the array, so all array ops will work > ex

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread J. Gareth Moreton
I think the official unsigned 32-bit integer type in Pascal is "LongWord". As others have said, be aware that pointers are 64-bit under x64... that's kind of why it's called x64!  If you absolutely must have a packed record with 32-bit types, I recommend changing Sender and Target to indices that

Re: [fpc-devel] Programming in Pascal .

2019-03-27 Thread Carsten Bager
Hi If you download FPC and source, then I think it can be done. I have tried to do this test program on my Pi. Below is a description of the installation of Lazarus, you can skip the lazarus part. Carsten Program Test1; {$RANGECHECKS ON} {$OVERFLOWCHECKS ON} {$S+ STACK CHECKING ON} {$SMARTLINK O

Re: [fpc-devel] Aligned dynamic arrays

2019-03-27 Thread Martin Frb
On 28/03/2019 00:43, Ryan Joseph wrote: I would like to attempt to implement this feature request (https://bugs.freepascal.org/view.php?id=34031 for my boss) which has the SetLength intrinsic return aligned memory. We need this for the Metal framework which requires all vertex buffer memory to

[fpc-devel] Aligned dynamic arrays

2019-03-27 Thread Ryan Joseph
I would like to attempt to implement this feature request (https://bugs.freepascal.org/view.php?id=34031 for my boss) which has the SetLength intrinsic return aligned memory. We need this for the Metal framework which requires all vertex buffer memory to aligned on 4k boundaries so we can’t use

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread Pierre Muller
> ___ > fpc-devel maillist  -  fpc-devel@lists.freepascal.org > > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel > > > Pointer arithmetic: > *for Indx := 0 to SizeOf(TTCPPackageHeader

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
On Wed, Mar 27, 2019 at 7:47 PM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > DJ Coertzen schrieb am Mi., 27. März 2019, > 18:27: > >> Hi there, >> >> I need a solution for a packed record containing 4-byte 32-bit integers >> and cardinals, and other byte 8 bit and word 16 b

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
On Wed, Mar 27, 2019 at 7:48 PM Christo Crause wrote: > > > On Wed, 27 Mar 2019, 19:27 DJ Coertzen, > wrote: > >> Hi there, >> >> I need a solution for a packed record containing 4-byte 32-bit integers >> and cardinals, and other byte 8 bit and word 16 bit sized variables to >> overlay over a st

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
On Wed, Mar 27, 2019 at 7:48 PM Christo Crause wrote: > > > On Wed, 27 Mar 2019, 19:27 DJ Coertzen, > wrote: > >> Hi there, >> >> I need a solution for a packed record containing 4-byte 32-bit integers >> and cardinals, and other byte 8 bit and word 16 bit sized variables to >> overlay over a st

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread Christo Crause
On Wed, 27 Mar 2019, 19:27 DJ Coertzen, wrote: > Hi there, > > I need a solution for a packed record containing 4-byte 32-bit integers > and cardinals, and other byte 8 bit and word 16 bit sized variables to > overlay over a stream. > > Example: > *type* > * TMyBinaryHeader = packed record* > *

Re: [fpc-devel] Packed record integers and x86_86

2019-03-27 Thread Sven Barth via fpc-devel
DJ Coertzen schrieb am Mi., 27. März 2019, 18:27: > Hi there, > > I need a solution for a packed record containing 4-byte 32-bit integers > and cardinals, and other byte 8 bit and word 16 bit sized variables to > overlay over a stream. > > Example: > *type* > * TMyBinaryHeader = packed record* >

[fpc-devel] Packed record integers and x86_86

2019-03-27 Thread DJ Coertzen
Hi there, I need a solution for a packed record containing 4-byte 32-bit integers and cardinals, and other byte 8 bit and word 16 bit sized variables to overlay over a stream. Example: *type* * TMyBinaryHeader = packed record* *Sender: Cardinal;* *Target: Cardinal;* *Refere

[fpc-devel] Vectorisation, optimisation etc.

2019-03-27 Thread J. Gareth Moreton
Hi everyone, So with the false start that was pure inline assembly, I like to talk about how to move forward with FPC, or at least with x86_64.  To Florian in particular, what is the current state of the compiler's support of the 256-bit YMM registers? I remember you telling me not to enable supp

Re: [fpc-devel] Programming in Pascal .

2019-03-27 Thread Paul Breneman
On 3/27/2019 10:28 AM, Tomas Hajny wrote: On Wed, March 27, 2019 14:53, Yves Boudeville wrote: Merci Tomas pour votre sympathique aide sur le Free Pascal. Pas de quoi / you're welcome. :-) . . I absolutely agree with you Tomas, I can do very interesting simulations 1920 x 1080 in usin

Re: [fpc-devel] Programming in Pascal .

2019-03-27 Thread Tomas Hajny
On Wed, March 27, 2019 14:53, Yves Boudeville wrote: > Merci Tomas pour votre sympathique aide sur le Free Pascal. Pas de quoi / you're welcome. :-) . . > I absolutely agree with you Tomas, I can do very interesting simulations > 1920 x 1080 in using only Windows 10 / 64 bits for Fpc/Ptc and

Re: [fpc-devel] Programming in Pascal .

2019-03-27 Thread Tomas Hajny
Hello, Please note that the original poster isn't subscribed to the list apparently, you may better include him in Cc: when responding (doing that myself now). As far as I can tell, the issue may be more likely related to the packaging of a particular Linux distribution (Raspbian in this case?) t

Re: [fpc-devel] Programming in Pascal .

2019-03-27 Thread J. Gareth Moreton
Hello there Yves Boudeville, That's great to hear that Pascal has served you well with scientific programming and the like.  I confess unfortunately I'm not familiar with the units, but I will be happy to see if I can help optimise them in places, either by writing platform-specific assembly lang

[fpc-devel] Programming in Pascal .

2019-03-27 Thread Yves Boudeville
Bonjour. I am asking questions on the art of scientific computing from 1966. After Algol and Modula, the U.C.S.D. Pascal system has been the touchstone of the scientific computing. This has been devoted by Niklaus Wirth book and applied in Borland TP7 software. The only thing scientists need is