GPU的批处理delaunay三角剖分算法?

问题描述

我有 500 组 2D 点,它们之间没有联系。

现在我想同时对它们进行三角测量。有什么我可以做的吗?

现在我需要将其转换为 numpy,然后使用 scipy.spatial.delaunay() 分别计算每个组。

import scipy.spatial
import torch
points = torch.rand(500,996,2)
corner = torch.tensor([[[0,0],[0,1],[1,1]]],dtype=torch.float32).expand(500,-1,-1)
points = torch.cat([points,corner],dim=1).numpy()
tri = [scipy.spatial.delaunay(p).simplices for p in points]
tri = torch.from_numpy(np.concatenate(tri,axis=0)).view(500,3)

但是太慢了。是否可以在 gpu 上运行并行计算?

我发现一个可能有用,但它似乎不支持批处理。 https://www.comp.nus.edu.sg/~tants/delaunay2DDownload.html

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)