From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100062 invoked by alias); 8 Dec 2015 16:22:28 -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 99951 invoked by uid 89); 8 Dec 2015 16:22:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Dec 2015 16:22:25 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1a6L1y-00064S-80 from James_Norris@mentor.com ; Tue, 08 Dec 2015 08:22:22 -0800 Received: from [172.30.80.171] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Tue, 8 Dec 2015 08:22:21 -0800 Message-ID: <566703BC.7030202@codesourcery.com> Date: Tue, 08 Dec 2015 16:22:00 -0000 From: James Norris User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Cesar Philippidis , GCC Patches CC: , Thomas Schwinge Subject: Re: [gomp4] Fix Fortran deviceptr References: <56644BBC.1050602@codesourcery.com> <5665AC01.2020008@codesourcery.com> In-Reply-To: <5665AC01.2020008@codesourcery.com> X-TagToolbar-Keys: D20151208102219996 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-12/txt/msg00892.txt.bz2 Cesar, On 12/07/2015 09:55 AM, Cesar Philippidis wrote: > [snip snip] > Two observations: > > 1. Why is deviceptr so special that gomp_map_vars can't handle it > directly? Recall that the deviceptr clause in Fortran presents as two mappings: FORCE_DEVICEPTR and POINTER. The former has the device address in hostaddr, while the latter has the host address of the pointer in hostaddr. The new code detects a properly formed pair and if found, proceeds to turn the latter into the FORCE_DEVICEPTR map, while the former is effectively discarded by setting hostaddr to NULL. This behavior is specific to OpenACC, so I decided put it where I did. Could it be put into gomp_map_vars? Probably. Would it be messy? Probably. But what may be a better solution would be to use the functionality that handles the use_device_ptr clause in OpenMP4.1 and eliminate FORCE_DEVICEPTR from gomp_map_var. Have to look into that. > > 2. It appears that deviceptr code in GOACC_parallel_keyed is mostly > identical to GOACC_data_start. Can you put that duplicate code into > a function? That would be easier to maintain in the long run. > Fixed. Thanks, Jim