Clean up module api samples

[ROCm/hip-tests commit: dbf1737658]
This commit is contained in:
Rahul Garg
2018-08-08 22:28:13 +05:30
parent db08c81d2c
commit e80e6d9f68
3 changed files with 10 additions and 67 deletions
@@ -21,13 +21,13 @@ THE SOFTWARE.
*/
#include "hip/hip_runtime.h"
#include "hip/hip_runtime_api.h"
//#include "hip/hip_runtime_api.h"
#include <iostream>
#include <fstream>
#include <vector>
#include <hip/hip_hcc.h>
//#include <hip/hip_hcc.h>
#define fileName "tex2dKernel.code.adipose"
#define fileName "tex2dKernel.code"
texture<float, 2, hipReadModeElementType> tex;
bool testResult = false;
@@ -87,34 +87,15 @@ bool runTest(int argc, char** argv) {
float* dData = NULL;
hipMalloc((void**)&dData, size);
#ifdef __HIP_PLATFORM_HCC__
struct {
void* _Ad;
unsigned int _Bd;
unsigned int _Cd;
} args;
args._Ad = dData;
args._Ad = (void*) dData;
args._Bd = width;
args._Cd = height;
#endif
#ifdef __HIP_PLATFORM_NVCC__
struct {
uint32_t _hidden[1];
void* _Ad;
unsigned int _Bd;
unsigned int _Cd;
} args;
args._hidden[0] = 0;
args._Ad = dData;
args._Bd = width;
args._Cd = height;
#endif
size_t sizeTemp = sizeof(args);
void* config[] = {HIP_LAUNCH_PARAM_BUFFER_POINTER, &args, HIP_LAUNCH_PARAM_BUFFER_SIZE,