Files
rocm-systems/samples/1_Utils/hipCommander/testcase.cpp
T

19 řádky
373 B
C++
Surový Normální zobrazení Historie

2016-11-26 08:55:51 -06:00
#include <hip/hip_runtime.h>
2018-03-12 11:29:03 +05:30
static const int BLOCKSIZEX = 32;
static const int BLOCKSIZEY = 16;
2016-11-26 08:55:51 -06:00
__global__ void fails(float* pErrorI) {
2018-03-12 11:29:03 +05:30
if (pErrorI != 0) {
pErrorI[0] = 1;
2016-11-26 08:55:51 -06:00
}
}
2018-03-12 11:29:03 +05:30
int main() {
dim3 blocks(1, 1);
dim3 threads(BLOCKSIZEX, BLOCKSIZEY);
2016-11-26 08:55:51 -06:00
float error;
hipLaunchKernelGGL(HIP_KERNEL_NAME(fails), blocks, threads, 0, 0, &error);
2016-11-26 08:55:51 -06:00
}