-
Notifications
You must be signed in to change notification settings - Fork 3
/
runtime_maintenance.h
130 lines (123 loc) · 2.44 KB
/
runtime_maintenance.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
* Copyright (C) 2024, Inria
* GRAPHDECO research group, https://team.inria.fr/graphdeco
* All rights reserved.
*
* This software is free for non-commercial, research and evaluation use
* under the terms of the LICENSE.md file.
*
* For inquiries contact george.drettakis@inria.fr
*/
#pragma once
#include <cstdio>
#include <tuple>
#include <string>
class Maintenance
{
public:
static void reorder(
int N,
int* active_nodes,
int* new_active_nodes,
const int* nodes,
const float* boxes,
const float* pos_space,
const float* rot_space,
const float* sh_space,
const float* alpha_space,
const float* scale_space,
int* split_space,
int* new_nodes,
float* new_boxes,
float* new_pos_space,
float* new_rot_space,
float* new_sh_space,
float* new_alpha_space,
float* new_scale_space,
int* new_split_space,
int* cuda2cpu_src,
int* cuda2cpu_dst,
int* node_indices,
int* gaussian_indices,
void* streamy
);
static void compress(
int N,
int* nodes,
float* scales,
float* rots,
float* shs,
float* opacs
);
static void compactPart1(
int topN,
int N,
int* active_nodes,
int* new_active_nodes,
const int* nodes,
const float* boxes,
const float* pos_space,
const float* rot_space,
const float* sh_space,
const float* alpha_space,
const float* scale_space,
int* split_space,
int* new_nodes,
float* new_boxes,
float* new_pos_space,
float* new_rot_space,
float* new_sh_space,
float* new_alpha_space,
float* new_scale_space,
int* new_split_space,
int* cuda2cpu_src,
int* cuda2cpu_dst,
int* NsrcI,
int* NsrcI2,
int* NdstI,
int* NdstI2,
char*& scratchspace,
size_t& scratchspacesize,
void* streamy,
int* count
);
static void compactPart2(
int topN,
int N,
int* active_nodes,
int* new_active_nodes,
const int* nodes,
const float* boxes,
const float* pos_space,
const float* rot_space,
const float* sh_space,
const float* alpha_space,
const float* scale_space,
int* split_space,
int* new_nodes,
float* new_boxes,
float* new_pos_space,
float* new_rot_space,
float* new_sh_space,
float* new_alpha_space,
float* new_scale_space,
int* new_split_space,
int* cuda2cpu_src,
int* cuda2cpu_dst,
int* NsrcI,
int* NsrcI2,
int* NdstI,
int* NdstI2,
char*& scratchspace,
size_t& scratchspacesize,
void* streamy,
int* count
);
static void updateStarts(
int* nodes,
int num_indices,
int* indices,
int* starts,
void* streamy
);
};