Fix: Add explicit includes for assert.h and thread in sample files (#751)
* Fix: Add explicit includes for assert.h and thread in sample/vcopy.cpp The HIP/CLR changee3cb5399cremoved transitive inclusion of standard headers like assert.h from hip_runtime.h. This caused build failures in rocprof-compute samples. This commit explicitly includes <assert.h> and <thread> in vcopy.cpp to resolve potential missing definitions. Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> * Update vsequential_access.cpp Added assert and thread imports Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> * Update vrandom_access.cpp Added assert import Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> * Update vsequential_access.cpp Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> --------- Signed-off-by: jamessiddeley-amd <James.Siddeley@amd.com> [ROCm/rocprofiler-compute commit:667128e3c7]
Tento commit je obsažen v:
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
|
||||
#include "hip/hip_runtime.h"
|
||||
#include <assert.h>
|
||||
#include <thread>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
@@ -30,6 +30,7 @@ An example code to execute random access to explore cache hits/misses in L2 Cach
|
||||
|
||||
|
||||
#include <hip/hip_runtime.h>
|
||||
#include <assert.h>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
@@ -31,6 +31,7 @@ An example code to execute sequential access to explore cache hits/misses in L2
|
||||
|
||||
#include <hip/hip_runtime.h>
|
||||
#include <iostream>
|
||||
#include <assert.h>
|
||||
|
||||
#define HIP_ASSERT(x) (assert((x)==hipSuccess))
|
||||
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele