b31b23ff1d
- Add hierarchy. Tests now live in directories, each with its own
CMakeFiles.txt. Reduces merge conflicts.
- Change make_hip_executable -> build_hip_executable.
- Refresh docs.
- Enable some tests that were previously built but not run.
Change-Id: I8c5de3c954400bf233904282b8b42861a2b7c536
[ROCm/clr commit: 3feb13c8f6]
16 wiersze
405 B
C++
16 wiersze
405 B
C++
#include"test_common.h"
|
|
|
|
#define SIZE 1024*1024
|
|
|
|
int main(){
|
|
float *A, *Ad;
|
|
HIPCHECK(hipHostMalloc((void**)&A,SIZE, hipHostMallocDefault));
|
|
HIPCHECK(hipMalloc((void**)&Ad, SIZE));
|
|
hipStream_t stream;
|
|
HIPCHECK(hipStreamCreate(&stream));
|
|
for(int i=0;i<SIZE;i++){
|
|
HIPCHECK(hipMemcpyAsync(Ad, A, SIZE, hipMemcpyHostToDevice, stream));
|
|
HIPCHECK(hipDeviceSynchronize());
|
|
}
|
|
}
|