- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Let
float y
I have a buffer declared as CL_MEM_READ_ONLY:
buffery = clCreateBuffer(context, CL_MEM_READ_ONLY| CL_MEM_COPY_HOST_PTR, sizeof(float)*n,y,&err);
I have a kernel declared as follows:
__kernel void work(__global const float* x,__global float* y){
int i = get_global_id(0);
y=x+y;
}
and
clSetKernelArg(workkernel, 1, sizeof(cl_mem), &buffery);
The code executes with no problem, but it shouldn't be, because buffery is declared as read only, am I correct?
Ty
링크가 복사됨
1 응답
