SWDEV-286322 - clean up trailing space - part2 (#2383)

Change-Id: Id659c029a33874bc9a7d4c42bffd06cdc1845e2e
이 커밋은 다음에 포함됨:
Julia Jiang
2021-11-25 04:38:06 -05:00
커밋한 사람 GitHub
부모 d22fa0012e
커밋 48b91908bc
7개의 변경된 파일16개의 추가작업 그리고 16개의 파일을 삭제
+3 -3
파일 보기
@@ -33,7 +33,7 @@ THE SOFTWARE.
#include <stdio.h>
#define MAX_GPUS 8
/*
/*
* Square each element in the array A and write to array C.
*/
#define NUM_KERNEL_ARGS 3
@@ -73,7 +73,7 @@ int main(int argc, char *argv[])
// Fill with Phi + i
for (size_t i = 0; i < N; i++)
{
A_h[i] = 1.618f + i;
A_h[i] = 1.618f + i;
}
const unsigned blocks = 512;
@@ -136,6 +136,6 @@ int main(int argc, char *argv[])
}
}
}
printf ("PASSED!\n");
}
+1 -1
파일 보기
@@ -68,7 +68,7 @@ int runTest() {
HIPCHECK(hipMalloc(&texBuf, N * sizeof(float)));
HIPCHECK(hipMalloc(&devBuf, N * sizeof(float)));
HIPCHECK(hipMemcpy(texBuf, val, N * sizeof(float), hipMemcpyHostToDevice));
tex.addressMode[0] = hipAddressModeClamp;
tex.addressMode[1] = hipAddressModeClamp;
tex.filterMode = hipFilterModePoint;
+4 -4
파일 보기
@@ -1,16 +1,16 @@
/*
Copyright (c) 2019 - 2021 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -181,7 +181,7 @@ int main(int argc, char** argv)
#ifdef __HIP_PLATFORM_AMD__
std::cout << "Arch - AMD GPU :: " << props.gcnArch << std::endl;
#endif
if(textureFilterMode == 0) {
printf("Test hipFilterModePoint\n");
status = runTest<hipFilterModePoint>();
+2 -2
파일 보기
@@ -61,7 +61,7 @@ int runTest(hipTextureAddressMode addressMode, hipTextureFilterMode filterMode)
// Allocating the required buffer on gpu device
float *texBuf, *texBufOut;
float val[N], output[N];
for (int i = 0; i < N; i++) {
val[i] = i+1;
output[i] = 0.0;
@@ -85,7 +85,7 @@ int runTest(hipTextureAddressMode addressMode, hipTextureFilterMode filterMode)
texDesc.addressMode[0] = addressMode;
texDesc.addressMode[1] = addressMode;
texDesc.filterMode = filterMode;
texDesc.filterMode = filterMode;
texDesc.normalizedCoords = false;
// Creating texture object
+2 -2
파일 보기
@@ -49,12 +49,12 @@ void texture2Dtest()
for(size_t i=1; i <= (SIZE_H*SIZE_W); i++){
A[i-1] = i;
}
size_t devPitchA;
HIPCHECK(hipMallocPitch((void**)&devPtrA, &devPitchA ,SIZE_W*sizeof(TYPE_t), SIZE_H)) ;
HIPCHECK(hipMemcpy2D(devPtrA, devPitchA, A, SIZE_W*sizeof(TYPE_t),
SIZE_W*sizeof(TYPE_t), SIZE_H, hipMemcpyHostToDevice));
// Use the texture object
hipResourceDesc texRes;
memset(&texRes, 0, sizeof(texRes));
+2 -2
파일 보기
@@ -82,7 +82,7 @@ void runTest(int width,int height,int num_layers,texture<T, hipTextureType2DLaye
dim3 dimGrid(width / dimBlock.x, height / dimBlock.y, 1);
for (unsigned int layer = 0; layer < num_layers; layer++)
hipLaunchKernelGGL(simpleKernelLayeredArray, dimGrid, dimBlock, 0, 0, dData, width, height, layer);
HIPCHECK(hipDeviceSynchronize());
// Allocate mem for the result on host side
T *hOutputData = (T*) malloc(size);
@@ -90,7 +90,7 @@ void runTest(int width,int height,int num_layers,texture<T, hipTextureType2DLaye
// copy result from device to host
HIPCHECK(hipMemcpy(hOutputData, dData, size, hipMemcpyDeviceToHost));
HipTest::checkArray(hData,hOutputData,width,height,num_layers);
HipTest::checkArray(hData,hOutputData,width,height,num_layers);
hipFree(dData);
hipFreeArray(arr);
+2 -2
파일 보기
@@ -38,7 +38,7 @@ texture<int, hipTextureType3D, hipReadModeElementType> texi;
texture<char, hipTextureType3D, hipReadModeElementType> texc;
template <typename T>
__global__ void simpleKernel3DArray(T* outputData,
__global__ void simpleKernel3DArray(T* outputData,
int width,
int height,int depth)
{
@@ -114,7 +114,7 @@ void runTest(int width,int height,int depth,texture<T, hipTextureType3D, hipRead
// copy result from device to host
HIPCHECK(hipMemcpy(hOutputData, dData, size, hipMemcpyDeviceToHost));
HipTest::checkArray(hData,hOutputData,width,height,depth);
HipTest::checkArray(hData,hOutputData,width,height,depth);
hipFree(dData);
hipFreeArray(arr);