How to use pointcloud_write(...) and pointcloud_search(...) ? (Open Shading Language)
I was quite intrigued by these functions and tried to following the code examples in the OSL language specification but without success. On digging into the Cycles code, however, it becomes clear why this was not working :

int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 &amp;center,
                                         float radius, int max_points, bool sort,
                                         size_t *out_indices, float *out_distances, int derivs_offset)
{
    return 0;
}

int OSLRenderServices::pointcloud_get(OSL::ShaderGlobals *sg, ustring filename, size_t *indices, int count,
                                      ustring attr_name, TypeDesc attr_type, void *out_data)
{
    return 0;
}

bool OSLRenderServices::pointcloud_write(OSL::ShaderGlobals *sg,
                                         ustring filename, const OSL::Vec3 &amp;pos,
                                         int nattribs, const ustring *names,
                                         const TypeDesc *types,
                                         const void **data)
{
    return false;
}


The functions merely return 0 or false and perform no action. Therefore, it appears that this functionality has not yet been implemented in the current version of Cycles.

The source can be found in the Blender GIT Cycles repository at https://git.blender.org/gitweb/gitweb.cgi/cycles.git/blob/HEAD:/src/kernel/osl/osl_services.cpp