diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-17 11:21:05 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-09-17 11:21:05 +0200 |
commit | 1d578450dc82843bd4b24f3a6aad2c1a82bbda5e (patch) | |
tree | fdb34a5629308fad6ef9c5e3f0a4290bb688c3c4 /modules/remote-hip/c++ | |
parent | b23b2276b1ab7977e4cea721322f9d31f6ef85ca (diff) |
Managed to get hip to compile
Diffstat (limited to 'modules/remote-hip/c++')
-rw-r--r-- | modules/remote-hip/c++/data.hpp | 8 | ||||
-rw-r--r-- | modules/remote-hip/c++/device.tmpl.hpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/remote-hip/c++/data.hpp b/modules/remote-hip/c++/data.hpp index 3e7c3ed..5d3635f 100644 --- a/modules/remote-hip/c++/data.hpp +++ b/modules/remote-hip/c++/data.hpp @@ -8,16 +8,16 @@ namespace saw { * Generic wrapper class which stores data on the sycl side. * Most of the times this will be a root object. */ -template<typename Schema> -class data<Schema, encode::Hip<encode::Native>> { +template<typename Schema,typename T> +class data<Schema, encode::Hip<T>> { private: - data<Schema, encode::Native>* data_; + data<Schema, T>* data_; public: data(): data_{nullptr} {} - data<Schema, encode::Native>** get_device_data() { + data<Schema, T>** get_device_data() { return &data_; } }; diff --git a/modules/remote-hip/c++/device.tmpl.hpp b/modules/remote-hip/c++/device.tmpl.hpp index 6edf431..0517f67 100644 --- a/modules/remote-hip/c++/device.tmpl.hpp +++ b/modules/remote-hip/c++/device.tmpl.hpp @@ -33,7 +33,7 @@ struct hip_copy_to_device<schema::Array<T,Dim>, Encoding> { static error_or<void> apply(data<Schema, Encoding>& from, data<Schema,Encoding>** to){ typename native_data_type<T>::type* dat{}; hipError_t data_malloc_err = hipMalloc(&dat,sizeof(typename native_data_type<T>::type) * from.size()); - hipError_t data_copy_err = hipMemcpy(&dat, &(from.get_raw_data()),sizeof(typename native_data_type<T>::type) * from.size(), hipMemcpyHostToDevice); + hipError_t data_copy_err = hipMemcpy(&dat, (from.get_raw_data()),sizeof(typename native_data_type<T>::type) * from.size(), hipMemcpyHostToDevice); if(from.size() == 0u){ // Everything is fine. We just don't want to allocate data which doesn't exist. |