Initial commit

This commit is contained in:
Carl Pearson
2024-12-03 14:15:37 -08:00
commit cf83db731c
13 changed files with 381 additions and 0 deletions

24
malloc_hostaccess.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include <iostream>
#include <hip/hip_runtime.h>
#define HIP(e) \
if (hipError_t err = (e); err != hipSuccess) { \
std::cerr << __FILE__ << ":" << __LINE__ << " " << err << "\n"; \
exit(1); \
}
int main(void) {
size_t n = 1024 * 1024;
double *p;
p = (double*)malloc(sizeof(double) * n);
for (size_t i = 0; i < n; ++i) {
p[i] = i;
}
return 0;
}