3 #include <hip/hip_runtime.h> 21 hipCheck(hipMemcpy(in1_d, in1_h,
size *
sizeof(
float), hipMemcpyHostToDevice));
22 hipCheck(hipMemcpy(in2_d, in2_h,
size *
sizeof(
float), hipMemcpyHostToDevice));
31 hipCheck(hipMemcpy(out_h, out_d,
size *
sizeof(
float), hipMemcpyDeviceToHost));
52 hipCheck(hipMemcpy(in1_d, in1_h,
size *
sizeof(
double), hipMemcpyHostToDevice));
53 hipCheck(hipMemcpy(in2_d, in2_h,
size *
sizeof(
double), hipMemcpyHostToDevice));
62 hipCheck(hipMemcpy(out_h, out_d,
size *
sizeof(
double), hipMemcpyDeviceToHost));
void opqaue_add_vectors_f(const float *in1, const float *in2, float *out, size_t size)
void wrapper_add_vectors_f(const float *__restrict__ in1, const float *__restrict__ in2, float *__restrict__ out, size_t size)
void opqaue_add_vectors_d(const double *in1, const double *in2, double *out, size_t size)
#define hipCheck(ARG,...)
void wrapper_add_vectors_d(const double *__restrict__ in1, const double *__restrict__ in2, double *__restrict__ out, size_t size)