From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103212 invoked by alias); 2 Nov 2015 10:14:56 -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 103193 invoked by uid 89); 2 Nov 2015 10:14:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 02 Nov 2015 10:14:54 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CF67FAAD1 for ; Mon, 2 Nov 2015 10:14:43 +0000 (UTC) To: GCC Patches From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [HSA] libgomp and hsa-gen.c header file refactoring Message-ID: <5637379A.2020504@suse.cz> Date: Mon, 02 Nov 2015 10:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000600040005080307020609" X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00043.txt.bz2 This is a multi-part message in MIME format. --------------000600040005080307020609 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 83 Hello. Following patch moves content of hsa-traits.h to gomp-constants.h. Martin --------------000600040005080307020609 Content-Type: text/x-patch; name="0001-HSA-move-content-of-hsa-traits.h-to-gomp-constants.h.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-HSA-move-content-of-hsa-traits.h-to-gomp-constants.h.pa"; filename*1="tch" Content-length: 6286 >From 40179af53541cf3318f8710ac23b9908b90353e8 Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 26 Oct 2015 11:49:02 +0100 Subject: [PATCH] HSA: move content of hsa-traits.h to gomp-constants.h include/ChangeLog: 2015-10-26 Martin Liska * gomp-constants.h (struct hsa_kernel_dispatch): New structure. gcc/ChangeLog: 2015-10-26 Martin Liska * hsa-gen.c (struct hsa_kernel_dispatch): Remove the declaration. libgomp/ChangeLog: 2015-10-26 Martin Liska * hsa-traits.h: Remove. * plugin/plugin-hsa.c: Include gomp-constants.h. --- gcc/hsa-gen.c | 30 +------------------------ include/gomp-constants.h | 31 ++++++++++++++++++++++++++ libgomp/hsa-traits.h | 54 --------------------------------------------- libgomp/plugin/plugin-hsa.c | 1 - 4 files changed, 32 insertions(+), 84 deletions(-) delete mode 100644 libgomp/hsa-traits.h diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c index c36c9e0..ec5cd81 100644 --- a/gcc/hsa-gen.c +++ b/gcc/hsa-gen.c @@ -78,6 +78,7 @@ along with GCC; see the file COPYING3. If not see #include "cfganal.h" #include "builtins.h" #include "params.h" +#include "gomp-constants.h" /* Print a warning message and set that we have seen an error. */ @@ -112,35 +113,6 @@ along with GCC; see the file COPYING3. If not see /* Following structures are defined in the final version of HSA specification. */ -/* HSA kernel dispatch is collection of informations needed for - a kernel dispatch. */ - -struct hsa_kernel_dispatch -{ - /* Pointer to a command queue associated with a kernel dispatch agent. */ - void *queue; - /* Pointer to reserved memory for OMP data struct copying. */ - void *omp_data_memory; - /* Pointer to a memory space used for kernel arguments passing. */ - void *kernarg_address; - /* Kernel object. */ - uint64_t object; - /* Synchronization signal used for dispatch synchronization. */ - uint64_t signal; - /* Private segment size. */ - uint32_t private_segment_size; - /* Group segment size. */ - uint32_t group_segment_size; - /* Number of children kernel dispatches. */ - uint64_t kernel_dispatch_count; - /* Number of threads. */ - uint32_t omp_num_threads; - /* Debug purpose argument. */ - uint64_t debug; - /* Kernel dispatch structures created for children kernel dispatches. */ - struct hsa_kernel_dispatch **children_dispatches; -}; - /* HSA queue packet is shadow structure, originally provided by AMD. */ struct hsa_queue_packet diff --git a/include/gomp-constants.h b/include/gomp-constants.h index 228d933..839081b 100644 --- a/include/gomp-constants.h +++ b/include/gomp-constants.h @@ -144,4 +144,35 @@ enum gomp_map_kind #define GOMP_LAUNCH_OP(X) (((X) >> GOMP_LAUNCH_OP_SHIFT) & 0xffff) #define GOMP_LAUNCH_OP_MAX 0xffff +/* HSA specific data structures. */ + +/* HSA kernel dispatch is collection of informations needed for + a kernel dispatch. */ + +struct hsa_kernel_dispatch +{ + /* Pointer to a command queue associated with a kernel dispatch agent. */ + void *queue; + /* Pointer to reserved memory for OMP data struct copying. */ + void *omp_data_memory; + /* Pointer to a memory space used for kernel arguments passing. */ + void *kernarg_address; + /* Kernel object. */ + uint64_t object; + /* Synchronization signal used for dispatch synchronization. */ + uint64_t signal; + /* Private segment size. */ + uint32_t private_segment_size; + /* Group segment size. */ + uint32_t group_segment_size; + /* Number of children kernel dispatches. */ + uint64_t kernel_dispatch_count; + /* Number of threads. */ + uint32_t omp_num_threads; + /* Debug purpose argument. */ + uint64_t debug; + /* Kernel dispatch structures created for children kernel dispatches. */ + struct hsa_kernel_dispatch **children_dispatches; +}; + #endif diff --git a/libgomp/hsa-traits.h b/libgomp/hsa-traits.h deleted file mode 100644 index 6fb7e48..0000000 --- a/libgomp/hsa-traits.h +++ /dev/null @@ -1,54 +0,0 @@ -/* HSA traits. - Copyright (C) 2015 Free Software Foundation, Inc. - -This file is part of GCC. - -GCC is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3, or (at your option) -any later version. - -GCC is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GCC; see the file COPYING3. If not see -. */ - -//////////////////////////////////////////////////////////////////////////////// - -#ifndef HSA_TRAITS_H_ -#define HSA_TRAITS_H_ - -/* HSA kernel dispatch is collection of informations needed for - a kernel dispatch. */ - -struct hsa_kernel_dispatch -{ - /* Pointer to a command queue associated with a kernel dispatch agent. */ - void *queue; - /* Pointer to reserved memory for OMP data struct copying. */ - void *omp_data_memory; - /* Pointer to a memory space used for kernel arguments passing. */ - void *kernarg_address; - /* Kernel object. */ - uint64_t object; - /* Synchronization signal used for dispatch synchronization. */ - uint64_t signal; - /* Private segment size. */ - uint32_t private_segment_size; - /* Group segment size. */ - uint32_t group_segment_size; - /* Number of children kernel dispatches. */ - uint64_t kernel_dispatch_count; - /* Number of threads. */ - uint32_t omp_num_threads; - /* Debug purpose argument. */ - uint64_t debug; - /* Kernel dispatch structures created for children kernel dispatches. */ - struct hsa_kernel_dispatch **children_dispatches; -}; - -#endif // HSA_TRAITS_H_ diff --git a/libgomp/plugin/plugin-hsa.c b/libgomp/plugin/plugin-hsa.c index 45dfe9b..ea3e5eb 100644 --- a/libgomp/plugin/plugin-hsa.c +++ b/libgomp/plugin/plugin-hsa.c @@ -5,7 +5,6 @@ #include "libgomp-plugin.h" #include "gomp-constants.h" #include "hsa.h" -#include "hsa-traits.h" #include "hsa_ext_finalize.h" #include "dlfcn.h" -- 2.6.2 --------------000600040005080307020609--