unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jan Schukat <shookie@email.de>
To: Daniel Hartwig <mandyke@gmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, 14599@debbugs.gnu.org
Subject: bug#14599: An option to make vector allocation aligned
Date: Fri, 14 Jun 2013 10:32:20 +0200	[thread overview]
Message-ID: <51BAD514.4090002@email.de> (raw)
In-Reply-To: <CAN3veRddPmNy=JJ-J85cbhnycXD2X5h8ftjmJu5J9fKTxAfVTg@mail.gmail.com>

On 06/14/2013 03:33 AM, Daniel Hartwig wrote:
> On 13 June 2013 21:31, Ludovic Courtès <ludo@gnu.org> wrote:
>> Jan Schukat <shookie@email.de> skribis:
>>> The other question is the read syntax (one of the primary reasons I'm
>>> doing all this). If alignment is something that should be preserved in
>>> the permanent representation, you also need to store it in the flags,
>>> since the content pointer can be aligned by coincidence. I haven't
>>> looked at the compiling of bytevectors yet, to see if alignment can be
>>> handled easily there.
>> I agree that we’d need some sort of annotation to specify the alignment
>> of literals, but adding read syntax for that scares me somewhat.  What
>> do people think?
> I agree.  The read syntax for vector-ish types in guile is already
> large enough.  If alignment is important then use a procedural
> constructor and query.
>
> Alignment information not need to be printed with the default
> representation (read syntax), we dont also print the storage address,
> etc..
>
> Regards
  The more I think about it and hear what you have to say, the more I 
think alignment just needs to be tied to the type of the uniform array. 
Up to float and int 32 arrays nothing will change then. Double and int64 
arrays get one word of padding on 32 bit machines to make them 8 byte 
aligned. And then introduce new type flags m128 and m256 for for simd 
types that are 16 or 32 byte bit aligned, possibly the complex arrays 
too. Since you can interpret uniform arrays as all types of uniform 
array this should solve all alignment problems where needed. The simd 
type arrays must be able to accept and recognize int and float 
immediates though, and you must be able to group them. That's not really 
much new syntax, and won't interfere with the old syntax.

Also, now I lean more towards switching to 2.2 for myself and implement 
it on there, because as Ludovic said, the compiling will possibly 
preserve alignment there better.

Regards

Jan Schukat





  reply	other threads:[~2013-06-14  8:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 13:37 bug#14599: An option to make vector allocation aligned Jan Schukat
2013-06-12 14:59 ` Ludovic Courtès
2013-06-12 15:32   ` Jan Schukat
2013-06-12 21:14   ` Jan Schukat
2013-06-13 13:31     ` Ludovic Courtès
2013-06-14  1:33       ` Daniel Hartwig
2013-06-14  8:32         ` Jan Schukat [this message]
2013-06-14 12:21           ` Ludovic Courtès
2013-06-17 10:04             ` Jan Schukat
2013-06-12 20:37 ` Andy Wingo
2013-06-13  7:07   ` Jan Schukat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51BAD514.4090002@email.de \
    --to=shookie@email.de \
    --cc=14599@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=mandyke@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).