From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10560 invoked by alias); 12 Jan 2016 13:10:49 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 10546 invoked by uid 89); 12 Jan 2016 13:10:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Structure, UD:offload.h, offloadh, offload.h X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 Jan 2016 13:10:47 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id A0EA3FB756; Tue, 12 Jan 2016 13:10:46 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.3]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0CDAii3007403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 12 Jan 2016 08:10:46 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u0CDAgkX003091; Tue, 12 Jan 2016 14:10:43 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u0CDAd60003090; Tue, 12 Jan 2016 14:10:39 +0100 Date: Tue, 12 Jan 2016 13:10:00 -0000 From: Jakub Jelinek To: Alexander Monakov Cc: Martin Jambor , GCC Patches Subject: Re: [hsa 2/10] Modifications to libgomp proper Message-ID: <20160112131039.GI3017@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20151207111758.GA24234@virgil.suse.cz> <20151207111957.GC24234@virgil.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00713.txt.bz2 On Tue, Jan 12, 2016 at 04:00:11PM +0300, Alexander Monakov wrote: > Hello, Martin, Jakub, community, > > This part of the patch: > > On Mon, 7 Dec 2015, Martin Jambor wrote: > > include/ > > * gomp-constants.h (GOMP_DEVICE_HSA): New macro. > [snip] > > (GOMP_kernel_launch_attributes): New type. > > (GOMP_hsa_kernel_dispatch): New type. > > is going to break build of NVPTX cross-compiler, because it uses uint32_t, > uint64_t types like below, but those types will not be available when building > nvptx libgcc. gomp-constants.h is #include'd in libgcc via tm.h and > offload.h. > > Note how other files in include/ need to do a special dance with #ifdef > HAVE_STDINT_H to include and obtain uint64_t. > > Shall I move the problematic structs into a separate file, gomp-types.h? Or just move those into libgomp-plugin.h, those type definitions don't have to be shared between the compiler and libgomp, the compiler has to duplicate those definitions anyway, as it needs to create the IL of those types and can't use the host structure type for that purpose. > > diff --git a/include/gomp-constants.h b/include/gomp-constants.h > > index dffd631..1dae474 100644 > > --- a/include/gomp-constants.h > > +++ b/include/gomp-constants.h > [snip] > > +/* Structure describing the run-time and grid properties of an HSA kernel > > + lauch. */ > > + > > +struct GOMP_kernel_launch_attributes > > +{ > > + /* Number of dimensions the workload has. Maximum number is 3. */ > > + uint32_t ndim; > > + /* Size of the grid in the three respective dimensions. */ > > + uint32_t gdims[3]; > > + /* Size of work-groups in the respective dimensions. */ > > + uint32_t wdims[3]; > > +}; Jakub