Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

SVM Trouble

$
0
0

Hello, everyone!

I've some problem with Shared Virtual Memory and its buffers.

I've got structure like this:

typedef struct ListOfPtr ListOfPtr;
struct ListOfPtr
{
	cl_int		some_value;
	ListOfPtr	*first;
	ListOfPtr	*last;
	ListOfPtr	*next;
	ListOfPtr	*prev;
};

I declared a pointer of ListOfPtr type.

ListOfPtr *list = (ListOfPtr *)calloc(1, sizeof(ListOfPtr));

Then I get platform IDs, device IDs, creating a context and command queue...

Now I try to declare a pointer of SVM buffer:

ListOfPtr *list = (ListOfPtr *)clSVMAlloc(my_context, CL_MEM_READ_WRITE, sizeof(ListOfPtr) * 6, 0);

But something is going wromg and I've got error: Unable exception at 0x00000000 in MyCLProject.exe: 0xC0000005: Access Violation in the performance at 0x00000000.

Is there any solution of this problem?

P.S.: According to this my device has SVM support.

Thanks

Zone: 

Thread Topic: 

Question

Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>