This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/core/runtime/wtab.cpp
T
2026-10-04 12:02:41 +02:00

23 lines
530 B
C++

/* wtab.cpp -- issuing a weight-table patch. See wtab.h. */
#include "wtab.h"
#include "device/device.h"
namespace rad {
int wtab_patch(const WtabPatch& p, RadStream s) {
if (p.n == 0) return RAD_OK;
if (device_is_host()) {
for (uint32_t i = 0; i < p.n; ++i) *p.dst[i] = p.val[i];
return RAD_OK;
}
#if defined(RAD_HAVE_HIP) && RAD_HAVE_HIP
return rad_wtab_patch_launch(&p, (void*)s) == 0 ? RAD_OK : RAD_E_DEVICE;
#else
(void)s;
return RAD_E_UNSUPPORTED;
#endif
}
} /* namespace rad */