AnsweredAssumed Answered

question about non_block writing

Question asked by shingoxlf on May 26, 2012
Latest reply on May 26, 2012 by nou

Hi, I was trying to text the non_blocking writing in function clEnqueueWriteBuffer. However the time I got is the same for CL_TRUE and CL_FALSE.

I thought CL_FALSE is for non_block writing, and should return immediately. The mem_init_time I got is about 9 seconds in my test for both CL_TRUE and CL_FALSE. Can someone tell me how to do the non_block writing? Thanks!

 

 

  t_start = rtclock();

  errcode |= clEnqueueWriteBuffer(clCommandQue, cl_k_matrix, CL_TRUE, 0, sizeof(double)*n_node1*n_node1, temp, 0, NULL, NULL);

  errcode |= clEnqueueWriteBuffer(clCommandQue, cl_vertex, CL_TRUE, 0, sizeof(double)*n_node1*n_node2, temp1, 0, NULL, NULL);

  errcode |= clEnqueueWriteBuffer(clCommandQue, cl_edge, CL_TRUE, 0, sizeof(double)*n_edge1*n_edge2, temp2, 0, NULL, NULL);

 

          if(errcode != CL_SUCCESS){printf("Error in initializing buffers %d\n",errcode); exit(-1);}

  t_end = rtclock();

          mem_init_time=t_end-t_start;

Outcomes