oneDNN
oneDNN copied to clipboard
Memory type conversion to c++ array
Hello people, The function eltwise_forward takes memory type as a destination for operations. How could i convert that result ( destination content ) to a C++ array ?
You can use get_data_handle() to get the pointer to the allocated destination memory, and get the data from the memory in specific data type. For example, you can access the ith floating data in destination memory (dst) using (float *)dst.get_data_handle())[i].
Feel free to reopen this issue or submit a new one if you have any other questions.