From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jan Schukat Newsgroups: gmane.lisp.guile.bugs Subject: bug#14599: An option to make vector allocation aligned Date: Fri, 14 Jun 2013 10:32:20 +0200 Message-ID: <51BAD514.4090002@email.de> References: <51B87998.9060402@email.de> <87a9mvide2.fsf@gnu.org> <51B8E4B7.9060306@email.de> <874nd2gmsq.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1371198797 32454 80.91.229.3 (14 Jun 2013 08:33:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 14 Jun 2013 08:33:17 +0000 (UTC) Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 14599@debbugs.gnu.org To: Daniel Hartwig Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jun 14 10:33:16 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UnPRY-0005aF-T8 for guile-bugs@m.gmane.org; Fri, 14 Jun 2013 10:33:13 +0200 Original-Received: from localhost ([::1]:45810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnPRY-0005xL-H6 for guile-bugs@m.gmane.org; Fri, 14 Jun 2013 04:33:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnPRS-0005wW-Dw for bug-guile@gnu.org; Fri, 14 Jun 2013 04:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UnPRP-0000Nl-0q for bug-guile@gnu.org; Fri, 14 Jun 2013 04:33:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UnPRO-0000Nd-Ra for bug-guile@gnu.org; Fri, 14 Jun 2013 04:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UnPRO-0004h7-AK for bug-guile@gnu.org; Fri, 14 Jun 2013 04:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jan Schukat Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 14 Jun 2013 08:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14599 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 14599-submit@debbugs.gnu.org id=B14599.137119875318000 (code B ref 14599); Fri, 14 Jun 2013 08:33:02 +0000 Original-Received: (at 14599) by debbugs.gnu.org; 14 Jun 2013 08:32:33 +0000 Original-Received: from localhost ([127.0.0.1]:43145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UnPQs-0004gC-Vt for submit@debbugs.gnu.org; Fri, 14 Jun 2013 04:32:32 -0400 Original-Received: from mout.web.de ([212.227.17.11]:61927) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UnPQq-0004fv-6B for 14599@debbugs.gnu.org; Fri, 14 Jun 2013 04:32:29 -0400 Original-Received: from [192.168.0.27] ([85.177.94.175]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MFtH8-1Uam7H1ZFG-00Etl4; Fri, 14 Jun 2013 10:32:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 In-Reply-To: X-Provags-ID: V03:K0:yGKYSp8jHXtVM9h/PV7e6W1sc5dXHGQ8yV56fbERbr+0rjwJsJm tXFGcIcIUX2/x4ZTAMkYmYkYxx7NpTAG9gHOjmyH6zVAq0HifI0GtCEM7riBiKrZ4t4J9K7 L6Y9ZDmeqYVF14IyCOX/tQD9Uc8dPX82GzreDImWi/MJLNUXT9xgNyxhD/x5WCJcRN8cxAd GxDNOPLAvm/817ycchFYQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7176 Archived-At: On 06/14/2013 03:33 AM, Daniel Hartwig wrote: > On 13 June 2013 21:31, Ludovic Courtès wrote: >> Jan Schukat 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