CoolFace
Apppublic

souging/TRELLIS_TextTo3D

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
hilbert.h36 linesDownload Raw Back to src
1#pragma once2 3/**4 * Hilbert encode 3D points5 *6 * @param x [N] tensor containing the x coordinates7 * @param y [N] tensor containing the y coordinates8 * @param z [N] tensor containing the z coordinates9 *10 * @return [N] tensor containing the z-order encoded values11 */12__global__ void hilbert_encode_cuda(13    size_t N,14    const uint32_t* x,15    const uint32_t* y,16    const uint32_t* z,17    uint32_t* codes18);19 20 21/**22 * Hilbert decode 3D points23 *24 * @param codes [N] tensor containing the z-order encoded values25 * @param x [N] tensor containing the x coordinates26 * @param y [N] tensor containing the y coordinates27 * @param z [N] tensor containing the z coordinates28 */29__global__ void hilbert_decode_cuda(30    size_t N,31    const uint32_t* codes,32    uint32_t* x,33    uint32_t* y,34    uint32_t* z35);36