gpgpu - how to assign a "const void*" to a "const uint64_t*" in cuda c? -
i want assign "const void*" "const uint64_t*" in cuda c.
i have done this,
void func(const void *buffer) { const uint64_t *words = buffer; }
but i'm getting error this,
error: value of type "const void *" cannot used initialize entity of type "const uint64_t *"
can me in solving problem?
as @sharptooth indicated, fixed me:
#include <stdio.h> #include <stdint.h> void func(const void *buffer) { const uint64_t *words = (const uint64_t *) buffer; } int main(){ void *my_buf=0; func(my_buf); return 0; }