Song Yunpeng
Song Yunpeng
Hi, I am trying to develop a self defined plugin for meshlab. So i downloaded the source code and build from source following the instructions. Finally, after the ALL_BUILD is...
Thanks for your excellent work. We have used your programm to reconstruct our model. But the reconstructed model is always about 0.5mm bigger than the origin model. I have tried...
Hi, I am trying to use pymeshlab to repair some mehes. One time , when i using "compute_selection_by_self_intersections_per_face" to select self intersecting faces, pymeshlab failed to select those faces. But...
首先我必须感谢作者的工作,本书教程简明扼要对本人学习cuda算法帮助很大。 我尝试使用listing9.1中的原子函数规约求一个大矩阵的元素和,输入的d_x是unsigned char类型,但实际上数组能保证每个元素都没有小数位。规约时进行了一次类型转换 s_y[tid] = (n < N) ? static_cast(d_x[n]) : 0.0; //这里real是float 这时候发现结果每次运行会不一样,且与cpu逐元素相加的结果有个较小的误差(111654301+-30左右)。后面尝试在cpu将数组转换为real类型再进行规约相加,多次运行结果依然会有偏差。经检查后发现可能是浮点数表示误差的积累,将数组转换为int得到了和cpu计算相同的结果。我这里不太理解为什么cuda会发生这种偏差而cpu中不会,理论上float的浮点数的编码应该是一样的。如果我想要进行float的相加,如何在9.1程序的基础上避免这误差累积。 其次我发现我在.cu的host函数中使用模板定义函数,同时在.cuh中声明,在.cpp中调用时会报错LNK2019和LNK1120,无法解析外部符号和无法解析命令,而我尝试在__global__函数使用模板编译正常。是nvcc编译器的问题吗?这种情况如何实现函数的复用,比如写一个规约函数可以对不同类型的数组规约求和,只能函数重载吗?