Lift
Library of parallel computing primitives for GPUs and multi-core CPUs
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
lift
decorators.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014-2015, NVIDIA CORPORATION
3
* Copyright (c) 2015, Nuno Subtil <subtil@gmail.com>
4
* Copyright (c) 2015, Roche Molecular Systems, Inc.
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
* * Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* * Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
* * Neither the name of the copyright holders nor the names of its
15
* contributors may be used to endorse or promote products derived from
16
* this software without specific prior written permission.
17
*
18
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE
22
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
*/
29
30
#pragma once
31
32
#if defined(__CUDACC__)
33
#define LIFT_HOST_DEVICE __host__ __device__
34
#define LIFT_HOST __host__
35
#define LIFT_DEVICE __device__
36
#define __lift_hd_warning_disable__ \
37
#pragma hd_warning_disable
38
#else
39
#define LIFT_HOST_DEVICE
40
#define LIFT_HOST
41
#define LIFT_DEVICE
42
#endif
43
44
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ > 0
45
#define LIFT_DEVICE_COMPILATION 1
46
#else
47
#define LIFT_DEVICE_COMPILATION 0
48
#endif
49
50
#define CUDA_HOST_DEVICE LIFT_HOST_DEVICE
51
#define CUDA_HOST LIFT_HOST
52
#define CUDA_DEVICE LIFT_DEVICE
53
#define CUDA_DEVICE_COMPILATION LIFT_DEVICE_COMPILATION
Generated by
1.8.6