Add missing __hip_pinned_shadow__ attributes to the texture global vars. (#1866)

[ROCm/hip commit: 56b8b0d80e]
This commit is contained in:
vsytch
2020-02-14 23:22:25 -05:00
zatwierdzone przez GitHub
rodzic e72b5a0187
commit cf57b45f3c
4 zmienionych plików z 24 dodań i 0 usunięć
@@ -27,6 +27,10 @@ THE SOFTWARE.
#define SIZE_H 8
#define SIZE_W 12
#define TYPE_t float
#if __HIP__
__hip_pinned_shadow__
#endif
texture<TYPE_t, 2, hipReadModeElementType> tex;
// texture object is a kernel argument
@@ -45,6 +45,9 @@ static float getNormalizedValue(const float value,
}
}
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, hipTextureType1D, hipReadModeElementType> textureNormalizedVal_1D;
__global__ void normalizedValTextureTest(unsigned int numElements, float* pDst)
@@ -26,9 +26,15 @@ THE SOFTWARE.
* HIT_END
*/
#include "test_common.h"
typedef float T;
// Texture reference for 2D Layered texture
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, hipTextureType2DLayered> tex2DL;
__global__ void simpleKernelLayeredArray(T* outputData,int width,int height,int layer)
{
unsigned int x = blockIdx.x*blockDim.x + threadIdx.x;
@@ -31,8 +31,19 @@ THE SOFTWARE.
const char *sampleName = "simpleTexture3D";
// Texture reference for 3D texture
#if __HIP__
__hip_pinned_shadow__
#endif
texture<float, hipTextureType3D, hipReadModeElementType> texf;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<int, hipTextureType3D, hipReadModeElementType> texi;
#if __HIP__
__hip_pinned_shadow__
#endif
texture<char, hipTextureType3D, hipReadModeElementType> texc;
template <typename T>