Hi, alls,<div><br><div>I want to use CL_MEM_USE_HOST_PTR to create a buffer object which shares host memory, so the changes to the elements in kernel can be used by host program.</div></div><div><br></div><div>But the result is that, I have changed the element in kernel, but the element in host program has not changed. I don't know why? Does this method still be a copy of host memory, so the change is not done to the host memory, but only device memory?</div><div><br></div><div>Hope for helps!</div><div><br></div><div><b>Device:</b> GIGA Mini PC with core i7 and Iris Pro, integrated GPU</div><div><b>Kernel function:</b></div><div><div> 47 __kernel void PacketsIndexCalculation(</div><div> 48                          const unsigned int     packets_info_size,</div><div> 49                          __global packet_info_t  *packets_info,</div><div> 50                          const unsigned int     flow_table_size )</div><div> 51 {</div><div> 52     int gid = get_global_id(0);</div><div> 53     __global packet_info_t *p = packets_info + gid;</div><div> 54</div><div> 55     //calculate hash value</div><div> 56     <font color="#ff0000">p->index</font> = ( ((p->flow_id).src_ip & 0xff) | (((p->flow_id).dst_ip & 0xff)<<8) |</div><div> 57                  (((p->flow_id).src_port & 0xff)<<16) | (((p->flow_id).dst_port & 0xff)<<24) )%flow_table_size;</div><div> 58    </div><div> 59 }</div></div><div><b>Problem:</b></div><div> In host program, the memory pointed by &(p->index) has not changed by kernel function.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>