[petsc-dev] [PATCH 2 of 3] cuda: add __attribute((unused)) since the backend seems to support it
Jed Brown
jedbrown at mcs.anl.gov
Mon Aug 27 10:42:36 CDT 2012
Tested on baconost (Linux with CUDA 4.1). Looks good to push.
On Sun, Aug 26, 2012 at 6:14 PM, Sean Farley <sean at mcs.anl.gov> wrote:
> # HG changeset patch
> # User Sean Farley <sean at mcs.anl.gov>
> # Date 1346005847 18000
> # Node ID 63d07634522344a4f6078db68a6e31e1ea6d5d59
> # Parent 56899038c8e3e8ee070c93767a77632405801842
> cuda: add __attribute((unused)) since the backend seems to support it
>
> diff --git a/config/PETSc/Configure.py b/config/PETSc/Configure.py
> --- a/config/PETSc/Configure.py
> +++ b/config/PETSc/Configure.py
> @@ -560,11 +560,11 @@
> if self.checkCompile('#define _POSIX_C_SOURCE 200112L\n#include
> <stdlib.h>','long v = atoll("25")') or self.checkCompile ('#include
> <stdlib.h>','long v = atoll("25")'):
> self.addDefine('HAVE_ATOLL', '1')
>
> def configureUnused(self):
> '''Sees if __attribute((unused)) is supported'''
> - if self.framework.argDB['with-ios'] or
> self.framework.argDB['with-cuda']:
> + if self.framework.argDB['with-ios']:
> self.addDefine('UNUSED', ' ')
> return
> self.pushLanguage(self.languages.clanguage)
> if self.checkLink('__attribute((unused)) static int myfunc(void){
> return 1;}', 'int i = myfunc();\ntypedef void*
> atype;\n__attribute((unused)) atype a;\n'):
> self.addDefine('UNUSED', '__attribute((unused))')
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120827/660dccc8/attachment.html>
More information about the petsc-dev
mailing list