├── README.md ├── dataloader_pytorch.py ├── evaluation ├── __pycache__ │ ├── model.cpython-38.pyc │ └── pc_util.cpython-38.pyc ├── cal_metric.py ├── cal_p2f.py ├── eval.py └── p2f │ ├── CMakeCache.txt │ ├── CMakeFiles │ ├── 3.22.1 │ │ ├── CMakeCCompiler.cmake │ │ ├── CMakeCXXCompiler.cmake │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ ├── CMakeSystem.cmake │ │ ├── CompilerIdC │ │ │ ├── CMakeCCompilerId.c │ │ │ └── a.out │ │ └── CompilerIdCXX │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ └── a.out │ ├── CMakeDirectoryInformation.cmake │ ├── CMakeOutput.log │ ├── FindOpenMP │ │ ├── OpenMPCheckVersion.c │ │ ├── OpenMPCheckVersion.cpp │ │ ├── OpenMPTryFlag.c │ │ ├── OpenMPTryFlag.cpp │ │ ├── ompver_C.bin │ │ └── ompver_CXX.bin │ ├── Makefile.cmake │ ├── Makefile2 │ ├── TargetDirectories.txt │ ├── cmake.check_cache │ ├── evaluation.dir │ │ ├── DependInfo.cmake │ │ ├── build.make │ │ ├── cmake_clean.cmake │ │ ├── compiler_depend.internal │ │ ├── compiler_depend.make │ │ ├── compiler_depend.ts │ │ ├── depend.make │ │ ├── evaluation.cpp.o │ │ ├── evaluation.cpp.o.d │ │ ├── flags.make │ │ ├── link.txt │ │ └── progress.make │ └── progress.marks │ ├── CMakeLists.txt │ ├── Makefile │ ├── cmake_install.cmake │ ├── evaluation │ ├── evaluation.cpp │ ├── nicolo.off │ └── nicolo.xyz ├── loss.py ├── main.py ├── model.py ├── pc_util.py └── prepare_data ├── mesh2ply.py └── ply2patch.py /README.md: -------------------------------------------------------------------------------- 1 | # PUGeoNet_pytorch 2 | [Tensorflow version](https://github.com/ninaqy/PUGeo) 3 | ## Data Preparation 4 | download raw mesh data from https://drive.google.com/drive/folders/1n2lf4am9k3hy3ci4W20XiMkXwJKwyg8f?usp=sharing. \ 5 | run [prepare_data/mesh2ply.py](prepare_data/mesh2ply.py) and [prepare_data/ply2patch.py](prepare_data/ply2patch.py) to prepare the training and testing data. 6 | 7 | ## Training 8 | run [main.py](main.py) to training model with different upsample ratios. 9 | 10 | ## Testing 11 | ### Upsampling point cloud 12 | run [evaluation/eval.py](evaluation/eval.py) 13 | ### Evaluation metric 14 | 15 | First you need to comple the [P2F evaluation](https://github.com/yulequan/PU-Net). 16 | ``` 17 | cd evaluation/p2f 18 | cmake . 19 | make 20 | ``` 21 | Then run [evaluation/cal_p2f.py](evaluation/cal_p2f.py) and [evaluation/cal_metric.py](evaluation/cal_metric.py) to compute the metric(CD, HD, P2F). 22 | -------------------------------------------------------------------------------- /dataloader_pytorch.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import os 3 | import torch 4 | import torch.utils.data as data 5 | import open3d as o3d 6 | 7 | class dataset_patch(data.Dataset): 8 | def __init__(self, up_ratio, data_path,jitter=False,jitter_sigma=0.03,jitter_max=0.05,mode='train',scale=True): 9 | super(dataset_patch,self).__init__() 10 | assert up_ratio in [4,8,12,16], 'upratio should be one of [4, 8, 12, 16]' 11 | self.jitter=jitter 12 | self.jitter_sigma = jitter_sigma 13 | self.jitter_max = jitter_max 14 | self.scale=scale 15 | basic_root=os.path.join(data_path,'basic') 16 | label_root=os.path.join(data_path,'%d'%up_ratio) 17 | name_list=os.listdir(basic_root) 18 | self.mode=mode 19 | self.basic_set=[] 20 | self.label_set=[] 21 | for name in name_list: 22 | self.basic_set.append(np.load(os.path.join(basic_root,name))) 23 | self.label_set.append(np.load(os.path.join(label_root,name))) 24 | 25 | self.basic_set=np.concatenate(self.basic_set,axis=0) 26 | self.label_set=np.concatenate(self.label_set,axis=0) 27 | #print(self.label_set.shape) 28 | def __len__(self): 29 | return self.basic_set.shape[0] 30 | 31 | def rotate_point_cloud_and_gt(self,input,sparse_normal,label,label_normal): 32 | angles=np.random.uniform(0,1,(3,))*np.pi*2 33 | Rx = np.array([[1, 0, 0], 34 | [0, np.cos(angles[0]), -np.sin(angles[0])], 35 | [0, np.sin(angles[0]), np.cos(angles[0])]]) 36 | Ry = np.array([[np.cos(angles[1]), 0, np.sin(angles[1])], 37 | [0, 1, 0], 38 | [-np.sin(angles[1]), 0, np.cos(angles[1])]]) 39 | Rz = np.array([[np.cos(angles[2]), -np.sin(angles[2]), 0], 40 | [np.sin(angles[2]), np.cos(angles[2]), 0], 41 | [0, 0, 1]]) 42 | R = np.dot(Rz, np.dot(Ry, Rx)) 43 | input=np.dot(input,R) 44 | label=np.dot(label,R) 45 | sparse_normal = np.dot(sparse_normal, R) 46 | label_normal= np.dot(label_normal, R) 47 | return input,sparse_normal,label,label_normal 48 | 49 | def random_scale_point_cloud_and_gt(self,input,label,scale_low=0.5,scale_high=2.0): 50 | scale=np.random.uniform(scale_low,scale_high) 51 | input=input*scale 52 | label=label*scale 53 | return input,label,scale 54 | 55 | def jitter_perturbation_point_cloud(self,input,sigma=0.005,clip=0.02): 56 | assert clip>0 57 | jittered_data=np.clip(sigma*np.random.normal(size=input.shape),-1*clip,clip) 58 | #print(input.shape) 59 | #print(jittered_data.shape) 60 | input=input+jittered_data 61 | return input 62 | 63 | 64 | def augment_data(self,input,sparse_normal,label,label_normal): 65 | input,sparse_normal,label,label_normal=self.rotate_point_cloud_and_gt(input,sparse_normal,label,label_normal) 66 | if self.scale==True: 67 | input,label,scale=self.random_scale_point_cloud_and_gt(input,label,scale_low=0.8,scale_high=1.2) 68 | else: 69 | scale=np.array([1]).astype(np.float32).squeeze() 70 | if self.jitter: 71 | input=self.jitter_perturbation_point_cloud(input,sigma=self.jitter_sigma,clip=self.jitter_max) 72 | return input,sparse_normal,label,label_normal,scale 73 | 74 | 75 | def __getitem__(self, item): 76 | # return input sparse patch, gt sparse normal, gt dense patch, gt dense normal 77 | input_sparse_patch,gt_sparse_normal,gt_dense_patch,gt_dense_normal=self.basic_set[item,:,0:3],self.basic_set[item,:,3:],self.label_set[item,:,0:3],self.label_set[item,:,3:] 78 | 79 | if self.mode=='train': 80 | input_sparse_patch, gt_sparse_normal, gt_dense_patch, gt_dense_normal,radius=self.augment_data(input_sparse_patch,gt_sparse_normal,gt_dense_patch,gt_dense_normal) 81 | else: 82 | radius=np.array([1]).astype(np.float32).squeeze() 83 | return torch.from_numpy(input_sparse_patch.astype(np.float32)).transpose(0,1),torch.from_numpy(gt_sparse_normal.astype(np.float32)).transpose(0,1),torch.from_numpy(gt_dense_patch.astype(np.float32)).transpose(0,1),torch.from_numpy(gt_dense_normal.astype(np.float32)).transpose(0,1),torch.from_numpy(np.array(radius).astype(np.float32)) 84 | 85 | if __name__=='__main__': 86 | dataset=dataset_patch(16,'D:\\PUGEO\\pytorch_data',jitter=True) 87 | for i in range(len(dataset)): 88 | data=dataset[i] 89 | 90 | input=data[0] 91 | '''sparse_normal=data[1] 92 | dense_patch=data[2] 93 | dense_normal=data[3] 94 | 95 | data = dataset[1] 96 | 97 | input2 = data[0] 98 | sparse_normal2 = data[1] 99 | dense_patch2 = data[2] 100 | dense_normal2 = data[3]''' 101 | 102 | print(i,' ',input.size()) 103 | #print(dense_patch.size()) 104 | 105 | '''point_cloud1=o3d.geometry.PointCloud() 106 | point_cloud1.points=o3d.utility.Vector3dVector(input) 107 | point_cloud1.paint_uniform_color([0,0,1]) 108 | 109 | point_cloud2 = o3d.geometry.PointCloud() 110 | point_cloud2.points = o3d.utility.Vector3dVector(dense_patch) 111 | point_cloud2.paint_uniform_color([0, 1, 1]) 112 | 113 | o3d.visualization.draw_geometries([point_cloud1,point_cloud2])''' 114 | -------------------------------------------------------------------------------- /evaluation/__pycache__/model.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/__pycache__/model.cpython-38.pyc -------------------------------------------------------------------------------- /evaluation/__pycache__/pc_util.cpython-38.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/__pycache__/pc_util.cpython-38.pyc -------------------------------------------------------------------------------- /evaluation/cal_metric.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import open3d as o3d 3 | import os 4 | import argparse 5 | from scipy.stats import entropy 6 | import warnings 7 | from sklearn.neighbors import NearestNeighbors 8 | from numpy.linalg import norm 9 | import xlsxwriter 10 | import pymesh 11 | 12 | 13 | def normalize_point_cloud(input): 14 | """ 15 | input: pc [N, P, 3] 16 | output: pc, centroid, furthest_distance 17 | """ 18 | if len(input.shape) == 2: 19 | axis = 0 20 | elif len(input.shape) == 3: 21 | axis = 1 22 | centroid = np.mean(input, axis=axis, keepdims=True) 23 | input = input - centroid 24 | furthest_distance = np.amax( 25 | np.sqrt(np.sum(input ** 2, axis=-1, keepdims=True)), axis=axis, keepdims=True) 26 | input = input / furthest_distance 27 | return input, centroid, furthest_distance 28 | 29 | 30 | def cal_cd_hd(result,gt): 31 | #N=result.shape[0] 32 | dist=np.sqrt(np.sum((np.expand_dims(result,0)-np.expand_dims(gt,1))**2,axis=-1)) 33 | dist1=np.min(dist,axis=0,keepdims=False) 34 | dist2=np.min(dist,axis=1,keepdims=False) 35 | cd=np.mean(dist1)+np.mean(dist2) 36 | hd=0.5*(np.amax(dist1,axis=0)+np.amax(dist2,axis=0)) 37 | return cd,hd 38 | 39 | def cal_cd_hd2(result,gt): 40 | #N=result.shape[0] 41 | pc_result=o3d.geometry.PointCloud() 42 | pc_gt=o3d.geometry.PointCloud() 43 | pc_result.points=o3d.utility.Vector3dVector(result) 44 | pc_gt.points=o3d.utility.Vector3dVector(gt) 45 | 46 | tree_gt=o3d.geometry.KDTreeFlann(pc_gt) 47 | dist1=[] 48 | for i in range(result.shape[0]): 49 | [k,idx,dist]=tree_gt.search_knn_vector_3d(result[i],1) 50 | dist1.append(np.sqrt(np.array(dist))) 51 | 52 | dist1=np.array(dist1) 53 | 54 | tree_result = o3d.geometry.KDTreeFlann(pc_result) 55 | dist2 = [] 56 | for i in range(gt.shape[0]): 57 | [k, idx, dist] = tree_result.search_knn_vector_3d(gt[i], 1) 58 | dist2.append(np.sqrt(np.array(dist))) 59 | 60 | dist2 = np.array(dist2) 61 | 62 | '''assert False 63 | dist=np.sqrt(np.sum((np.expand_dims(result,0)-np.expand_dims(gt,1))**2,axis=-1)) 64 | dist1=np.min(dist,axis=0,keepdims=False) 65 | dist2=np.min(dist,axis=1,keepdims=False)''' 66 | cd=np.mean(dist1)+np.mean(dist2) 67 | hd=0.5*(np.amax(dist1,axis=0)+np.amax(dist2,axis=0)) 68 | return cd,hd 69 | 70 | def unit_cube_grid_point_cloud(resolution, clip_sphere=False): 71 | '''Returns the center coordinates of each cell of a 3D grid with resolution^3 cells, 72 | that is placed in the unit-cube. 73 | If clip_sphere it True it drops the "corner" cells that lie outside the unit-sphere. 74 | ''' 75 | grid = np.ndarray((resolution, resolution, resolution, 3), np.float32) 76 | spacing = 1.0 / float(resolution - 1) 77 | for i in range(resolution): 78 | for j in range(resolution): 79 | for k in range(resolution): 80 | grid[i, j, k, 0] = i * spacing - 0.5 81 | grid[i, j, k, 1] = j * spacing - 0.5 82 | grid[i, j, k, 2] = k * spacing - 0.5 83 | 84 | if clip_sphere: 85 | grid = grid.reshape(-1, 3) 86 | grid = grid[norm(grid, axis=1) <= 0.5] 87 | 88 | return grid, spacing 89 | 90 | 91 | def entropy_of_occupancy_grid(pclouds, grid_resolution, in_sphere=True): 92 | '''Given a collection of point-clouds, estimate the entropy of the random variables 93 | corresponding to occupancy-grid activation patterns. 94 | Inputs: 95 | pclouds: (numpy array) #point-clouds x points per point-cloud x 3 96 | grid_resolution (int) size of occupancy grid that will be used. 97 | ''' 98 | epsilon = 10e-4 99 | bound = 0.5 + epsilon 100 | if abs(np.max(pclouds)) > bound or abs(np.min(pclouds)) > bound: 101 | warnings.warn('Point-clouds are not in unit cube.') 102 | 103 | if in_sphere and np.max(np.sqrt(np.sum(pclouds ** 2, axis=2))) > bound: 104 | warnings.warn('Point-clouds are not in unit sphere.') 105 | 106 | grid_coordinates, _ = unit_cube_grid_point_cloud(grid_resolution, in_sphere) 107 | grid_coordinates = grid_coordinates.reshape(-1, 3) 108 | grid_counters = np.zeros(len(grid_coordinates)) 109 | grid_bernoulli_rvars = np.zeros(len(grid_coordinates)) 110 | nn = NearestNeighbors(n_neighbors=1).fit(grid_coordinates) 111 | 112 | for pc in pclouds: 113 | _, indices = nn.kneighbors(pc) 114 | indices = np.squeeze(indices) 115 | for i in indices: 116 | grid_counters[i] += 1 117 | indices = np.unique(indices) 118 | for i in indices: 119 | grid_bernoulli_rvars[i] += 1 120 | 121 | acc_entropy = 0.0 122 | n = float(len(pclouds)) 123 | for g in grid_bernoulli_rvars: 124 | p = 0.0 125 | if g > 0: 126 | p = float(g) / n 127 | acc_entropy += entropy([p, 1.0 - p]) 128 | 129 | return acc_entropy / len(grid_counters), grid_counters 130 | 131 | def iterate_in_chunks(l, n): 132 | '''Yield successive 'n'-sized chunks from iterable 'l'. 133 | Note: last chunk will be smaller than l if n doesn't divide l perfectly. 134 | ''' 135 | for i in range(0, len(l), n): 136 | yield l[i:i + n] 137 | 138 | def _jsdiv(P, Q): 139 | '''another way of computing JSD''' 140 | def _kldiv(A, B): 141 | a = A.copy() 142 | b = B.copy() 143 | idx = np.logical_and(a > 0, b > 0) 144 | a = a[idx] 145 | b = b[idx] 146 | return np.sum([v for v in a * np.log2(a / b)]) 147 | 148 | P_ = P / np.sum(P) 149 | Q_ = Q / np.sum(Q) 150 | 151 | M = 0.5 * (P_ + Q_) 152 | 153 | return 0.5 * (_kldiv(P_, M) + _kldiv(Q_, M)) 154 | 155 | def jensen_shannon_divergence(P, Q): 156 | if np.any(P < 0) or np.any(Q < 0): 157 | raise ValueError('Negative values.') 158 | if len(P) != len(Q): 159 | raise ValueError('Non equal size.') 160 | 161 | P_ = P / np.sum(P) # Ensure probabilities. 162 | Q_ = Q / np.sum(Q) 163 | 164 | e1 = entropy(P_, base=2) 165 | e2 = entropy(Q_, base=2) 166 | e_sum = entropy((P_ + Q_) / 2.0, base=2) 167 | res = e_sum - ((e1 + e2) / 2.0) 168 | 169 | res2 = _jsdiv(P_, Q_) 170 | 171 | if not np.allclose(res, res2, atol=10e-5, rtol=0): 172 | warnings.warn('Numerical values of two JSD methods don\'t agree.') 173 | 174 | return res 175 | 176 | def jsd_between_point_cloud_sets(sample_pcs, ref_pcs, resolution=28): 177 | '''Computes the JSD between two sets of point-clouds, as introduced in the paper ```Learning Representations And Generative Models For 3D Point Clouds```. 178 | Args: 179 | sample_pcs: (np.ndarray S1xR2x3) S1 point-clouds, each of R1 points. 180 | ref_pcs: (np.ndarray S2xR2x3) S2 point-clouds, each of R2 points. 181 | resolution: (int) grid-resolution. Affects granularity of measurements. 182 | ''' 183 | in_unit_sphere = True 184 | sample_grid_var = entropy_of_occupancy_grid(sample_pcs, resolution, in_unit_sphere)[1] 185 | ref_grid_var = entropy_of_occupancy_grid(ref_pcs, resolution, in_unit_sphere)[1] 186 | return jensen_shannon_divergence(sample_grid_var, ref_grid_var) 187 | 188 | 189 | if __name__=='__main__': 190 | 191 | parser = argparse.ArgumentParser() 192 | parser.add_argument('--data_path', type=str, default='/home/siyuren_21/pytorch_data/', help='data path') 193 | parser.add_argument('--up_ratio', type=int, choices=[4,8,12,16],default=4, help='data path') 194 | parser.add_argument('--num_shape_point',choices=[5000], type=int, default=5000, help='data path') 195 | 196 | arg = parser.parse_args() 197 | 198 | result_path=os.path.join(os.path.dirname(__file__),'..','PUGEOx%d/'%arg.up_ratio) 199 | gt_path=os.path.join(arg.data_path,'test_%d'%int(arg.up_ratio*arg.num_shape_point)) 200 | #'/home/siyu_ren/pugeo_pytorch_data/test_20000/' 201 | 202 | name_list=os.listdir(gt_path) 203 | 204 | wb = xlsxwriter.Workbook('./result_%d.xls'%arg.up_ratio) 205 | 206 | workbook=wb.add_worksheet('result') 207 | 208 | ratio_raw_dict={'4':1,'8':2,'12':3,'16':4} 209 | 210 | cd_result=[] 211 | hd_result=[] 212 | p2f_result=[] 213 | jsd_result=[] 214 | for name in name_list: 215 | result=np.loadtxt(os.path.join(result_path,name))[:,0:3] 216 | gt=np.loadtxt(os.path.join(gt_path,name))[:,0:3] 217 | cd,hd=cal_cd_hd2(result,gt) 218 | cd_result.append(cd) 219 | hd_result.append(hd) 220 | 221 | jsd=jsd_between_point_cloud_sets(np.expand_dims(result,0), np.expand_dims(gt,0)) 222 | 223 | #p2f=np.loadtxt(os.path.join(result_path,name[:-4]+'_point2mesh_distance.xyz'))[:,-1] 224 | p2f,_,_=pymesh.distance_to_mesh(pymesh.meshio.load_mesh(os.path.join(arg.data_path,'test_mesh',name[:-4]+'.off'),drop_zero_dim=False),result,engine='auto') 225 | p2f=np.sqrt(p2f).squeeze() 226 | 227 | p2f_result.append(p2f) 228 | jsd_result.append(jsd) 229 | print(name,' cd:',cd,' hd:',hd, ' jsd:',jsd, ' p2f:',np.mean(p2f),'+-',np.std(p2f)) 230 | cd_result=np.array(cd_result) 231 | hd_result=np.array(hd_result) 232 | p2f_result=np.concatenate(p2f_result,axis=0) 233 | jsd_result=np.array(jsd_result) 234 | 235 | workbook.write(0,1,'cd(1e-2)') 236 | workbook.write(0,2,'hd(1e-2)') 237 | workbook.write(0,3,'jsd(1e-2)') 238 | workbook.write(0,4,'p2f avg(1e-3)') 239 | workbook.write(0,5,'p2f std(1e-3)') 240 | 241 | workbook.write(ratio_raw_dict['%d'%arg.up_ratio],0,'x%d'%arg.up_ratio) 242 | workbook.write(ratio_raw_dict['%d'%arg.up_ratio],1,'%0.3f'%(np.mean(cd_result)*1e2)) 243 | workbook.write(ratio_raw_dict['%d'%arg.up_ratio],2,'%0.3f'%(np.mean(hd_result)*1e2)) 244 | workbook.write(ratio_raw_dict['%d'%arg.up_ratio],3,'%0.3f'%(np.mean(jsd_result)*1e2)) 245 | workbook.write(ratio_raw_dict['%d'%arg.up_ratio],4,'%0.3f'%(np.nanmean(p2f_result)*1e3)) 246 | workbook.write(ratio_raw_dict['%d'%arg.up_ratio],5,'%0.3f'%(np.nanstd(p2f_result)*1e3)) 247 | 248 | 249 | wb.close() 250 | print('cd',round(np.mean(cd_result),7)) 251 | print('hd',round(np.mean(hd_result),7)) 252 | print('jsd',round(np.mean(jsd_result),7)) 253 | print('p2f avg',round(np.nanmean(p2f_result),7)) 254 | print('p2f std',round(np.nanstd(p2f_result),7)) 255 | -------------------------------------------------------------------------------- /evaluation/cal_p2f.py: -------------------------------------------------------------------------------- 1 | import os 2 | import argparse 3 | 4 | 5 | if __name__=='__main__': 6 | 7 | parser = argparse.ArgumentParser() 8 | parser.add_argument('--up_ratio', type=int, default=4, help='Upsampling Ratio') 9 | parser.add_argument('--off_path', type=str, default='/home/siyu_ren/pugeo_pytorch_data/test_mesh/', help='mesh file path') 10 | 11 | arg = parser.parse_args() 12 | 13 | xyz_file_path=os.path.join(os.path.dirname(__file__),'..','PUGEOx%d/'%arg.up_ratio) 14 | off_file_path=arg.off_path 15 | 16 | 17 | os.system('cd %s'%xyz_file_path) 18 | 19 | off_list=os.listdir(off_file_path) 20 | 21 | for shape in off_list: 22 | os.system('%s %s %s'%(os.path.join(os.path.dirname(__file__),'p2f/evaluation'),os.path.join(off_file_path,shape),os.path.join(xyz_file_path,shape[:-4]+'.xyz'))) 23 | 24 | 25 | -------------------------------------------------------------------------------- /evaluation/eval.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | sys.path.append(os.path.dirname(__file__)) 4 | sys.path.append(os.path.join(os.path.dirname(__file__),'..')) 5 | import torch 6 | import numpy as np 7 | import argparse 8 | import model 9 | 10 | from glob import glob 11 | from pc_util import normalize_point_cloud, farthest_point_sample, group_points 12 | 13 | def eval_patches(xyz, arg, model): 14 | centroids = farthest_point_sample(xyz, arg.num_patch) 15 | 16 | 17 | patches = group_points(xyz, centroids, arg.num_point) 18 | 19 | 20 | normalized_patches, patch_centroid, furthest_distance = normalize_point_cloud(patches) 21 | 22 | dense_patches_list = [] 23 | dense_normal_list = [] 24 | sparse_normal_list = [] 25 | 26 | #print(normalized_patches.shape) 27 | 28 | for i in range(normalized_patches.shape[0]): 29 | xyz=torch.from_numpy(normalized_patches[i]).unsqueeze(0).transpose(1, 2).cuda() 30 | #print(torch.from_numpy(normalized_patches[i]).size()) 31 | dense_patches, dense_normal, sparse_normal = model(xyz, 1) 32 | dense_patches_list.append(dense_patches.transpose(1, 2).detach().cpu().numpy()) 33 | dense_normal_list.append(dense_normal.transpose(1, 2).detach().cpu().numpy()) 34 | sparse_normal_list.append(sparse_normal.transpose(1, 2).detach().cpu().numpy()) 35 | 36 | gen_ddense_xyz = np.concatenate(dense_patches_list, axis=0) 37 | gen_ddense_xyz = (gen_ddense_xyz * furthest_distance) + patch_centroid 38 | gen_ddense_normal = np.concatenate(dense_normal_list, axis=0) 39 | 40 | return np.reshape(gen_ddense_xyz, (-1, 3)), np.reshape(gen_ddense_normal, (-1, 3)) 41 | 42 | 43 | def evaluate(model, arg): 44 | model.eval() 45 | shapes = glob(arg.eval_xyz + '/*.xyz') 46 | 47 | for i, item in enumerate(shapes): 48 | #print(item) 49 | obj_name = item.split('/')[-1] 50 | data = np.loadtxt(item) 51 | input_sparse_xyz = data[:, 0:3] 52 | input_sparse_normal = data[:, 3:6] 53 | normalize_sparse_xyz, centroid, furthest_distance = normalize_point_cloud(input_sparse_xyz) 54 | dense_xyz, dense_normal = eval_patches(normalize_sparse_xyz, arg,model) 55 | dense_xyz = dense_xyz * furthest_distance + centroid 56 | gen_dense=np.concatenate((dense_xyz,dense_normal),axis=-1) 57 | #print(gen_dense.shape) 58 | #print(arg.eval_save_path) 59 | savepath=os.path.join(arg.eval_save_path,obj_name) 60 | #print(arg.eval_save_path) 61 | #print(savepath) 62 | 63 | #print(gen_dense.shape) 64 | gen_dense=farthest_point_sample(gen_dense,arg.num_shape_point*arg.up_ratio) 65 | #print(gen_dense.shape) 66 | np.savetxt(savepath,gen_dense) 67 | print(obj_name,'is saved') 68 | 69 | if __name__=='__main__': 70 | parser = argparse.ArgumentParser() 71 | 72 | parser.add_argument('--up_ratio', type=int, default=4,choices=[4,8,12,16], help='Upsampling Ratio') 73 | parser.add_argument('--model', default='model_pugeo', help='Model for upsampling') 74 | parser.add_argument('--num_point', type=int, default=256,choices=[256], help='Point Number') 75 | 76 | parser.add_argument('--eval_xyz', default='/home/siyu_ren/pugeo_pytorch_data/test_5000/', help='Folder to store point cloud(xyz format) toevaluate') 77 | parser.add_argument('--num_shape_point', type=int, default=5000, help='Point Number per shape') 78 | parser.add_argument('--patch_num_ratio', type=int, default=3, help='Number of points covered by patch') 79 | arg = parser.parse_args() 80 | arg.log_dir=os.path.join(os.path.dirname(__file__),'..','log_x%d'%arg.up_ratio) 81 | 82 | arg.num_patch = int(arg.num_shape_point / arg.num_point * arg.patch_num_ratio) 83 | arg.eval_save_path=os.path.join(os.path.dirname(__file__),'..','PUGEOx%d'%arg.up_ratio) 84 | try: 85 | os.mkdir(arg.eval_save_path) 86 | except: 87 | pass 88 | model = model.pugeonet(up_ratio=arg.up_ratio, knn=30) 89 | model = model.cuda() 90 | 91 | model.load_state_dict(torch.load(os.path.join(arg.log_dir,'model.t7'))) 92 | evaluate(model, arg) 93 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeCache.txt: -------------------------------------------------------------------------------- 1 | # This is the CMakeCache file. 2 | # For build in directory: /home/siyu_ren/pugeo_pytorch/evaluation/p2f 3 | # It was generated by CMake: /home/siyu_ren/anaconda3/envs/mink/bin/cmake 4 | # You can edit this file to change values found and used by cmake. 5 | # If you do not want to change any of the values, simply exit the editor. 6 | # If you do want to change a value, simply edit, save, and exit the editor. 7 | # The syntax for the file is as follows: 8 | # KEY:TYPE=VALUE 9 | # KEY is the name of a variable in the cache. 10 | # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. 11 | # VALUE is the current value for the KEY. 12 | 13 | ######################## 14 | # EXTERNAL cache entries 15 | ######################## 16 | 17 | //Activate the debug messages of the script FindBoost 18 | Boost_DEBUG:BOOL=OFF 19 | 20 | //Link with static Boost libraries 21 | CGAL_Boost_USE_STATIC_LIBS:BOOL=OFF 22 | 23 | //The directory containing a CMake configuration file for CGAL. 24 | CGAL_DIR:PATH=/usr/lib/x86_64-linux-gnu/cmake/CGAL 25 | 26 | //Set this to TRUE if you want to define or modify any of CMAKE_*_FLAGS. 27 | // When this is FALSE, all the CMAKE_*_FLAGS flags are overriden 28 | // with the values used when building the CGAL libs. For CGAL_*_flags 29 | // (used for ADDITIONAL flags) , there is no need to set this to 30 | // TRUE. 31 | CGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=TRUE 32 | 33 | //Path to a program. 34 | CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line 35 | 36 | //Path to a program. 37 | CMAKE_AR:FILEPATH=/usr/bin/ar 38 | 39 | //Build type: Release, Debug, RelWithDebInfo or MinSizeRel 40 | CMAKE_BUILD_TYPE:STRING=Release 41 | 42 | //Enable/Disable color output during build. 43 | CMAKE_COLOR_MAKEFILE:BOOL=ON 44 | 45 | //CXX compiler 46 | CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ 47 | 48 | //A wrapper around 'ar' adding the appropriate '--plugin' option 49 | // for the GCC compiler 50 | CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-6 51 | 52 | //A wrapper around 'ranlib' adding the appropriate '--plugin' option 53 | // for the GCC compiler 54 | CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-6 55 | 56 | //C++ compiler flags for all build types 57 | CMAKE_CXX_FLAGS:STRING=-g -O2 -fdebug-prefix-map=/build/cgal-ZyilPF/cgal-4.11=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -frounding-math 58 | 59 | //Flags used by the CXX compiler during DEBUG builds. 60 | CMAKE_CXX_FLAGS_DEBUG:STRING=-g 61 | 62 | //Flags used by the CXX compiler during MINSIZEREL builds. 63 | CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 64 | 65 | //C++ compiler flags for RELEASE 66 | CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 67 | 68 | //Flags used by the CXX compiler during RELWITHDEBINFO builds. 69 | CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 70 | 71 | //C compiler 72 | CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc 73 | 74 | //A wrapper around 'ar' adding the appropriate '--plugin' option 75 | // for the GCC compiler 76 | CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-7 77 | 78 | //A wrapper around 'ranlib' adding the appropriate '--plugin' option 79 | // for the GCC compiler 80 | CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-7 81 | 82 | //Flags used by the C compiler during all build types. 83 | CMAKE_C_FLAGS:STRING= 84 | 85 | //Flags used by the C compiler during DEBUG builds. 86 | CMAKE_C_FLAGS_DEBUG:STRING=-g 87 | 88 | //Flags used by the C compiler during MINSIZEREL builds. 89 | CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG 90 | 91 | //Flags used by the C compiler during RELEASE builds. 92 | CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG 93 | 94 | //Flags used by the C compiler during RELWITHDEBINFO builds. 95 | CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG 96 | 97 | //Path to a program. 98 | CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND 99 | 100 | //Linker flags for all build types 101 | CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed 102 | 103 | //Flags used by the linker during DEBUG builds. 104 | CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= 105 | 106 | //Flags used by the linker during MINSIZEREL builds. 107 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= 108 | 109 | //Linker flags for RELEASE 110 | CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= 111 | 112 | //Flags used by the linker during RELWITHDEBINFO builds. 113 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 114 | 115 | //Enable/Disable output of compile commands during generation. 116 | CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= 117 | 118 | //Install path prefix, prepended onto install directories. 119 | CMAKE_INSTALL_PREFIX:PATH=/usr/local 120 | 121 | //Path to a program. 122 | CMAKE_LINKER:FILEPATH=/usr/bin/ld 123 | 124 | //Path to a program. 125 | CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make 126 | 127 | //Flags used by the linker during the creation of modules during 128 | // all build types. 129 | CMAKE_MODULE_LINKER_FLAGS:STRING= 130 | 131 | //Flags used by the linker during the creation of modules during 132 | // DEBUG builds. 133 | CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= 134 | 135 | //Flags used by the linker during the creation of modules during 136 | // MINSIZEREL builds. 137 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= 138 | 139 | //Flags used by the linker during the creation of modules during 140 | // RELEASE builds. 141 | CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= 142 | 143 | //Flags used by the linker during the creation of modules during 144 | // RELWITHDEBINFO builds. 145 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= 146 | 147 | //Path to a program. 148 | CMAKE_NM:FILEPATH=/usr/bin/nm 149 | 150 | //Path to a program. 151 | CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy 152 | 153 | //Path to a program. 154 | CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump 155 | 156 | //Value Computed by CMake 157 | CMAKE_PROJECT_DESCRIPTION:STATIC= 158 | 159 | //Value Computed by CMake 160 | CMAKE_PROJECT_HOMEPAGE_URL:STATIC= 161 | 162 | //Value Computed by CMake 163 | CMAKE_PROJECT_NAME:STATIC=Distance_2_Tests 164 | 165 | //Path to a program. 166 | CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib 167 | 168 | //Path to a program. 169 | CMAKE_READELF:FILEPATH=/usr/bin/readelf 170 | 171 | //Flags used by the linker during the creation of shared libraries 172 | // during all build types. 173 | CMAKE_SHARED_LINKER_FLAGS:STRING= 174 | 175 | //Flags used by the linker during the creation of shared libraries 176 | // during DEBUG builds. 177 | CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= 178 | 179 | //Flags used by the linker during the creation of shared libraries 180 | // during MINSIZEREL builds. 181 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= 182 | 183 | //Flags used by the linker during the creation of shared libraries 184 | // during RELEASE builds. 185 | CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= 186 | 187 | //Flags used by the linker during the creation of shared libraries 188 | // during RELWITHDEBINFO builds. 189 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= 190 | 191 | //If set, runtime paths are not added when installing shared libraries, 192 | // but are added when building. 193 | CMAKE_SKIP_INSTALL_RPATH:BOOL=NO 194 | 195 | //If set, runtime paths are not added when using shared libraries. 196 | CMAKE_SKIP_RPATH:BOOL=NO 197 | 198 | //Flags used by the linker during the creation of static libraries 199 | // during all build types. 200 | CMAKE_STATIC_LINKER_FLAGS:STRING= 201 | 202 | //Flags used by the linker during the creation of static libraries 203 | // during DEBUG builds. 204 | CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= 205 | 206 | //Flags used by the linker during the creation of static libraries 207 | // during MINSIZEREL builds. 208 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= 209 | 210 | //Flags used by the linker during the creation of static libraries 211 | // during RELEASE builds. 212 | CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= 213 | 214 | //Flags used by the linker during the creation of static libraries 215 | // during RELWITHDEBINFO builds. 216 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= 217 | 218 | //Path to a program. 219 | CMAKE_STRIP:FILEPATH=/usr/bin/strip 220 | 221 | //If this value is on, makefiles will be generated without the 222 | // .SILENT directive, and all commands will be echoed to the console 223 | // during the make. This is useful for debugging only. With Visual 224 | // Studio IDE projects all commands are done without /nologo. 225 | CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE 226 | 227 | //Value Computed by CMake 228 | Distance_2_Tests_BINARY_DIR:STATIC=/home/siyu_ren/pugeo_pytorch/evaluation/p2f 229 | 230 | //Value Computed by CMake 231 | Distance_2_Tests_IS_TOP_LEVEL:STATIC=ON 232 | 233 | //Value Computed by CMake 234 | Distance_2_Tests_SOURCE_DIR:STATIC=/home/siyu_ren/pugeo_pytorch/evaluation/p2f 235 | 236 | //CXX compiler flags for OpenMP parallelization 237 | OpenMP_CXX_FLAGS:STRING=-fopenmp 238 | 239 | //CXX compiler libraries for OpenMP parallelization 240 | OpenMP_CXX_LIB_NAMES:STRING=gomp;pthread 241 | 242 | //C compiler flags for OpenMP parallelization 243 | OpenMP_C_FLAGS:STRING=-fopenmp 244 | 245 | //C compiler libraries for OpenMP parallelization 246 | OpenMP_C_LIB_NAMES:STRING=gomp;pthread 247 | 248 | //Path to the gomp library for OpenMP 249 | OpenMP_gomp_LIBRARY:FILEPATH=/usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so 250 | 251 | //Path to the pthread library for OpenMP 252 | OpenMP_pthread_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpthread.so 253 | 254 | 255 | ######################## 256 | # INTERNAL cache entries 257 | ######################## 258 | 259 | //ADVANCED property for variable: Boost_DEBUG 260 | Boost_DEBUG-ADVANCED:INTERNAL=1 261 | //ADVANCED property for variable: CGAL_Boost_USE_STATIC_LIBS 262 | CGAL_Boost_USE_STATIC_LIBS-ADVANCED:INTERNAL=1 263 | CGAL_EXECUTABLE_TARGETS:INTERNAL=evaluation;evaluation 264 | //Directory containing the GraphicsView package 265 | CGAL_GRAPHICSVIEW_PACKAGE_DIR:INTERNAL=/usr//include/CGAL/ 266 | //ADVANCED property for variable: CMAKE_ADDR2LINE 267 | CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 268 | //ADVANCED property for variable: CMAKE_AR 269 | CMAKE_AR-ADVANCED:INTERNAL=1 270 | //This is the directory where this CMakeCache.txt was created 271 | CMAKE_CACHEFILE_DIR:INTERNAL=/home/siyu_ren/pugeo_pytorch/evaluation/p2f 272 | //Major version of cmake used to create the current loaded cache 273 | CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 274 | //Minor version of cmake used to create the current loaded cache 275 | CMAKE_CACHE_MINOR_VERSION:INTERNAL=22 276 | //Patch version of cmake used to create the current loaded cache 277 | CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 278 | //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE 279 | CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 280 | //Path to CMake executable. 281 | CMAKE_COMMAND:INTERNAL=/home/siyu_ren/anaconda3/envs/mink/bin/cmake 282 | //Path to cpack program executable. 283 | CMAKE_CPACK_COMMAND:INTERNAL=/home/siyu_ren/anaconda3/envs/mink/bin/cpack 284 | //Path to ctest program executable. 285 | CMAKE_CTEST_COMMAND:INTERNAL=/home/siyu_ren/anaconda3/envs/mink/bin/ctest 286 | //ADVANCED property for variable: CMAKE_CXX_COMPILER 287 | CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 288 | //ADVANCED property for variable: CMAKE_CXX_COMPILER_AR 289 | CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 290 | //ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB 291 | CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 292 | //ADVANCED property for variable: CMAKE_CXX_FLAGS 293 | CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 294 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG 295 | CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 296 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL 297 | CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 298 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE 299 | CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 300 | //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO 301 | CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 302 | //ADVANCED property for variable: CMAKE_C_COMPILER 303 | CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 304 | //ADVANCED property for variable: CMAKE_C_COMPILER_AR 305 | CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 306 | //ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB 307 | CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 308 | //ADVANCED property for variable: CMAKE_C_FLAGS 309 | CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 310 | //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG 311 | CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 312 | //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL 313 | CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 314 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE 315 | CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 316 | //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO 317 | CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 318 | //ADVANCED property for variable: CMAKE_DLLTOOL 319 | CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 320 | //Path to cache edit program executable. 321 | CMAKE_EDIT_COMMAND:INTERNAL=/home/siyu_ren/anaconda3/envs/mink/bin/ccmake 322 | //Executable file format 323 | CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF 324 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS 325 | CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 326 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG 327 | CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 328 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL 329 | CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 330 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE 331 | CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 332 | //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO 333 | CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 334 | //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS 335 | CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 336 | //Name of external makefile project generator. 337 | CMAKE_EXTRA_GENERATOR:INTERNAL= 338 | //Name of generator. 339 | CMAKE_GENERATOR:INTERNAL=Unix Makefiles 340 | //Generator instance identifier. 341 | CMAKE_GENERATOR_INSTANCE:INTERNAL= 342 | //Name of generator platform. 343 | CMAKE_GENERATOR_PLATFORM:INTERNAL= 344 | //Name of generator toolset. 345 | CMAKE_GENERATOR_TOOLSET:INTERNAL= 346 | //Source directory with the top level CMakeLists.txt file for this 347 | // project 348 | CMAKE_HOME_DIRECTORY:INTERNAL=/home/siyu_ren/pugeo_pytorch/evaluation/p2f 349 | //Install .so files without execute permission. 350 | CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 351 | //ADVANCED property for variable: CMAKE_LINKER 352 | CMAKE_LINKER-ADVANCED:INTERNAL=1 353 | //ADVANCED property for variable: CMAKE_MAKE_PROGRAM 354 | CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 355 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS 356 | CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 357 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG 358 | CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 359 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL 360 | CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 361 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE 362 | CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 363 | //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO 364 | CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 365 | //ADVANCED property for variable: CMAKE_NM 366 | CMAKE_NM-ADVANCED:INTERNAL=1 367 | //number of local generators 368 | CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 369 | //ADVANCED property for variable: CMAKE_OBJCOPY 370 | CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 371 | //ADVANCED property for variable: CMAKE_OBJDUMP 372 | CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 373 | //Platform information initialized 374 | CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 375 | //ADVANCED property for variable: CMAKE_RANLIB 376 | CMAKE_RANLIB-ADVANCED:INTERNAL=1 377 | //ADVANCED property for variable: CMAKE_READELF 378 | CMAKE_READELF-ADVANCED:INTERNAL=1 379 | //Path to CMake installation. 380 | CMAKE_ROOT:INTERNAL=/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22 381 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS 382 | CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 383 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG 384 | CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 385 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL 386 | CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 387 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE 388 | CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 389 | //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO 390 | CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 391 | //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH 392 | CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 393 | //ADVANCED property for variable: CMAKE_SKIP_RPATH 394 | CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 395 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS 396 | CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 397 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG 398 | CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 399 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL 400 | CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 401 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE 402 | CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 403 | //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO 404 | CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 405 | //ADVANCED property for variable: CMAKE_STRIP 406 | CMAKE_STRIP-ADVANCED:INTERNAL=1 407 | //uname command 408 | CMAKE_UNAME:INTERNAL=/bin/uname 409 | //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE 410 | CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 411 | //Details about finding OpenMP 412 | FIND_PACKAGE_MESSAGE_DETAILS_OpenMP:INTERNAL=[TRUE][TRUE][c ][v4.5()] 413 | //Details about finding OpenMP_C 414 | FIND_PACKAGE_MESSAGE_DETAILS_OpenMP_C:INTERNAL=[-fopenmp][/usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so][/usr/lib/x86_64-linux-gnu/libpthread.so][v4.5()] 415 | //Details about finding OpenMP_CXX 416 | FIND_PACKAGE_MESSAGE_DETAILS_OpenMP_CXX:INTERNAL=[-fopenmp][/usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so][/usr/lib/x86_64-linux-gnu/libpthread.so][v4.5()] 417 | //Result of TRY_COMPILE 418 | OpenMP_COMPILE_RESULT_CXX_fopenmp:INTERNAL=TRUE 419 | //Result of TRY_COMPILE 420 | OpenMP_COMPILE_RESULT_C_fopenmp:INTERNAL=TRUE 421 | //ADVANCED property for variable: OpenMP_CXX_FLAGS 422 | OpenMP_CXX_FLAGS-ADVANCED:INTERNAL=1 423 | //ADVANCED property for variable: OpenMP_CXX_LIB_NAMES 424 | OpenMP_CXX_LIB_NAMES-ADVANCED:INTERNAL=1 425 | //CXX compiler's OpenMP specification date 426 | OpenMP_CXX_SPEC_DATE:INTERNAL=201511 427 | //ADVANCED property for variable: OpenMP_C_FLAGS 428 | OpenMP_C_FLAGS-ADVANCED:INTERNAL=1 429 | //ADVANCED property for variable: OpenMP_C_LIB_NAMES 430 | OpenMP_C_LIB_NAMES-ADVANCED:INTERNAL=1 431 | //C compiler's OpenMP specification date 432 | OpenMP_C_SPEC_DATE:INTERNAL=201511 433 | //Result of TRY_COMPILE 434 | OpenMP_SPECTEST_CXX_:INTERNAL=TRUE 435 | //Result of TRY_COMPILE 436 | OpenMP_SPECTEST_C_:INTERNAL=TRUE 437 | //ADVANCED property for variable: OpenMP_gomp_LIBRARY 438 | OpenMP_gomp_LIBRARY-ADVANCED:INTERNAL=1 439 | //ADVANCED property for variable: OpenMP_pthread_LIBRARY 440 | OpenMP_pthread_LIBRARY-ADVANCED:INTERNAL=1 441 | 442 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CMakeCCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "/usr/bin/cc") 2 | set(CMAKE_C_COMPILER_ARG1 "") 3 | set(CMAKE_C_COMPILER_ID "GNU") 4 | set(CMAKE_C_COMPILER_VERSION "7.5.0") 5 | set(CMAKE_C_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_C_COMPILER_WRAPPER "") 7 | set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") 8 | set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") 9 | set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") 10 | set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") 11 | set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") 12 | set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") 13 | set(CMAKE_C17_COMPILE_FEATURES "") 14 | set(CMAKE_C23_COMPILE_FEATURES "") 15 | 16 | set(CMAKE_C_PLATFORM_ID "Linux") 17 | set(CMAKE_C_SIMULATE_ID "") 18 | set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") 19 | set(CMAKE_C_SIMULATE_VERSION "") 20 | 21 | 22 | 23 | 24 | set(CMAKE_AR "/usr/bin/ar") 25 | set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-7") 26 | set(CMAKE_RANLIB "/usr/bin/ranlib") 27 | set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-7") 28 | set(CMAKE_LINKER "/usr/bin/ld") 29 | set(CMAKE_MT "") 30 | set(CMAKE_COMPILER_IS_GNUCC 1) 31 | set(CMAKE_C_COMPILER_LOADED 1) 32 | set(CMAKE_C_COMPILER_WORKS TRUE) 33 | set(CMAKE_C_ABI_COMPILED TRUE) 34 | 35 | set(CMAKE_C_COMPILER_ENV_VAR "CC") 36 | 37 | set(CMAKE_C_COMPILER_ID_RUN 1) 38 | set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) 39 | set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) 40 | set(CMAKE_C_LINKER_PREFERENCE 10) 41 | 42 | # Save compiler ABI information. 43 | set(CMAKE_C_SIZEOF_DATA_PTR "8") 44 | set(CMAKE_C_COMPILER_ABI "ELF") 45 | set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") 46 | set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 47 | 48 | if(CMAKE_C_SIZEOF_DATA_PTR) 49 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") 50 | endif() 51 | 52 | if(CMAKE_C_COMPILER_ABI) 53 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") 54 | endif() 55 | 56 | if(CMAKE_C_LIBRARY_ARCHITECTURE) 57 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 58 | endif() 59 | 60 | set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") 61 | if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) 62 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") 63 | endif() 64 | 65 | 66 | 67 | 68 | 69 | set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7/include;/usr/local/include;/usr/lib/gcc/x86_64-linux-gnu/7/include-fixed;/usr/include/x86_64-linux-gnu;/usr/include") 70 | set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") 71 | set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/7;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 72 | set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 73 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_CXX_COMPILER "/usr/bin/c++") 2 | set(CMAKE_CXX_COMPILER_ARG1 "") 3 | set(CMAKE_CXX_COMPILER_ID "GNU") 4 | set(CMAKE_CXX_COMPILER_VERSION "6.5.0") 5 | set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") 6 | set(CMAKE_CXX_COMPILER_WRAPPER "") 7 | set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14") 8 | set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON") 9 | set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") 10 | set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") 11 | set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") 12 | set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") 13 | set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") 14 | set(CMAKE_CXX20_COMPILE_FEATURES "") 15 | set(CMAKE_CXX23_COMPILE_FEATURES "") 16 | 17 | set(CMAKE_CXX_PLATFORM_ID "Linux") 18 | set(CMAKE_CXX_SIMULATE_ID "") 19 | set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") 20 | set(CMAKE_CXX_SIMULATE_VERSION "") 21 | 22 | 23 | 24 | 25 | set(CMAKE_AR "/usr/bin/ar") 26 | set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-6") 27 | set(CMAKE_RANLIB "/usr/bin/ranlib") 28 | set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-6") 29 | set(CMAKE_LINKER "/usr/bin/ld") 30 | set(CMAKE_MT "") 31 | set(CMAKE_COMPILER_IS_GNUCXX 1) 32 | set(CMAKE_CXX_COMPILER_LOADED 1) 33 | set(CMAKE_CXX_COMPILER_WORKS TRUE) 34 | set(CMAKE_CXX_ABI_COMPILED TRUE) 35 | 36 | set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") 37 | 38 | set(CMAKE_CXX_COMPILER_ID_RUN 1) 39 | set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm) 40 | set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) 41 | 42 | foreach (lang C OBJC OBJCXX) 43 | if (CMAKE_${lang}_COMPILER_ID_RUN) 44 | foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) 45 | list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) 46 | endforeach() 47 | endif() 48 | endforeach() 49 | 50 | set(CMAKE_CXX_LINKER_PREFERENCE 30) 51 | set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) 52 | 53 | # Save compiler ABI information. 54 | set(CMAKE_CXX_SIZEOF_DATA_PTR "8") 55 | set(CMAKE_CXX_COMPILER_ABI "ELF") 56 | set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") 57 | set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 58 | 59 | if(CMAKE_CXX_SIZEOF_DATA_PTR) 60 | set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") 61 | endif() 62 | 63 | if(CMAKE_CXX_COMPILER_ABI) 64 | set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") 65 | endif() 66 | 67 | if(CMAKE_CXX_LIBRARY_ARCHITECTURE) 68 | set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") 69 | endif() 70 | 71 | set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") 72 | if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) 73 | set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") 74 | endif() 75 | 76 | 77 | 78 | 79 | 80 | set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/6;/usr/include/x86_64-linux-gnu/c++/6;/usr/include/c++/6/backward;/usr/lib/gcc/x86_64-linux-gnu/6/include;/usr/local/include;/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed;/usr/include/x86_64-linux-gnu;/usr/include") 81 | set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") 82 | set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/6;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") 83 | set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") 84 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Linux-4.15.0-66-generic") 2 | set(CMAKE_HOST_SYSTEM_NAME "Linux") 3 | set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-66-generic") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Linux-4.15.0-66-generic") 9 | set(CMAKE_SYSTEM_NAME "Linux") 10 | set(CMAKE_SYSTEM_VERSION "4.15.0-66-generic") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CompilerIdC/CMakeCCompilerId.c: -------------------------------------------------------------------------------- 1 | #ifdef __cplusplus 2 | # error "A C++ compiler has been selected for C." 3 | #endif 4 | 5 | #if defined(__18CXX) 6 | # define ID_VOID_MAIN 7 | #endif 8 | #if defined(__CLASSIC_C__) 9 | /* cv-qualifiers did not exist in K&R C */ 10 | # define const 11 | # define volatile 12 | #endif 13 | 14 | #if !defined(__has_include) 15 | /* If the compiler does not have __has_include, pretend the answer is 16 | always no. */ 17 | # define __has_include(x) 0 18 | #endif 19 | 20 | 21 | /* Version number components: V=Version, R=Revision, P=Patch 22 | Version date components: YYYY=Year, MM=Month, DD=Day */ 23 | 24 | #if defined(__INTEL_COMPILER) || defined(__ICC) 25 | # define COMPILER_ID "Intel" 26 | # if defined(_MSC_VER) 27 | # define SIMULATE_ID "MSVC" 28 | # endif 29 | # if defined(__GNUC__) 30 | # define SIMULATE_ID "GNU" 31 | # endif 32 | /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, 33 | except that a few beta releases use the old format with V=2021. */ 34 | # if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 35 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 36 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 37 | # if defined(__INTEL_COMPILER_UPDATE) 38 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 39 | # else 40 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 41 | # endif 42 | # else 43 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) 44 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) 45 | /* The third version component from --version is an update index, 46 | but no macro is provided for it. */ 47 | # define COMPILER_VERSION_PATCH DEC(0) 48 | # endif 49 | # if defined(__INTEL_COMPILER_BUILD_DATE) 50 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 51 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 52 | # endif 53 | # if defined(_MSC_VER) 54 | /* _MSC_VER = VVRR */ 55 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 56 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 57 | # endif 58 | # if defined(__GNUC__) 59 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 60 | # elif defined(__GNUG__) 61 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 62 | # endif 63 | # if defined(__GNUC_MINOR__) 64 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 65 | # endif 66 | # if defined(__GNUC_PATCHLEVEL__) 67 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 68 | # endif 69 | 70 | #elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) 71 | # define COMPILER_ID "IntelLLVM" 72 | #if defined(_MSC_VER) 73 | # define SIMULATE_ID "MSVC" 74 | #endif 75 | #if defined(__GNUC__) 76 | # define SIMULATE_ID "GNU" 77 | #endif 78 | /* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and 79 | * later. Look for 6 digit vs. 8 digit version number to decide encoding. 80 | * VVVV is no smaller than the current year when a version is released. 81 | */ 82 | #if __INTEL_LLVM_COMPILER < 1000000L 83 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) 84 | # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) 85 | # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) 86 | #else 87 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) 88 | # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) 89 | # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) 90 | #endif 91 | #if defined(_MSC_VER) 92 | /* _MSC_VER = VVRR */ 93 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 94 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 95 | #endif 96 | #if defined(__GNUC__) 97 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 98 | #elif defined(__GNUG__) 99 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 100 | #endif 101 | #if defined(__GNUC_MINOR__) 102 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 103 | #endif 104 | #if defined(__GNUC_PATCHLEVEL__) 105 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 106 | #endif 107 | 108 | #elif defined(__PATHCC__) 109 | # define COMPILER_ID "PathScale" 110 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 111 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 112 | # if defined(__PATHCC_PATCHLEVEL__) 113 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 114 | # endif 115 | 116 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 117 | # define COMPILER_ID "Embarcadero" 118 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 119 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 120 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 121 | 122 | #elif defined(__BORLANDC__) 123 | # define COMPILER_ID "Borland" 124 | /* __BORLANDC__ = 0xVRR */ 125 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 126 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 127 | 128 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 129 | # define COMPILER_ID "Watcom" 130 | /* __WATCOMC__ = VVRR */ 131 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 132 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 133 | # if (__WATCOMC__ % 10) > 0 134 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 135 | # endif 136 | 137 | #elif defined(__WATCOMC__) 138 | # define COMPILER_ID "OpenWatcom" 139 | /* __WATCOMC__ = VVRP + 1100 */ 140 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 141 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 142 | # if (__WATCOMC__ % 10) > 0 143 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 144 | # endif 145 | 146 | #elif defined(__SUNPRO_C) 147 | # define COMPILER_ID "SunPro" 148 | # if __SUNPRO_C >= 0x5100 149 | /* __SUNPRO_C = 0xVRRP */ 150 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) 151 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) 152 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 153 | # else 154 | /* __SUNPRO_CC = 0xVRP */ 155 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) 156 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) 157 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) 158 | # endif 159 | 160 | #elif defined(__HP_cc) 161 | # define COMPILER_ID "HP" 162 | /* __HP_cc = VVRRPP */ 163 | # define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) 164 | # define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) 165 | # define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) 166 | 167 | #elif defined(__DECC) 168 | # define COMPILER_ID "Compaq" 169 | /* __DECC_VER = VVRRTPPPP */ 170 | # define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) 171 | # define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) 172 | # define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) 173 | 174 | #elif defined(__IBMC__) && defined(__COMPILER_VER__) 175 | # define COMPILER_ID "zOS" 176 | /* __IBMC__ = VRP */ 177 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 178 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 179 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 180 | 181 | #elif defined(__ibmxl__) && defined(__clang__) 182 | # define COMPILER_ID "XLClang" 183 | # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 184 | # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 185 | # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 186 | # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 187 | 188 | 189 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 190 | # define COMPILER_ID "XL" 191 | /* __IBMC__ = VRP */ 192 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 193 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 194 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 195 | 196 | #elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 197 | # define COMPILER_ID "VisualAge" 198 | /* __IBMC__ = VRP */ 199 | # define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) 200 | # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) 201 | # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) 202 | 203 | #elif defined(__NVCOMPILER) 204 | # define COMPILER_ID "NVHPC" 205 | # define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) 206 | # define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) 207 | # if defined(__NVCOMPILER_PATCHLEVEL__) 208 | # define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) 209 | # endif 210 | 211 | #elif defined(__PGI) 212 | # define COMPILER_ID "PGI" 213 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 214 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 215 | # if defined(__PGIC_PATCHLEVEL__) 216 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 217 | # endif 218 | 219 | #elif defined(_CRAYC) 220 | # define COMPILER_ID "Cray" 221 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 222 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 223 | 224 | #elif defined(__TI_COMPILER_VERSION__) 225 | # define COMPILER_ID "TI" 226 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 227 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 228 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 229 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 230 | 231 | #elif defined(__CLANG_FUJITSU) 232 | # define COMPILER_ID "FujitsuClang" 233 | # define COMPILER_VERSION_MAJOR DEC(__FCC_major__) 234 | # define COMPILER_VERSION_MINOR DEC(__FCC_minor__) 235 | # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) 236 | # define COMPILER_VERSION_INTERNAL_STR __clang_version__ 237 | 238 | 239 | #elif defined(__FUJITSU) 240 | # define COMPILER_ID "Fujitsu" 241 | # if defined(__FCC_version__) 242 | # define COMPILER_VERSION __FCC_version__ 243 | # elif defined(__FCC_major__) 244 | # define COMPILER_VERSION_MAJOR DEC(__FCC_major__) 245 | # define COMPILER_VERSION_MINOR DEC(__FCC_minor__) 246 | # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) 247 | # endif 248 | # if defined(__fcc_version) 249 | # define COMPILER_VERSION_INTERNAL DEC(__fcc_version) 250 | # elif defined(__FCC_VERSION) 251 | # define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) 252 | # endif 253 | 254 | 255 | #elif defined(__ghs__) 256 | # define COMPILER_ID "GHS" 257 | /* __GHS_VERSION_NUMBER = VVVVRP */ 258 | # ifdef __GHS_VERSION_NUMBER 259 | # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 260 | # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 261 | # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 262 | # endif 263 | 264 | #elif defined(__TINYC__) 265 | # define COMPILER_ID "TinyCC" 266 | 267 | #elif defined(__BCC__) 268 | # define COMPILER_ID "Bruce" 269 | 270 | #elif defined(__SCO_VERSION__) 271 | # define COMPILER_ID "SCO" 272 | 273 | #elif defined(__ARMCC_VERSION) && !defined(__clang__) 274 | # define COMPILER_ID "ARMCC" 275 | #if __ARMCC_VERSION >= 1000000 276 | /* __ARMCC_VERSION = VRRPPPP */ 277 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 278 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 279 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 280 | #else 281 | /* __ARMCC_VERSION = VRPPPP */ 282 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 283 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 284 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 285 | #endif 286 | 287 | 288 | #elif defined(__clang__) && defined(__apple_build_version__) 289 | # define COMPILER_ID "AppleClang" 290 | # if defined(_MSC_VER) 291 | # define SIMULATE_ID "MSVC" 292 | # endif 293 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 294 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 295 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 296 | # if defined(_MSC_VER) 297 | /* _MSC_VER = VVRR */ 298 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 299 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 300 | # endif 301 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 302 | 303 | #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) 304 | # define COMPILER_ID "ARMClang" 305 | # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) 306 | # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) 307 | # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) 308 | # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) 309 | 310 | #elif defined(__clang__) 311 | # define COMPILER_ID "Clang" 312 | # if defined(_MSC_VER) 313 | # define SIMULATE_ID "MSVC" 314 | # endif 315 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 316 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 317 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 318 | # if defined(_MSC_VER) 319 | /* _MSC_VER = VVRR */ 320 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 321 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 322 | # endif 323 | 324 | #elif defined(__GNUC__) 325 | # define COMPILER_ID "GNU" 326 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 327 | # if defined(__GNUC_MINOR__) 328 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 329 | # endif 330 | # if defined(__GNUC_PATCHLEVEL__) 331 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 332 | # endif 333 | 334 | #elif defined(_MSC_VER) 335 | # define COMPILER_ID "MSVC" 336 | /* _MSC_VER = VVRR */ 337 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 338 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 339 | # if defined(_MSC_FULL_VER) 340 | # if _MSC_VER >= 1400 341 | /* _MSC_FULL_VER = VVRRPPPPP */ 342 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 343 | # else 344 | /* _MSC_FULL_VER = VVRRPPPP */ 345 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 346 | # endif 347 | # endif 348 | # if defined(_MSC_BUILD) 349 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 350 | # endif 351 | 352 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 353 | # define COMPILER_ID "ADSP" 354 | #if defined(__VISUALDSPVERSION__) 355 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 356 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 357 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 358 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 359 | #endif 360 | 361 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 362 | # define COMPILER_ID "IAR" 363 | # if defined(__VER__) && defined(__ICCARM__) 364 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 365 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 366 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 367 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 368 | # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) 369 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 370 | # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 371 | # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 372 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 373 | # endif 374 | 375 | #elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) 376 | # define COMPILER_ID "SDCC" 377 | # if defined(__SDCC_VERSION_MAJOR) 378 | # define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) 379 | # define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) 380 | # define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) 381 | # else 382 | /* SDCC = VRP */ 383 | # define COMPILER_VERSION_MAJOR DEC(SDCC/100) 384 | # define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) 385 | # define COMPILER_VERSION_PATCH DEC(SDCC % 10) 386 | # endif 387 | 388 | 389 | /* These compilers are either not known or too old to define an 390 | identification macro. Try to identify the platform and guess that 391 | it is the native compiler. */ 392 | #elif defined(__hpux) || defined(__hpua) 393 | # define COMPILER_ID "HP" 394 | 395 | #else /* unknown compiler */ 396 | # define COMPILER_ID "" 397 | #endif 398 | 399 | /* Construct the string literal in pieces to prevent the source from 400 | getting matched. Store it in a pointer rather than an array 401 | because some compilers will just produce instructions to fill the 402 | array rather than assigning a pointer to a static array. */ 403 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 404 | #ifdef SIMULATE_ID 405 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 406 | #endif 407 | 408 | #ifdef __QNXNTO__ 409 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 410 | #endif 411 | 412 | #if defined(__CRAYXT_COMPUTE_LINUX_TARGET) 413 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 414 | #endif 415 | 416 | #define STRINGIFY_HELPER(X) #X 417 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 418 | 419 | /* Identify known platforms by name. */ 420 | #if defined(__linux) || defined(__linux__) || defined(linux) 421 | # define PLATFORM_ID "Linux" 422 | 423 | #elif defined(__MSYS__) 424 | # define PLATFORM_ID "MSYS" 425 | 426 | #elif defined(__CYGWIN__) 427 | # define PLATFORM_ID "Cygwin" 428 | 429 | #elif defined(__MINGW32__) 430 | # define PLATFORM_ID "MinGW" 431 | 432 | #elif defined(__APPLE__) 433 | # define PLATFORM_ID "Darwin" 434 | 435 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 436 | # define PLATFORM_ID "Windows" 437 | 438 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 439 | # define PLATFORM_ID "FreeBSD" 440 | 441 | #elif defined(__NetBSD__) || defined(__NetBSD) 442 | # define PLATFORM_ID "NetBSD" 443 | 444 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 445 | # define PLATFORM_ID "OpenBSD" 446 | 447 | #elif defined(__sun) || defined(sun) 448 | # define PLATFORM_ID "SunOS" 449 | 450 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 451 | # define PLATFORM_ID "AIX" 452 | 453 | #elif defined(__hpux) || defined(__hpux__) 454 | # define PLATFORM_ID "HP-UX" 455 | 456 | #elif defined(__HAIKU__) 457 | # define PLATFORM_ID "Haiku" 458 | 459 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 460 | # define PLATFORM_ID "BeOS" 461 | 462 | #elif defined(__QNX__) || defined(__QNXNTO__) 463 | # define PLATFORM_ID "QNX" 464 | 465 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 466 | # define PLATFORM_ID "Tru64" 467 | 468 | #elif defined(__riscos) || defined(__riscos__) 469 | # define PLATFORM_ID "RISCos" 470 | 471 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 472 | # define PLATFORM_ID "SINIX" 473 | 474 | #elif defined(__UNIX_SV__) 475 | # define PLATFORM_ID "UNIX_SV" 476 | 477 | #elif defined(__bsdos__) 478 | # define PLATFORM_ID "BSDOS" 479 | 480 | #elif defined(_MPRAS) || defined(MPRAS) 481 | # define PLATFORM_ID "MP-RAS" 482 | 483 | #elif defined(__osf) || defined(__osf__) 484 | # define PLATFORM_ID "OSF1" 485 | 486 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 487 | # define PLATFORM_ID "SCO_SV" 488 | 489 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 490 | # define PLATFORM_ID "ULTRIX" 491 | 492 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 493 | # define PLATFORM_ID "Xenix" 494 | 495 | #elif defined(__WATCOMC__) 496 | # if defined(__LINUX__) 497 | # define PLATFORM_ID "Linux" 498 | 499 | # elif defined(__DOS__) 500 | # define PLATFORM_ID "DOS" 501 | 502 | # elif defined(__OS2__) 503 | # define PLATFORM_ID "OS2" 504 | 505 | # elif defined(__WINDOWS__) 506 | # define PLATFORM_ID "Windows3x" 507 | 508 | # elif defined(__VXWORKS__) 509 | # define PLATFORM_ID "VxWorks" 510 | 511 | # else /* unknown platform */ 512 | # define PLATFORM_ID 513 | # endif 514 | 515 | #elif defined(__INTEGRITY) 516 | # if defined(INT_178B) 517 | # define PLATFORM_ID "Integrity178" 518 | 519 | # else /* regular Integrity */ 520 | # define PLATFORM_ID "Integrity" 521 | # endif 522 | 523 | #else /* unknown platform */ 524 | # define PLATFORM_ID 525 | 526 | #endif 527 | 528 | /* For windows compilers MSVC and Intel we can determine 529 | the architecture of the compiler being used. This is because 530 | the compilers do not have flags that can change the architecture, 531 | but rather depend on which compiler is being used 532 | */ 533 | #if defined(_WIN32) && defined(_MSC_VER) 534 | # if defined(_M_IA64) 535 | # define ARCHITECTURE_ID "IA64" 536 | 537 | # elif defined(_M_ARM64EC) 538 | # define ARCHITECTURE_ID "ARM64EC" 539 | 540 | # elif defined(_M_X64) || defined(_M_AMD64) 541 | # define ARCHITECTURE_ID "x64" 542 | 543 | # elif defined(_M_IX86) 544 | # define ARCHITECTURE_ID "X86" 545 | 546 | # elif defined(_M_ARM64) 547 | # define ARCHITECTURE_ID "ARM64" 548 | 549 | # elif defined(_M_ARM) 550 | # if _M_ARM == 4 551 | # define ARCHITECTURE_ID "ARMV4I" 552 | # elif _M_ARM == 5 553 | # define ARCHITECTURE_ID "ARMV5I" 554 | # else 555 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 556 | # endif 557 | 558 | # elif defined(_M_MIPS) 559 | # define ARCHITECTURE_ID "MIPS" 560 | 561 | # elif defined(_M_SH) 562 | # define ARCHITECTURE_ID "SHx" 563 | 564 | # else /* unknown architecture */ 565 | # define ARCHITECTURE_ID "" 566 | # endif 567 | 568 | #elif defined(__WATCOMC__) 569 | # if defined(_M_I86) 570 | # define ARCHITECTURE_ID "I86" 571 | 572 | # elif defined(_M_IX86) 573 | # define ARCHITECTURE_ID "X86" 574 | 575 | # else /* unknown architecture */ 576 | # define ARCHITECTURE_ID "" 577 | # endif 578 | 579 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 580 | # if defined(__ICCARM__) 581 | # define ARCHITECTURE_ID "ARM" 582 | 583 | # elif defined(__ICCRX__) 584 | # define ARCHITECTURE_ID "RX" 585 | 586 | # elif defined(__ICCRH850__) 587 | # define ARCHITECTURE_ID "RH850" 588 | 589 | # elif defined(__ICCRL78__) 590 | # define ARCHITECTURE_ID "RL78" 591 | 592 | # elif defined(__ICCRISCV__) 593 | # define ARCHITECTURE_ID "RISCV" 594 | 595 | # elif defined(__ICCAVR__) 596 | # define ARCHITECTURE_ID "AVR" 597 | 598 | # elif defined(__ICC430__) 599 | # define ARCHITECTURE_ID "MSP430" 600 | 601 | # elif defined(__ICCV850__) 602 | # define ARCHITECTURE_ID "V850" 603 | 604 | # elif defined(__ICC8051__) 605 | # define ARCHITECTURE_ID "8051" 606 | 607 | # elif defined(__ICCSTM8__) 608 | # define ARCHITECTURE_ID "STM8" 609 | 610 | # else /* unknown architecture */ 611 | # define ARCHITECTURE_ID "" 612 | # endif 613 | 614 | #elif defined(__ghs__) 615 | # if defined(__PPC64__) 616 | # define ARCHITECTURE_ID "PPC64" 617 | 618 | # elif defined(__ppc__) 619 | # define ARCHITECTURE_ID "PPC" 620 | 621 | # elif defined(__ARM__) 622 | # define ARCHITECTURE_ID "ARM" 623 | 624 | # elif defined(__x86_64__) 625 | # define ARCHITECTURE_ID "x64" 626 | 627 | # elif defined(__i386__) 628 | # define ARCHITECTURE_ID "X86" 629 | 630 | # else /* unknown architecture */ 631 | # define ARCHITECTURE_ID "" 632 | # endif 633 | 634 | #elif defined(__TI_COMPILER_VERSION__) 635 | # if defined(__TI_ARM__) 636 | # define ARCHITECTURE_ID "ARM" 637 | 638 | # elif defined(__MSP430__) 639 | # define ARCHITECTURE_ID "MSP430" 640 | 641 | # elif defined(__TMS320C28XX__) 642 | # define ARCHITECTURE_ID "TMS320C28x" 643 | 644 | # elif defined(__TMS320C6X__) || defined(_TMS320C6X) 645 | # define ARCHITECTURE_ID "TMS320C6x" 646 | 647 | # else /* unknown architecture */ 648 | # define ARCHITECTURE_ID "" 649 | # endif 650 | 651 | #else 652 | # define ARCHITECTURE_ID 653 | #endif 654 | 655 | /* Convert integer to decimal digit literals. */ 656 | #define DEC(n) \ 657 | ('0' + (((n) / 10000000)%10)), \ 658 | ('0' + (((n) / 1000000)%10)), \ 659 | ('0' + (((n) / 100000)%10)), \ 660 | ('0' + (((n) / 10000)%10)), \ 661 | ('0' + (((n) / 1000)%10)), \ 662 | ('0' + (((n) / 100)%10)), \ 663 | ('0' + (((n) / 10)%10)), \ 664 | ('0' + ((n) % 10)) 665 | 666 | /* Convert integer to hex digit literals. */ 667 | #define HEX(n) \ 668 | ('0' + ((n)>>28 & 0xF)), \ 669 | ('0' + ((n)>>24 & 0xF)), \ 670 | ('0' + ((n)>>20 & 0xF)), \ 671 | ('0' + ((n)>>16 & 0xF)), \ 672 | ('0' + ((n)>>12 & 0xF)), \ 673 | ('0' + ((n)>>8 & 0xF)), \ 674 | ('0' + ((n)>>4 & 0xF)), \ 675 | ('0' + ((n) & 0xF)) 676 | 677 | /* Construct a string literal encoding the version number. */ 678 | #ifdef COMPILER_VERSION 679 | char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; 680 | 681 | /* Construct a string literal encoding the version number components. */ 682 | #elif defined(COMPILER_VERSION_MAJOR) 683 | char const info_version[] = { 684 | 'I', 'N', 'F', 'O', ':', 685 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 686 | COMPILER_VERSION_MAJOR, 687 | # ifdef COMPILER_VERSION_MINOR 688 | '.', COMPILER_VERSION_MINOR, 689 | # ifdef COMPILER_VERSION_PATCH 690 | '.', COMPILER_VERSION_PATCH, 691 | # ifdef COMPILER_VERSION_TWEAK 692 | '.', COMPILER_VERSION_TWEAK, 693 | # endif 694 | # endif 695 | # endif 696 | ']','\0'}; 697 | #endif 698 | 699 | /* Construct a string literal encoding the internal version number. */ 700 | #ifdef COMPILER_VERSION_INTERNAL 701 | char const info_version_internal[] = { 702 | 'I', 'N', 'F', 'O', ':', 703 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', 704 | 'i','n','t','e','r','n','a','l','[', 705 | COMPILER_VERSION_INTERNAL,']','\0'}; 706 | #elif defined(COMPILER_VERSION_INTERNAL_STR) 707 | char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; 708 | #endif 709 | 710 | /* Construct a string literal encoding the version number components. */ 711 | #ifdef SIMULATE_VERSION_MAJOR 712 | char const info_simulate_version[] = { 713 | 'I', 'N', 'F', 'O', ':', 714 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 715 | SIMULATE_VERSION_MAJOR, 716 | # ifdef SIMULATE_VERSION_MINOR 717 | '.', SIMULATE_VERSION_MINOR, 718 | # ifdef SIMULATE_VERSION_PATCH 719 | '.', SIMULATE_VERSION_PATCH, 720 | # ifdef SIMULATE_VERSION_TWEAK 721 | '.', SIMULATE_VERSION_TWEAK, 722 | # endif 723 | # endif 724 | # endif 725 | ']','\0'}; 726 | #endif 727 | 728 | /* Construct the string literal in pieces to prevent the source from 729 | getting matched. Store it in a pointer rather than an array 730 | because some compilers will just produce instructions to fill the 731 | array rather than assigning a pointer to a static array. */ 732 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 733 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 734 | 735 | 736 | 737 | #if !defined(__STDC__) && !defined(__clang__) 738 | # if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) 739 | # define C_VERSION "90" 740 | # else 741 | # define C_VERSION 742 | # endif 743 | #elif __STDC_VERSION__ > 201710L 744 | # define C_VERSION "23" 745 | #elif __STDC_VERSION__ >= 201710L 746 | # define C_VERSION "17" 747 | #elif __STDC_VERSION__ >= 201000L 748 | # define C_VERSION "11" 749 | #elif __STDC_VERSION__ >= 199901L 750 | # define C_VERSION "99" 751 | #else 752 | # define C_VERSION "90" 753 | #endif 754 | const char* info_language_standard_default = 755 | "INFO" ":" "standard_default[" C_VERSION "]"; 756 | 757 | const char* info_language_extensions_default = "INFO" ":" "extensions_default[" 758 | /* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ 759 | #if (defined(__clang__) || defined(__GNUC__) || \ 760 | defined(__TI_COMPILER_VERSION__)) && \ 761 | !defined(__STRICT_ANSI__) && !defined(_MSC_VER) 762 | "ON" 763 | #else 764 | "OFF" 765 | #endif 766 | "]"; 767 | 768 | /*--------------------------------------------------------------------------*/ 769 | 770 | #ifdef ID_VOID_MAIN 771 | void main() {} 772 | #else 773 | # if defined(__CLASSIC_C__) 774 | int main(argc, argv) int argc; char *argv[]; 775 | # else 776 | int main(int argc, char* argv[]) 777 | # endif 778 | { 779 | int require = 0; 780 | require += info_compiler[argc]; 781 | require += info_platform[argc]; 782 | require += info_arch[argc]; 783 | #ifdef COMPILER_VERSION_MAJOR 784 | require += info_version[argc]; 785 | #endif 786 | #ifdef COMPILER_VERSION_INTERNAL 787 | require += info_version_internal[argc]; 788 | #endif 789 | #ifdef SIMULATE_ID 790 | require += info_simulate[argc]; 791 | #endif 792 | #ifdef SIMULATE_VERSION_MAJOR 793 | require += info_simulate_version[argc]; 794 | #endif 795 | #if defined(__CRAYXT_COMPUTE_LINUX_TARGET) 796 | require += info_cray[argc]; 797 | #endif 798 | require += info_language_standard_default[argc]; 799 | require += info_language_extensions_default[argc]; 800 | (void)argv; 801 | return require; 802 | } 803 | #endif 804 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/3.22.1/CompilerIdC/a.out -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp: -------------------------------------------------------------------------------- 1 | /* This source file must have a .cpp extension so that all C++ compilers 2 | recognize the extension without flags. Borland does not know .cxx for 3 | example. */ 4 | #ifndef __cplusplus 5 | # error "A C compiler has been selected for C++." 6 | #endif 7 | 8 | #if !defined(__has_include) 9 | /* If the compiler does not have __has_include, pretend the answer is 10 | always no. */ 11 | # define __has_include(x) 0 12 | #endif 13 | 14 | 15 | /* Version number components: V=Version, R=Revision, P=Patch 16 | Version date components: YYYY=Year, MM=Month, DD=Day */ 17 | 18 | #if defined(__COMO__) 19 | # define COMPILER_ID "Comeau" 20 | /* __COMO_VERSION__ = VRR */ 21 | # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) 22 | # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) 23 | 24 | #elif defined(__INTEL_COMPILER) || defined(__ICC) 25 | # define COMPILER_ID "Intel" 26 | # if defined(_MSC_VER) 27 | # define SIMULATE_ID "MSVC" 28 | # endif 29 | # if defined(__GNUC__) 30 | # define SIMULATE_ID "GNU" 31 | # endif 32 | /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, 33 | except that a few beta releases use the old format with V=2021. */ 34 | # if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 35 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) 36 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) 37 | # if defined(__INTEL_COMPILER_UPDATE) 38 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) 39 | # else 40 | # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) 41 | # endif 42 | # else 43 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) 44 | # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) 45 | /* The third version component from --version is an update index, 46 | but no macro is provided for it. */ 47 | # define COMPILER_VERSION_PATCH DEC(0) 48 | # endif 49 | # if defined(__INTEL_COMPILER_BUILD_DATE) 50 | /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ 51 | # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) 52 | # endif 53 | # if defined(_MSC_VER) 54 | /* _MSC_VER = VVRR */ 55 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 56 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 57 | # endif 58 | # if defined(__GNUC__) 59 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 60 | # elif defined(__GNUG__) 61 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 62 | # endif 63 | # if defined(__GNUC_MINOR__) 64 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 65 | # endif 66 | # if defined(__GNUC_PATCHLEVEL__) 67 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 68 | # endif 69 | 70 | #elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) 71 | # define COMPILER_ID "IntelLLVM" 72 | #if defined(_MSC_VER) 73 | # define SIMULATE_ID "MSVC" 74 | #endif 75 | #if defined(__GNUC__) 76 | # define SIMULATE_ID "GNU" 77 | #endif 78 | /* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and 79 | * later. Look for 6 digit vs. 8 digit version number to decide encoding. 80 | * VVVV is no smaller than the current year when a version is released. 81 | */ 82 | #if __INTEL_LLVM_COMPILER < 1000000L 83 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) 84 | # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) 85 | # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) 86 | #else 87 | # define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) 88 | # define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) 89 | # define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) 90 | #endif 91 | #if defined(_MSC_VER) 92 | /* _MSC_VER = VVRR */ 93 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 94 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 95 | #endif 96 | #if defined(__GNUC__) 97 | # define SIMULATE_VERSION_MAJOR DEC(__GNUC__) 98 | #elif defined(__GNUG__) 99 | # define SIMULATE_VERSION_MAJOR DEC(__GNUG__) 100 | #endif 101 | #if defined(__GNUC_MINOR__) 102 | # define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) 103 | #endif 104 | #if defined(__GNUC_PATCHLEVEL__) 105 | # define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 106 | #endif 107 | 108 | #elif defined(__PATHCC__) 109 | # define COMPILER_ID "PathScale" 110 | # define COMPILER_VERSION_MAJOR DEC(__PATHCC__) 111 | # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) 112 | # if defined(__PATHCC_PATCHLEVEL__) 113 | # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) 114 | # endif 115 | 116 | #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) 117 | # define COMPILER_ID "Embarcadero" 118 | # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) 119 | # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) 120 | # define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) 121 | 122 | #elif defined(__BORLANDC__) 123 | # define COMPILER_ID "Borland" 124 | /* __BORLANDC__ = 0xVRR */ 125 | # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) 126 | # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) 127 | 128 | #elif defined(__WATCOMC__) && __WATCOMC__ < 1200 129 | # define COMPILER_ID "Watcom" 130 | /* __WATCOMC__ = VVRR */ 131 | # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) 132 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 133 | # if (__WATCOMC__ % 10) > 0 134 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 135 | # endif 136 | 137 | #elif defined(__WATCOMC__) 138 | # define COMPILER_ID "OpenWatcom" 139 | /* __WATCOMC__ = VVRP + 1100 */ 140 | # define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) 141 | # define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) 142 | # if (__WATCOMC__ % 10) > 0 143 | # define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) 144 | # endif 145 | 146 | #elif defined(__SUNPRO_CC) 147 | # define COMPILER_ID "SunPro" 148 | # if __SUNPRO_CC >= 0x5100 149 | /* __SUNPRO_CC = 0xVRRP */ 150 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) 151 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) 152 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 153 | # else 154 | /* __SUNPRO_CC = 0xVRP */ 155 | # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) 156 | # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) 157 | # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) 158 | # endif 159 | 160 | #elif defined(__HP_aCC) 161 | # define COMPILER_ID "HP" 162 | /* __HP_aCC = VVRRPP */ 163 | # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) 164 | # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) 165 | # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) 166 | 167 | #elif defined(__DECCXX) 168 | # define COMPILER_ID "Compaq" 169 | /* __DECCXX_VER = VVRRTPPPP */ 170 | # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) 171 | # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) 172 | # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) 173 | 174 | #elif defined(__IBMCPP__) && defined(__COMPILER_VER__) 175 | # define COMPILER_ID "zOS" 176 | /* __IBMCPP__ = VRP */ 177 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 178 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 179 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 180 | 181 | #elif defined(__ibmxl__) && defined(__clang__) 182 | # define COMPILER_ID "XLClang" 183 | # define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) 184 | # define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) 185 | # define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) 186 | # define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) 187 | 188 | 189 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 190 | # define COMPILER_ID "XL" 191 | /* __IBMCPP__ = VRP */ 192 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 193 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 194 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 195 | 196 | #elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 197 | # define COMPILER_ID "VisualAge" 198 | /* __IBMCPP__ = VRP */ 199 | # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) 200 | # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) 201 | # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) 202 | 203 | #elif defined(__NVCOMPILER) 204 | # define COMPILER_ID "NVHPC" 205 | # define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) 206 | # define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) 207 | # if defined(__NVCOMPILER_PATCHLEVEL__) 208 | # define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) 209 | # endif 210 | 211 | #elif defined(__PGI) 212 | # define COMPILER_ID "PGI" 213 | # define COMPILER_VERSION_MAJOR DEC(__PGIC__) 214 | # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) 215 | # if defined(__PGIC_PATCHLEVEL__) 216 | # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) 217 | # endif 218 | 219 | #elif defined(_CRAYC) 220 | # define COMPILER_ID "Cray" 221 | # define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) 222 | # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) 223 | 224 | #elif defined(__TI_COMPILER_VERSION__) 225 | # define COMPILER_ID "TI" 226 | /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ 227 | # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) 228 | # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) 229 | # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) 230 | 231 | #elif defined(__CLANG_FUJITSU) 232 | # define COMPILER_ID "FujitsuClang" 233 | # define COMPILER_VERSION_MAJOR DEC(__FCC_major__) 234 | # define COMPILER_VERSION_MINOR DEC(__FCC_minor__) 235 | # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) 236 | # define COMPILER_VERSION_INTERNAL_STR __clang_version__ 237 | 238 | 239 | #elif defined(__FUJITSU) 240 | # define COMPILER_ID "Fujitsu" 241 | # if defined(__FCC_version__) 242 | # define COMPILER_VERSION __FCC_version__ 243 | # elif defined(__FCC_major__) 244 | # define COMPILER_VERSION_MAJOR DEC(__FCC_major__) 245 | # define COMPILER_VERSION_MINOR DEC(__FCC_minor__) 246 | # define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) 247 | # endif 248 | # if defined(__fcc_version) 249 | # define COMPILER_VERSION_INTERNAL DEC(__fcc_version) 250 | # elif defined(__FCC_VERSION) 251 | # define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) 252 | # endif 253 | 254 | 255 | #elif defined(__ghs__) 256 | # define COMPILER_ID "GHS" 257 | /* __GHS_VERSION_NUMBER = VVVVRP */ 258 | # ifdef __GHS_VERSION_NUMBER 259 | # define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) 260 | # define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) 261 | # define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) 262 | # endif 263 | 264 | #elif defined(__SCO_VERSION__) 265 | # define COMPILER_ID "SCO" 266 | 267 | #elif defined(__ARMCC_VERSION) && !defined(__clang__) 268 | # define COMPILER_ID "ARMCC" 269 | #if __ARMCC_VERSION >= 1000000 270 | /* __ARMCC_VERSION = VRRPPPP */ 271 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) 272 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) 273 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 274 | #else 275 | /* __ARMCC_VERSION = VRPPPP */ 276 | # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) 277 | # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) 278 | # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) 279 | #endif 280 | 281 | 282 | #elif defined(__clang__) && defined(__apple_build_version__) 283 | # define COMPILER_ID "AppleClang" 284 | # if defined(_MSC_VER) 285 | # define SIMULATE_ID "MSVC" 286 | # endif 287 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 288 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 289 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 290 | # if defined(_MSC_VER) 291 | /* _MSC_VER = VVRR */ 292 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 293 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 294 | # endif 295 | # define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) 296 | 297 | #elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) 298 | # define COMPILER_ID "ARMClang" 299 | # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) 300 | # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) 301 | # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) 302 | # define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) 303 | 304 | #elif defined(__clang__) 305 | # define COMPILER_ID "Clang" 306 | # if defined(_MSC_VER) 307 | # define SIMULATE_ID "MSVC" 308 | # endif 309 | # define COMPILER_VERSION_MAJOR DEC(__clang_major__) 310 | # define COMPILER_VERSION_MINOR DEC(__clang_minor__) 311 | # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) 312 | # if defined(_MSC_VER) 313 | /* _MSC_VER = VVRR */ 314 | # define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) 315 | # define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) 316 | # endif 317 | 318 | #elif defined(__GNUC__) || defined(__GNUG__) 319 | # define COMPILER_ID "GNU" 320 | # if defined(__GNUC__) 321 | # define COMPILER_VERSION_MAJOR DEC(__GNUC__) 322 | # else 323 | # define COMPILER_VERSION_MAJOR DEC(__GNUG__) 324 | # endif 325 | # if defined(__GNUC_MINOR__) 326 | # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) 327 | # endif 328 | # if defined(__GNUC_PATCHLEVEL__) 329 | # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) 330 | # endif 331 | 332 | #elif defined(_MSC_VER) 333 | # define COMPILER_ID "MSVC" 334 | /* _MSC_VER = VVRR */ 335 | # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) 336 | # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) 337 | # if defined(_MSC_FULL_VER) 338 | # if _MSC_VER >= 1400 339 | /* _MSC_FULL_VER = VVRRPPPPP */ 340 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) 341 | # else 342 | /* _MSC_FULL_VER = VVRRPPPP */ 343 | # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) 344 | # endif 345 | # endif 346 | # if defined(_MSC_BUILD) 347 | # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) 348 | # endif 349 | 350 | #elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) 351 | # define COMPILER_ID "ADSP" 352 | #if defined(__VISUALDSPVERSION__) 353 | /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ 354 | # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) 355 | # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) 356 | # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) 357 | #endif 358 | 359 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 360 | # define COMPILER_ID "IAR" 361 | # if defined(__VER__) && defined(__ICCARM__) 362 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) 363 | # define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) 364 | # define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) 365 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 366 | # elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) 367 | # define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) 368 | # define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) 369 | # define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) 370 | # define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) 371 | # endif 372 | 373 | 374 | /* These compilers are either not known or too old to define an 375 | identification macro. Try to identify the platform and guess that 376 | it is the native compiler. */ 377 | #elif defined(__hpux) || defined(__hpua) 378 | # define COMPILER_ID "HP" 379 | 380 | #else /* unknown compiler */ 381 | # define COMPILER_ID "" 382 | #endif 383 | 384 | /* Construct the string literal in pieces to prevent the source from 385 | getting matched. Store it in a pointer rather than an array 386 | because some compilers will just produce instructions to fill the 387 | array rather than assigning a pointer to a static array. */ 388 | char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 389 | #ifdef SIMULATE_ID 390 | char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 391 | #endif 392 | 393 | #ifdef __QNXNTO__ 394 | char const* qnxnto = "INFO" ":" "qnxnto[]"; 395 | #endif 396 | 397 | #if defined(__CRAYXT_COMPUTE_LINUX_TARGET) 398 | char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; 399 | #endif 400 | 401 | #define STRINGIFY_HELPER(X) #X 402 | #define STRINGIFY(X) STRINGIFY_HELPER(X) 403 | 404 | /* Identify known platforms by name. */ 405 | #if defined(__linux) || defined(__linux__) || defined(linux) 406 | # define PLATFORM_ID "Linux" 407 | 408 | #elif defined(__MSYS__) 409 | # define PLATFORM_ID "MSYS" 410 | 411 | #elif defined(__CYGWIN__) 412 | # define PLATFORM_ID "Cygwin" 413 | 414 | #elif defined(__MINGW32__) 415 | # define PLATFORM_ID "MinGW" 416 | 417 | #elif defined(__APPLE__) 418 | # define PLATFORM_ID "Darwin" 419 | 420 | #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 421 | # define PLATFORM_ID "Windows" 422 | 423 | #elif defined(__FreeBSD__) || defined(__FreeBSD) 424 | # define PLATFORM_ID "FreeBSD" 425 | 426 | #elif defined(__NetBSD__) || defined(__NetBSD) 427 | # define PLATFORM_ID "NetBSD" 428 | 429 | #elif defined(__OpenBSD__) || defined(__OPENBSD) 430 | # define PLATFORM_ID "OpenBSD" 431 | 432 | #elif defined(__sun) || defined(sun) 433 | # define PLATFORM_ID "SunOS" 434 | 435 | #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) 436 | # define PLATFORM_ID "AIX" 437 | 438 | #elif defined(__hpux) || defined(__hpux__) 439 | # define PLATFORM_ID "HP-UX" 440 | 441 | #elif defined(__HAIKU__) 442 | # define PLATFORM_ID "Haiku" 443 | 444 | #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) 445 | # define PLATFORM_ID "BeOS" 446 | 447 | #elif defined(__QNX__) || defined(__QNXNTO__) 448 | # define PLATFORM_ID "QNX" 449 | 450 | #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) 451 | # define PLATFORM_ID "Tru64" 452 | 453 | #elif defined(__riscos) || defined(__riscos__) 454 | # define PLATFORM_ID "RISCos" 455 | 456 | #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) 457 | # define PLATFORM_ID "SINIX" 458 | 459 | #elif defined(__UNIX_SV__) 460 | # define PLATFORM_ID "UNIX_SV" 461 | 462 | #elif defined(__bsdos__) 463 | # define PLATFORM_ID "BSDOS" 464 | 465 | #elif defined(_MPRAS) || defined(MPRAS) 466 | # define PLATFORM_ID "MP-RAS" 467 | 468 | #elif defined(__osf) || defined(__osf__) 469 | # define PLATFORM_ID "OSF1" 470 | 471 | #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) 472 | # define PLATFORM_ID "SCO_SV" 473 | 474 | #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) 475 | # define PLATFORM_ID "ULTRIX" 476 | 477 | #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) 478 | # define PLATFORM_ID "Xenix" 479 | 480 | #elif defined(__WATCOMC__) 481 | # if defined(__LINUX__) 482 | # define PLATFORM_ID "Linux" 483 | 484 | # elif defined(__DOS__) 485 | # define PLATFORM_ID "DOS" 486 | 487 | # elif defined(__OS2__) 488 | # define PLATFORM_ID "OS2" 489 | 490 | # elif defined(__WINDOWS__) 491 | # define PLATFORM_ID "Windows3x" 492 | 493 | # elif defined(__VXWORKS__) 494 | # define PLATFORM_ID "VxWorks" 495 | 496 | # else /* unknown platform */ 497 | # define PLATFORM_ID 498 | # endif 499 | 500 | #elif defined(__INTEGRITY) 501 | # if defined(INT_178B) 502 | # define PLATFORM_ID "Integrity178" 503 | 504 | # else /* regular Integrity */ 505 | # define PLATFORM_ID "Integrity" 506 | # endif 507 | 508 | #else /* unknown platform */ 509 | # define PLATFORM_ID 510 | 511 | #endif 512 | 513 | /* For windows compilers MSVC and Intel we can determine 514 | the architecture of the compiler being used. This is because 515 | the compilers do not have flags that can change the architecture, 516 | but rather depend on which compiler is being used 517 | */ 518 | #if defined(_WIN32) && defined(_MSC_VER) 519 | # if defined(_M_IA64) 520 | # define ARCHITECTURE_ID "IA64" 521 | 522 | # elif defined(_M_ARM64EC) 523 | # define ARCHITECTURE_ID "ARM64EC" 524 | 525 | # elif defined(_M_X64) || defined(_M_AMD64) 526 | # define ARCHITECTURE_ID "x64" 527 | 528 | # elif defined(_M_IX86) 529 | # define ARCHITECTURE_ID "X86" 530 | 531 | # elif defined(_M_ARM64) 532 | # define ARCHITECTURE_ID "ARM64" 533 | 534 | # elif defined(_M_ARM) 535 | # if _M_ARM == 4 536 | # define ARCHITECTURE_ID "ARMV4I" 537 | # elif _M_ARM == 5 538 | # define ARCHITECTURE_ID "ARMV5I" 539 | # else 540 | # define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) 541 | # endif 542 | 543 | # elif defined(_M_MIPS) 544 | # define ARCHITECTURE_ID "MIPS" 545 | 546 | # elif defined(_M_SH) 547 | # define ARCHITECTURE_ID "SHx" 548 | 549 | # else /* unknown architecture */ 550 | # define ARCHITECTURE_ID "" 551 | # endif 552 | 553 | #elif defined(__WATCOMC__) 554 | # if defined(_M_I86) 555 | # define ARCHITECTURE_ID "I86" 556 | 557 | # elif defined(_M_IX86) 558 | # define ARCHITECTURE_ID "X86" 559 | 560 | # else /* unknown architecture */ 561 | # define ARCHITECTURE_ID "" 562 | # endif 563 | 564 | #elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) 565 | # if defined(__ICCARM__) 566 | # define ARCHITECTURE_ID "ARM" 567 | 568 | # elif defined(__ICCRX__) 569 | # define ARCHITECTURE_ID "RX" 570 | 571 | # elif defined(__ICCRH850__) 572 | # define ARCHITECTURE_ID "RH850" 573 | 574 | # elif defined(__ICCRL78__) 575 | # define ARCHITECTURE_ID "RL78" 576 | 577 | # elif defined(__ICCRISCV__) 578 | # define ARCHITECTURE_ID "RISCV" 579 | 580 | # elif defined(__ICCAVR__) 581 | # define ARCHITECTURE_ID "AVR" 582 | 583 | # elif defined(__ICC430__) 584 | # define ARCHITECTURE_ID "MSP430" 585 | 586 | # elif defined(__ICCV850__) 587 | # define ARCHITECTURE_ID "V850" 588 | 589 | # elif defined(__ICC8051__) 590 | # define ARCHITECTURE_ID "8051" 591 | 592 | # elif defined(__ICCSTM8__) 593 | # define ARCHITECTURE_ID "STM8" 594 | 595 | # else /* unknown architecture */ 596 | # define ARCHITECTURE_ID "" 597 | # endif 598 | 599 | #elif defined(__ghs__) 600 | # if defined(__PPC64__) 601 | # define ARCHITECTURE_ID "PPC64" 602 | 603 | # elif defined(__ppc__) 604 | # define ARCHITECTURE_ID "PPC" 605 | 606 | # elif defined(__ARM__) 607 | # define ARCHITECTURE_ID "ARM" 608 | 609 | # elif defined(__x86_64__) 610 | # define ARCHITECTURE_ID "x64" 611 | 612 | # elif defined(__i386__) 613 | # define ARCHITECTURE_ID "X86" 614 | 615 | # else /* unknown architecture */ 616 | # define ARCHITECTURE_ID "" 617 | # endif 618 | 619 | #elif defined(__TI_COMPILER_VERSION__) 620 | # if defined(__TI_ARM__) 621 | # define ARCHITECTURE_ID "ARM" 622 | 623 | # elif defined(__MSP430__) 624 | # define ARCHITECTURE_ID "MSP430" 625 | 626 | # elif defined(__TMS320C28XX__) 627 | # define ARCHITECTURE_ID "TMS320C28x" 628 | 629 | # elif defined(__TMS320C6X__) || defined(_TMS320C6X) 630 | # define ARCHITECTURE_ID "TMS320C6x" 631 | 632 | # else /* unknown architecture */ 633 | # define ARCHITECTURE_ID "" 634 | # endif 635 | 636 | #else 637 | # define ARCHITECTURE_ID 638 | #endif 639 | 640 | /* Convert integer to decimal digit literals. */ 641 | #define DEC(n) \ 642 | ('0' + (((n) / 10000000)%10)), \ 643 | ('0' + (((n) / 1000000)%10)), \ 644 | ('0' + (((n) / 100000)%10)), \ 645 | ('0' + (((n) / 10000)%10)), \ 646 | ('0' + (((n) / 1000)%10)), \ 647 | ('0' + (((n) / 100)%10)), \ 648 | ('0' + (((n) / 10)%10)), \ 649 | ('0' + ((n) % 10)) 650 | 651 | /* Convert integer to hex digit literals. */ 652 | #define HEX(n) \ 653 | ('0' + ((n)>>28 & 0xF)), \ 654 | ('0' + ((n)>>24 & 0xF)), \ 655 | ('0' + ((n)>>20 & 0xF)), \ 656 | ('0' + ((n)>>16 & 0xF)), \ 657 | ('0' + ((n)>>12 & 0xF)), \ 658 | ('0' + ((n)>>8 & 0xF)), \ 659 | ('0' + ((n)>>4 & 0xF)), \ 660 | ('0' + ((n) & 0xF)) 661 | 662 | /* Construct a string literal encoding the version number. */ 663 | #ifdef COMPILER_VERSION 664 | char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; 665 | 666 | /* Construct a string literal encoding the version number components. */ 667 | #elif defined(COMPILER_VERSION_MAJOR) 668 | char const info_version[] = { 669 | 'I', 'N', 'F', 'O', ':', 670 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', 671 | COMPILER_VERSION_MAJOR, 672 | # ifdef COMPILER_VERSION_MINOR 673 | '.', COMPILER_VERSION_MINOR, 674 | # ifdef COMPILER_VERSION_PATCH 675 | '.', COMPILER_VERSION_PATCH, 676 | # ifdef COMPILER_VERSION_TWEAK 677 | '.', COMPILER_VERSION_TWEAK, 678 | # endif 679 | # endif 680 | # endif 681 | ']','\0'}; 682 | #endif 683 | 684 | /* Construct a string literal encoding the internal version number. */ 685 | #ifdef COMPILER_VERSION_INTERNAL 686 | char const info_version_internal[] = { 687 | 'I', 'N', 'F', 'O', ':', 688 | 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', 689 | 'i','n','t','e','r','n','a','l','[', 690 | COMPILER_VERSION_INTERNAL,']','\0'}; 691 | #elif defined(COMPILER_VERSION_INTERNAL_STR) 692 | char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; 693 | #endif 694 | 695 | /* Construct a string literal encoding the version number components. */ 696 | #ifdef SIMULATE_VERSION_MAJOR 697 | char const info_simulate_version[] = { 698 | 'I', 'N', 'F', 'O', ':', 699 | 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', 700 | SIMULATE_VERSION_MAJOR, 701 | # ifdef SIMULATE_VERSION_MINOR 702 | '.', SIMULATE_VERSION_MINOR, 703 | # ifdef SIMULATE_VERSION_PATCH 704 | '.', SIMULATE_VERSION_PATCH, 705 | # ifdef SIMULATE_VERSION_TWEAK 706 | '.', SIMULATE_VERSION_TWEAK, 707 | # endif 708 | # endif 709 | # endif 710 | ']','\0'}; 711 | #endif 712 | 713 | /* Construct the string literal in pieces to prevent the source from 714 | getting matched. Store it in a pointer rather than an array 715 | because some compilers will just produce instructions to fill the 716 | array rather than assigning a pointer to a static array. */ 717 | char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; 718 | char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; 719 | 720 | 721 | 722 | #if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L 723 | # if defined(__INTEL_CXX11_MODE__) 724 | # if defined(__cpp_aggregate_nsdmi) 725 | # define CXX_STD 201402L 726 | # else 727 | # define CXX_STD 201103L 728 | # endif 729 | # else 730 | # define CXX_STD 199711L 731 | # endif 732 | #elif defined(_MSC_VER) && defined(_MSVC_LANG) 733 | # define CXX_STD _MSVC_LANG 734 | #else 735 | # define CXX_STD __cplusplus 736 | #endif 737 | 738 | const char* info_language_standard_default = "INFO" ":" "standard_default[" 739 | #if CXX_STD > 202002L 740 | "23" 741 | #elif CXX_STD > 201703L 742 | "20" 743 | #elif CXX_STD >= 201703L 744 | "17" 745 | #elif CXX_STD >= 201402L 746 | "14" 747 | #elif CXX_STD >= 201103L 748 | "11" 749 | #else 750 | "98" 751 | #endif 752 | "]"; 753 | 754 | const char* info_language_extensions_default = "INFO" ":" "extensions_default[" 755 | /* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ 756 | #if (defined(__clang__) || defined(__GNUC__) || \ 757 | defined(__TI_COMPILER_VERSION__)) && \ 758 | !defined(__STRICT_ANSI__) && !defined(_MSC_VER) 759 | "ON" 760 | #else 761 | "OFF" 762 | #endif 763 | "]"; 764 | 765 | /*--------------------------------------------------------------------------*/ 766 | 767 | int main(int argc, char* argv[]) 768 | { 769 | int require = 0; 770 | require += info_compiler[argc]; 771 | require += info_platform[argc]; 772 | #ifdef COMPILER_VERSION_MAJOR 773 | require += info_version[argc]; 774 | #endif 775 | #ifdef COMPILER_VERSION_INTERNAL 776 | require += info_version_internal[argc]; 777 | #endif 778 | #ifdef SIMULATE_ID 779 | require += info_simulate[argc]; 780 | #endif 781 | #ifdef SIMULATE_VERSION_MAJOR 782 | require += info_simulate_version[argc]; 783 | #endif 784 | #if defined(__CRAYXT_COMPUTE_LINUX_TARGET) 785 | require += info_cray[argc]; 786 | #endif 787 | require += info_language_standard_default[argc]; 788 | require += info_language_extensions_default[argc]; 789 | (void)argv; 790 | return require; 791 | } 792 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/3.22.1/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/3.22.1/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/siyu_ren/pugeo_pytorch/evaluation/p2f") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/siyu_ren/pugeo_pytorch/evaluation/p2f") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/FindOpenMP/OpenMPCheckVersion.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 5 | 'P', '-', 'd', 'a', 't', 'e', '[', 6 | ('0' + ((_OPENMP/100000)%10)), 7 | ('0' + ((_OPENMP/10000)%10)), 8 | ('0' + ((_OPENMP/1000)%10)), 9 | ('0' + ((_OPENMP/100)%10)), 10 | ('0' + ((_OPENMP/10)%10)), 11 | ('0' + ((_OPENMP/1)%10)), 12 | ']', '\0' }; 13 | int main(void) 14 | { 15 | puts(ompver_str); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/FindOpenMP/OpenMPCheckVersion.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | const char ompver_str[] = { 'I', 'N', 'F', 'O', ':', 'O', 'p', 'e', 'n', 'M', 5 | 'P', '-', 'd', 'a', 't', 'e', '[', 6 | ('0' + ((_OPENMP/100000)%10)), 7 | ('0' + ((_OPENMP/10000)%10)), 8 | ('0' + ((_OPENMP/1000)%10)), 9 | ('0' + ((_OPENMP/100)%10)), 10 | ('0' + ((_OPENMP/10)%10)), 11 | ('0' + ((_OPENMP/1)%10)), 12 | ']', '\0' }; 13 | int main(void) 14 | { 15 | puts(ompver_str); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/FindOpenMP/OpenMPTryFlag.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | int main(void) { 4 | #ifdef _OPENMP 5 | omp_get_max_threads(); 6 | return 0; 7 | #elif defined(__HIP_DEVICE_COMPILE__) 8 | return 0; 9 | #else 10 | breaks_on_purpose 11 | #endif 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/FindOpenMP/OpenMPTryFlag.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | int main(void) { 4 | #ifdef _OPENMP 5 | omp_get_max_threads(); 6 | return 0; 7 | #elif defined(__HIP_DEVICE_COMPILE__) 8 | return 0; 9 | #else 10 | breaks_on_purpose 11 | #endif 12 | } 13 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/FindOpenMP/ompver_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/FindOpenMP/ompver_C.bin -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/FindOpenMP/ompver_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/FindOpenMP/ompver_CXX.bin -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/Makefile.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22 3 | 4 | # The generator used is: 5 | set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") 6 | 7 | # The top level Makefile was generated from the following files: 8 | set(CMAKE_MAKEFILE_DEPENDS 9 | "CMakeCache.txt" 10 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeCInformation.cmake" 11 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeCXXInformation.cmake" 12 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake" 13 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeGenericSystem.cmake" 14 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake" 15 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake" 16 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeParseArguments.cmake" 17 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake" 18 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake" 19 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake" 20 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake" 21 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Compiler/GNU-C.cmake" 22 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Compiler/GNU-CXX.cmake" 23 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Compiler/GNU.cmake" 24 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/FindOpenMP.cmake" 25 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake" 26 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/FindPackageMessage.cmake" 27 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Platform/Linux-GNU-C.cmake" 28 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Platform/Linux-GNU-CXX.cmake" 29 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Platform/Linux-GNU.cmake" 30 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Platform/Linux.cmake" 31 | "/home/siyu_ren/anaconda3/envs/mink/share/cmake-3.22/Modules/Platform/UnixPaths.cmake" 32 | "CMakeFiles/3.22.1/CMakeCCompiler.cmake" 33 | "CMakeFiles/3.22.1/CMakeCXXCompiler.cmake" 34 | "CMakeFiles/3.22.1/CMakeSystem.cmake" 35 | "CMakeLists.txt" 36 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfig.cmake" 37 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALConfigVersion.cmake" 38 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports-release.cmake" 39 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALExports.cmake" 40 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGALLibConfig.cmake" 41 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Common.cmake" 42 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_CreateSingleSourceCGALProgram.cmake" 43 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_GeneratorSpecificSettings.cmake" 44 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_Macros.cmake" 45 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_SetupFlags.cmake" 46 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_TweakFindBoost.cmake" 47 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_VersionUtils.cmake" 48 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/CGAL_add_test.cmake" 49 | "/usr/lib/x86_64-linux-gnu/cmake/CGAL/UseCGAL.cmake" 50 | ) 51 | 52 | # The corresponding makefile is: 53 | set(CMAKE_MAKEFILE_OUTPUTS 54 | "Makefile" 55 | "CMakeFiles/cmake.check_cache" 56 | ) 57 | 58 | # Byproducts of CMake generate step: 59 | set(CMAKE_MAKEFILE_PRODUCTS 60 | "CMakeFiles/CMakeDirectoryInformation.cmake" 61 | ) 62 | 63 | # Dependency information for all targets: 64 | set(CMAKE_DEPEND_INFO_FILES 65 | "CMakeFiles/evaluation.dir/DependInfo.cmake" 66 | ) 67 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/Makefile2: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | .PHONY : default_target 7 | 8 | #============================================================================= 9 | # Special targets provided by cmake. 10 | 11 | # Disable implicit rules so canonical targets will work. 12 | .SUFFIXES: 13 | 14 | # Disable VCS-based implicit rules. 15 | % : %,v 16 | 17 | # Disable VCS-based implicit rules. 18 | % : RCS/% 19 | 20 | # Disable VCS-based implicit rules. 21 | % : RCS/%,v 22 | 23 | # Disable VCS-based implicit rules. 24 | % : SCCS/s.% 25 | 26 | # Disable VCS-based implicit rules. 27 | % : s.% 28 | 29 | .SUFFIXES: .hpux_make_needs_suffix_list 30 | 31 | # Command-line flag to silence nested $(MAKE). 32 | $(VERBOSE)MAKESILENT = -s 33 | 34 | #Suppress display of executed commands. 35 | $(VERBOSE).SILENT: 36 | 37 | # A target that is always out of date. 38 | cmake_force: 39 | .PHONY : cmake_force 40 | 41 | #============================================================================= 42 | # Set environment variables for the build. 43 | 44 | # The shell in which to execute make rules. 45 | SHELL = /bin/sh 46 | 47 | # The CMake executable. 48 | CMAKE_COMMAND = /home/siyu_ren/anaconda3/envs/mink/bin/cmake 49 | 50 | # The command to remove a file. 51 | RM = /home/siyu_ren/anaconda3/envs/mink/bin/cmake -E rm -f 52 | 53 | # Escaping for special characters. 54 | EQUALS = = 55 | 56 | # The top-level source directory on which CMake was run. 57 | CMAKE_SOURCE_DIR = /home/siyu_ren/pugeo_pytorch/evaluation/p2f 58 | 59 | # The top-level build directory on which CMake was run. 60 | CMAKE_BINARY_DIR = /home/siyu_ren/pugeo_pytorch/evaluation/p2f 61 | 62 | #============================================================================= 63 | # Directory level rules for the build root directory 64 | 65 | # The main recursive "all" target. 66 | all: CMakeFiles/evaluation.dir/all 67 | .PHONY : all 68 | 69 | # The main recursive "preinstall" target. 70 | preinstall: 71 | .PHONY : preinstall 72 | 73 | # The main recursive "clean" target. 74 | clean: CMakeFiles/evaluation.dir/clean 75 | .PHONY : clean 76 | 77 | #============================================================================= 78 | # Target rules for target CMakeFiles/evaluation.dir 79 | 80 | # All Build rule for target. 81 | CMakeFiles/evaluation.dir/all: 82 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/depend 83 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/build 84 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles --progress-num=1,2 "Built target evaluation" 85 | .PHONY : CMakeFiles/evaluation.dir/all 86 | 87 | # Build rule for subdir invocation for target. 88 | CMakeFiles/evaluation.dir/rule: cmake_check_build_system 89 | $(CMAKE_COMMAND) -E cmake_progress_start /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles 2 90 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/evaluation.dir/all 91 | $(CMAKE_COMMAND) -E cmake_progress_start /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles 0 92 | .PHONY : CMakeFiles/evaluation.dir/rule 93 | 94 | # Convenience name for target. 95 | evaluation: CMakeFiles/evaluation.dir/rule 96 | .PHONY : evaluation 97 | 98 | # clean rule for target. 99 | CMakeFiles/evaluation.dir/clean: 100 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/clean 101 | .PHONY : CMakeFiles/evaluation.dir/clean 102 | 103 | #============================================================================= 104 | # Special targets to cleanup operation of make. 105 | 106 | # Special rule to run CMake to check the build system integrity. 107 | # No rule that depends on this can have commands that come from listfiles 108 | # because they might be regenerated. 109 | cmake_check_build_system: 110 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 111 | .PHONY : cmake_check_build_system 112 | 113 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles/evaluation.dir 2 | /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles/edit_cache.dir 3 | /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles/rebuild_cache.dir 4 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Consider dependencies only in project. 3 | set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) 4 | 5 | # The set of languages for which implicit dependencies are needed: 6 | set(CMAKE_DEPENDS_LANGUAGES 7 | ) 8 | 9 | # The set of dependency files which are needed: 10 | set(CMAKE_DEPENDS_DEPENDENCY_FILES 11 | "/home/siyu_ren/pugeo_pytorch/evaluation/p2f/evaluation.cpp" "CMakeFiles/evaluation.dir/evaluation.cpp.o" "gcc" "CMakeFiles/evaluation.dir/evaluation.cpp.o.d" 12 | ) 13 | 14 | # Targets to which this target links. 15 | set(CMAKE_TARGET_LINKED_INFO_FILES 16 | ) 17 | 18 | # Fortran module output directory. 19 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 20 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/build.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22 3 | 4 | # Delete rule output on recipe failure. 5 | .DELETE_ON_ERROR: 6 | 7 | #============================================================================= 8 | # Special targets provided by cmake. 9 | 10 | # Disable implicit rules so canonical targets will work. 11 | .SUFFIXES: 12 | 13 | # Disable VCS-based implicit rules. 14 | % : %,v 15 | 16 | # Disable VCS-based implicit rules. 17 | % : RCS/% 18 | 19 | # Disable VCS-based implicit rules. 20 | % : RCS/%,v 21 | 22 | # Disable VCS-based implicit rules. 23 | % : SCCS/s.% 24 | 25 | # Disable VCS-based implicit rules. 26 | % : s.% 27 | 28 | .SUFFIXES: .hpux_make_needs_suffix_list 29 | 30 | # Command-line flag to silence nested $(MAKE). 31 | $(VERBOSE)MAKESILENT = -s 32 | 33 | #Suppress display of executed commands. 34 | $(VERBOSE).SILENT: 35 | 36 | # A target that is always out of date. 37 | cmake_force: 38 | .PHONY : cmake_force 39 | 40 | #============================================================================= 41 | # Set environment variables for the build. 42 | 43 | # The shell in which to execute make rules. 44 | SHELL = /bin/sh 45 | 46 | # The CMake executable. 47 | CMAKE_COMMAND = /home/siyu_ren/anaconda3/envs/mink/bin/cmake 48 | 49 | # The command to remove a file. 50 | RM = /home/siyu_ren/anaconda3/envs/mink/bin/cmake -E rm -f 51 | 52 | # Escaping for special characters. 53 | EQUALS = = 54 | 55 | # The top-level source directory on which CMake was run. 56 | CMAKE_SOURCE_DIR = /home/siyu_ren/pugeo_pytorch/evaluation/p2f 57 | 58 | # The top-level build directory on which CMake was run. 59 | CMAKE_BINARY_DIR = /home/siyu_ren/pugeo_pytorch/evaluation/p2f 60 | 61 | # Include any dependencies generated for this target. 62 | include CMakeFiles/evaluation.dir/depend.make 63 | # Include any dependencies generated by the compiler for this target. 64 | include CMakeFiles/evaluation.dir/compiler_depend.make 65 | 66 | # Include the progress variables for this target. 67 | include CMakeFiles/evaluation.dir/progress.make 68 | 69 | # Include the compile flags for this target's objects. 70 | include CMakeFiles/evaluation.dir/flags.make 71 | 72 | CMakeFiles/evaluation.dir/evaluation.cpp.o: CMakeFiles/evaluation.dir/flags.make 73 | CMakeFiles/evaluation.dir/evaluation.cpp.o: evaluation.cpp 74 | CMakeFiles/evaluation.dir/evaluation.cpp.o: CMakeFiles/evaluation.dir/compiler_depend.ts 75 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/evaluation.dir/evaluation.cpp.o" 76 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/evaluation.dir/evaluation.cpp.o -MF CMakeFiles/evaluation.dir/evaluation.cpp.o.d -o CMakeFiles/evaluation.dir/evaluation.cpp.o -c /home/siyu_ren/pugeo_pytorch/evaluation/p2f/evaluation.cpp 77 | 78 | CMakeFiles/evaluation.dir/evaluation.cpp.i: cmake_force 79 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/evaluation.dir/evaluation.cpp.i" 80 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/siyu_ren/pugeo_pytorch/evaluation/p2f/evaluation.cpp > CMakeFiles/evaluation.dir/evaluation.cpp.i 81 | 82 | CMakeFiles/evaluation.dir/evaluation.cpp.s: cmake_force 83 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/evaluation.dir/evaluation.cpp.s" 84 | /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/siyu_ren/pugeo_pytorch/evaluation/p2f/evaluation.cpp -o CMakeFiles/evaluation.dir/evaluation.cpp.s 85 | 86 | # Object files for target evaluation 87 | evaluation_OBJECTS = \ 88 | "CMakeFiles/evaluation.dir/evaluation.cpp.o" 89 | 90 | # External object files for target evaluation 91 | evaluation_EXTERNAL_OBJECTS = 92 | 93 | evaluation: CMakeFiles/evaluation.dir/evaluation.cpp.o 94 | evaluation: CMakeFiles/evaluation.dir/build.make 95 | evaluation: /usr/lib/x86_64-linux-gnu/libmpfr.so 96 | evaluation: /usr/lib/x86_64-linux-gnu/libgmpxx.so 97 | evaluation: /usr/lib/x86_64-linux-gnu/libgmp.so 98 | evaluation: /usr/lib/x86_64-linux-gnu/libCGAL.so.13.0.1 99 | evaluation: /usr/lib/x86_64-linux-gnu/libCGAL.so.13.0.1 100 | evaluation: CMakeFiles/evaluation.dir/link.txt 101 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable evaluation" 102 | $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/evaluation.dir/link.txt --verbose=$(VERBOSE) 103 | 104 | # Rule to build all files generated by this target. 105 | CMakeFiles/evaluation.dir/build: evaluation 106 | .PHONY : CMakeFiles/evaluation.dir/build 107 | 108 | CMakeFiles/evaluation.dir/clean: 109 | $(CMAKE_COMMAND) -P CMakeFiles/evaluation.dir/cmake_clean.cmake 110 | .PHONY : CMakeFiles/evaluation.dir/clean 111 | 112 | CMakeFiles/evaluation.dir/depend: 113 | cd /home/siyu_ren/pugeo_pytorch/evaluation/p2f && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/siyu_ren/pugeo_pytorch/evaluation/p2f /home/siyu_ren/pugeo_pytorch/evaluation/p2f /home/siyu_ren/pugeo_pytorch/evaluation/p2f /home/siyu_ren/pugeo_pytorch/evaluation/p2f /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles/evaluation.dir/DependInfo.cmake --color=$(COLOR) 114 | .PHONY : CMakeFiles/evaluation.dir/depend 115 | 116 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/evaluation.dir/evaluation.cpp.o" 3 | "CMakeFiles/evaluation.dir/evaluation.cpp.o.d" 4 | "evaluation" 5 | "evaluation.pdb" 6 | ) 7 | 8 | # Per-language clean rules from dependency scanning. 9 | foreach(lang CXX) 10 | include(CMakeFiles/evaluation.dir/cmake_clean_${lang}.cmake OPTIONAL) 11 | endforeach() 12 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/compiler_depend.ts: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Timestamp file for compiler generated dependencies management for evaluation. 3 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/depend.make: -------------------------------------------------------------------------------- 1 | # Empty dependencies file for evaluation. 2 | # This may be replaced when dependencies are built. 3 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/evaluation.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/CMakeFiles/evaluation.dir/evaluation.cpp.o -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22 3 | 4 | # compile CXX with /usr/bin/c++ 5 | CXX_DEFINES = -DCGAL_USE_GMP -DCGAL_USE_GMPXX -DCGAL_USE_MPFR 6 | 7 | CXX_INCLUDES = -I/home/siyu_ren/pugeo_pytorch/evaluation/p2f/../../include -I/home/siyu_ren/pugeo_pytorch/evaluation/p2f 8 | 9 | CXX_FLAGS = -g -O2 -fdebug-prefix-map=/build/cgal-ZyilPF/cgal-4.11=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -frounding-math -fopenmp -O3 -DNDEBUG -std=gnu++11 10 | 11 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/link.txt: -------------------------------------------------------------------------------- 1 | /usr/bin/c++ -g -O2 -fdebug-prefix-map=/build/cgal-ZyilPF/cgal-4.11=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -frounding-math -fopenmp -O3 -DNDEBUG -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -rdynamic CMakeFiles/evaluation.dir/evaluation.cpp.o -o evaluation -lmpfr -lgmpxx -lgmp /usr/lib/x86_64-linux-gnu/libCGAL.so.13.0.1 /usr/lib/x86_64-linux-gnu/libCGAL.so.13.0.1 2 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/evaluation.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /evaluation/p2f/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Created by the script cgal_create_cmake_script 2 | # This is the CMake script for compiling a CGAL application. 3 | 4 | 5 | project( Distance_2_Tests ) 6 | cmake_minimum_required(VERSION 2.8.10) 7 | set (CMAKE_CXX_STANDARD 11) 8 | 9 | find_package(OpenMP) 10 | if (OPENMP_FOUND) 11 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") 12 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") 13 | endif() 14 | 15 | set (PLATFORM_LIBS pthread ${CMAKE_DL_LIBS}) 16 | 17 | find_package(CGAL QUIET) 18 | if ( CGAL_FOUND ) 19 | include( ${CGAL_USE_FILE} ) 20 | include( CGAL_CreateSingleSourceCGALProgram ) 21 | include_directories (BEFORE "../../include") 22 | # create a target per cppfile 23 | file(GLOB cppfiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | foreach(cppfile ${cppfiles}) 25 | create_single_source_cgal_program( "${cppfile}" ) 26 | endforeach() 27 | 28 | else() 29 | message(STATUS "This program requires the CGAL library, and will not be compiled.") 30 | endif() 31 | 32 | -------------------------------------------------------------------------------- /evaluation/p2f/Makefile: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.22 3 | 4 | # Default target executed when no arguments are given to make. 5 | default_target: all 6 | .PHONY : default_target 7 | 8 | # Allow only one "make -f Makefile2" at a time, but pass parallelism. 9 | .NOTPARALLEL: 10 | 11 | #============================================================================= 12 | # Special targets provided by cmake. 13 | 14 | # Disable implicit rules so canonical targets will work. 15 | .SUFFIXES: 16 | 17 | # Disable VCS-based implicit rules. 18 | % : %,v 19 | 20 | # Disable VCS-based implicit rules. 21 | % : RCS/% 22 | 23 | # Disable VCS-based implicit rules. 24 | % : RCS/%,v 25 | 26 | # Disable VCS-based implicit rules. 27 | % : SCCS/s.% 28 | 29 | # Disable VCS-based implicit rules. 30 | % : s.% 31 | 32 | .SUFFIXES: .hpux_make_needs_suffix_list 33 | 34 | # Command-line flag to silence nested $(MAKE). 35 | $(VERBOSE)MAKESILENT = -s 36 | 37 | #Suppress display of executed commands. 38 | $(VERBOSE).SILENT: 39 | 40 | # A target that is always out of date. 41 | cmake_force: 42 | .PHONY : cmake_force 43 | 44 | #============================================================================= 45 | # Set environment variables for the build. 46 | 47 | # The shell in which to execute make rules. 48 | SHELL = /bin/sh 49 | 50 | # The CMake executable. 51 | CMAKE_COMMAND = /home/siyu_ren/anaconda3/envs/mink/bin/cmake 52 | 53 | # The command to remove a file. 54 | RM = /home/siyu_ren/anaconda3/envs/mink/bin/cmake -E rm -f 55 | 56 | # Escaping for special characters. 57 | EQUALS = = 58 | 59 | # The top-level source directory on which CMake was run. 60 | CMAKE_SOURCE_DIR = /home/siyu_ren/pugeo_pytorch/evaluation/p2f 61 | 62 | # The top-level build directory on which CMake was run. 63 | CMAKE_BINARY_DIR = /home/siyu_ren/pugeo_pytorch/evaluation/p2f 64 | 65 | #============================================================================= 66 | # Targets provided globally by CMake. 67 | 68 | # Special rule for the target edit_cache 69 | edit_cache: 70 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..." 71 | /home/siyu_ren/anaconda3/envs/mink/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 72 | .PHONY : edit_cache 73 | 74 | # Special rule for the target edit_cache 75 | edit_cache/fast: edit_cache 76 | .PHONY : edit_cache/fast 77 | 78 | # Special rule for the target rebuild_cache 79 | rebuild_cache: 80 | @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." 81 | /home/siyu_ren/anaconda3/envs/mink/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) 82 | .PHONY : rebuild_cache 83 | 84 | # Special rule for the target rebuild_cache 85 | rebuild_cache/fast: rebuild_cache 86 | .PHONY : rebuild_cache/fast 87 | 88 | # The main all target 89 | all: cmake_check_build_system 90 | $(CMAKE_COMMAND) -E cmake_progress_start /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles /home/siyu_ren/pugeo_pytorch/evaluation/p2f//CMakeFiles/progress.marks 91 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all 92 | $(CMAKE_COMMAND) -E cmake_progress_start /home/siyu_ren/pugeo_pytorch/evaluation/p2f/CMakeFiles 0 93 | .PHONY : all 94 | 95 | # The main clean target 96 | clean: 97 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean 98 | .PHONY : clean 99 | 100 | # The main clean target 101 | clean/fast: clean 102 | .PHONY : clean/fast 103 | 104 | # Prepare targets for installation. 105 | preinstall: all 106 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall 107 | .PHONY : preinstall 108 | 109 | # Prepare targets for installation. 110 | preinstall/fast: 111 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall 112 | .PHONY : preinstall/fast 113 | 114 | # clear depends 115 | depend: 116 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 117 | .PHONY : depend 118 | 119 | #============================================================================= 120 | # Target rules for targets named evaluation 121 | 122 | # Build rule for target. 123 | evaluation: cmake_check_build_system 124 | $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 evaluation 125 | .PHONY : evaluation 126 | 127 | # fast build rule for target. 128 | evaluation/fast: 129 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/build 130 | .PHONY : evaluation/fast 131 | 132 | evaluation.o: evaluation.cpp.o 133 | .PHONY : evaluation.o 134 | 135 | # target to build an object file 136 | evaluation.cpp.o: 137 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/evaluation.cpp.o 138 | .PHONY : evaluation.cpp.o 139 | 140 | evaluation.i: evaluation.cpp.i 141 | .PHONY : evaluation.i 142 | 143 | # target to preprocess a source file 144 | evaluation.cpp.i: 145 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/evaluation.cpp.i 146 | .PHONY : evaluation.cpp.i 147 | 148 | evaluation.s: evaluation.cpp.s 149 | .PHONY : evaluation.s 150 | 151 | # target to generate assembly for a file 152 | evaluation.cpp.s: 153 | $(MAKE) $(MAKESILENT) -f CMakeFiles/evaluation.dir/build.make CMakeFiles/evaluation.dir/evaluation.cpp.s 154 | .PHONY : evaluation.cpp.s 155 | 156 | # Help Target 157 | help: 158 | @echo "The following are some of the valid targets for this Makefile:" 159 | @echo "... all (the default if no target is provided)" 160 | @echo "... clean" 161 | @echo "... depend" 162 | @echo "... edit_cache" 163 | @echo "... rebuild_cache" 164 | @echo "... evaluation" 165 | @echo "... evaluation.o" 166 | @echo "... evaluation.i" 167 | @echo "... evaluation.s" 168 | .PHONY : help 169 | 170 | 171 | 172 | #============================================================================= 173 | # Special targets to cleanup operation of make. 174 | 175 | # Special rule to run CMake to check the build system integrity. 176 | # No rule that depends on this can have commands that come from listfiles 177 | # because they might be regenerated. 178 | cmake_check_build_system: 179 | $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 180 | .PHONY : cmake_check_build_system 181 | 182 | -------------------------------------------------------------------------------- /evaluation/p2f/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /home/siyu_ren/pugeo_pytorch/evaluation/p2f 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Release") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Install shared libraries without execute permission? 31 | if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) 32 | set(CMAKE_INSTALL_SO_NO_EXE "1") 33 | endif() 34 | 35 | # Is this installation the result of a crosscompile? 36 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 37 | set(CMAKE_CROSSCOMPILING "FALSE") 38 | endif() 39 | 40 | # Set default install directory permissions. 41 | if(NOT DEFINED CMAKE_OBJDUMP) 42 | set(CMAKE_OBJDUMP "/usr/bin/objdump") 43 | endif() 44 | 45 | if(CMAKE_INSTALL_COMPONENT) 46 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 47 | else() 48 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 49 | endif() 50 | 51 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 52 | "${CMAKE_INSTALL_MANIFEST_FILES}") 53 | file(WRITE "/home/siyu_ren/pugeo_pytorch/evaluation/p2f/${CMAKE_INSTALL_MANIFEST}" 54 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 55 | -------------------------------------------------------------------------------- /evaluation/p2f/evaluation: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsy6318/PUGeoNet_pytorch/2b1b7e765f12dd9bd47d53679a52aedd4bdde1e4/evaluation/p2f/evaluation -------------------------------------------------------------------------------- /evaluation/p2f/evaluation.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include /* sqrt */ 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #include 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | 32 | //we use multi-thread to accelerate the calculation 33 | //define the thread number here 34 | #define THREAD 20 35 | 36 | typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; 37 | typedef CGAL::Surface_mesh Triangle_mesh; 38 | typedef CGAL::Surface_mesh_shortest_path_traits Traits; 39 | typedef CGAL::Surface_mesh_shortest_path Surface_mesh_shortest_path; 40 | typedef Surface_mesh_shortest_path::Face_location Face_location; 41 | typedef boost::graph_traits Graph_traits; 42 | typedef Graph_traits::vertex_iterator vertex_iterator; 43 | typedef Graph_traits::face_iterator face_iterator; 44 | typedef Graph_traits::face_descriptor face_descriptor; 45 | typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; 46 | typedef CGAL::AABB_traits AABB_face_graph_traits; 47 | typedef CGAL::AABB_tree Tree; 48 | typedef Traits::Barycentric_coordinate Barycentric_coordinate; 49 | typedef Traits::FT FT; 50 | typedef Traits::Point_3 Point_3; 51 | typedef Traits::Vector_3 Vector_3; 52 | 53 | 54 | void calculate_mean_var(std::vector v){ 55 | double sum = std::accumulate(std::begin(v), std::end(v), 0.0); 56 | double mean = sum / v.size(); 57 | double accum = 0.0; 58 | std::for_each (std::begin(v), std::end(v), [&](const double d) { 59 | accum += (d - mean) * (d - mean); 60 | }); 61 | double stdev = sqrt(accum / (v.size()-1)); 62 | auto max = std::max_element(std::begin(v), std::end(v)); 63 | auto min = std::min_element(std::begin(v), std::end(v)); 64 | std::cout<<"Mean: "< *pred_face_locations = (std::vector *)(((void**)args)[1]); 72 | std::vector *sample_face_locations = (std::vector *)(((void**)args)[2]); 73 | std::vector *sample_points = (std::vector *)(((void**)args)[3]); 74 | std::vector *pred_map_points = (std::vector *)(((void**)args)[4]); 75 | std::vector > *density = (std::vector > *)(((void**)args)[5]); 76 | std::vector *radius = (std::vector *)(((void**)args)[6]); 77 | //[lower,upper) 78 | int lower = *(int*)(((void**)args)[7]); 79 | int upper = *(int*)(((void**)args)[8]); 80 | std::cout<< "In this function, handle "< radius_cnt; 85 | 86 | for (int sample_iter =lower;sample_iter((*radius).size(),0); 90 | for (unsigned int pred_iter=0;pred_itersize();pred_iter++){ 91 | dist1 = CGAL::squared_distance((*sample_points)[sample_iter],(*pred_map_points)[pred_iter]); 92 | if (CGAL::sqrt(dist1)>(*radius).back()){ 93 | continue; 94 | } 95 | dist2 = shortest_paths.shortest_distance_to_source_points((*pred_face_locations)[pred_iter].first,(*pred_face_locations)[pred_iter].second).first; 96 | for (unsigned int i=0;i<(*radius).size();i++){ 97 | if (dist2 <= (*radius)[i]){ 98 | radius_cnt[i] +=1; 99 | } 100 | } 101 | } 102 | if (sample_iter%20==0){ 103 | std::cout << "ID "<& areas, float number){ 111 | for (unsigned int i=0;i=areas[i] && number < areas[i+1]){ 113 | return i; 114 | } 115 | } 116 | return 0; 117 | } 118 | 119 | 120 | int main(int argc, char* argv[]){ 121 | // If not given the sample position, we will randomly sample THREAD*10 disks 122 | // THREAD is the number of threads 123 | if (argc!=3){ 124 | std::cout << "Usage: ./evaluation mesh_path prediction_path [sampling_seed]\n"; 125 | return -1; 126 | } 127 | 128 | // read input tmesh 129 | Triangle_mesh tmesh; 130 | std::cout << "Read "<> tmesh; 133 | input.close(); 134 | face_iterator fit, fit_end; 135 | boost::tie(fit, fit_end) = faces(tmesh); 136 | std::vector face_vector(fit, fit_end); //face_vector of the tmesh 137 | const int face_num = face_vector.size(); 138 | std::cout <<"This mesh has "<< face_num << " faces"< face_areas(face_num+1,0.0); 146 | for (unsigned int i=0;i("f:normals", CGAL::NULL_VECTOR).first; 153 | //CGAL::Polygon_mesh_processing::compute_face_normals(tmesh,fnormals, 154 | // CGAL::Polygon_mesh_processing::parameters::vertex_point_map(tmesh.points()).geom_traits(Kernel())); 155 | 156 | //read the prediction points 157 | std::vector pred_points; 158 | std::vector normals; 159 | std::ifstream stream(argv[2]); 160 | Point_3 p; 161 | Vector_3 v; 162 | int ii=0; 163 | while(stream >> p){ 164 | if (ii%2==0) 165 | pred_points.push_back(p); 166 | //std::cout<(tree); 181 | std::vector pred_face_locations(pred_cnt); 182 | std::vector pred_map_points(pred_cnt); 183 | std::vector nearest_distance(pred_cnt); 184 | std::vector gt_normals(pred_cnt); 185 | 186 | // find the basic file name of the mesh 187 | std::string pre = argv[2]; 188 | std::string token1; 189 | if (pre.find('/')== std::string::npos){ 190 | token1 = pre; 191 | } 192 | else{ 193 | token1 = pre.substr(pre.rfind("/")+1); 194 | } 195 | std::string token2 = pre.substr(0,pre.rfind(".")); 196 | const char* prefix = token2.c_str(); 197 | char filename[2048]; 198 | sprintf(filename, "%s_point2mesh_distance.xyz",prefix); 199 | std::ofstream distace_output(filename); 200 | 201 | 202 | // calculate the point2surface distance for each predicted point 203 | for (int i=0;i(pred_points[i],tree); 206 | pred_face_locations[i] = location; 207 | // convert the face location to xyz coordinate 208 | pred_map_points[i] = shortest_paths.point(location.first,location.second); 209 | //calculate the distance 210 | nearest_distance[i] = CGAL::sqrt(CGAL::squared_distance(pred_points[i],pred_map_points[i])); 211 | distace_output << pred_points[i][0]<<" "< sample_face_locations; 220 | if (argc>3){ //read sampling seeds from file 221 | std::ifstream sample_input(argv[3]); 222 | int id; double x1,x2,x3; 223 | while(sample_input >> id >> x1 >> x2>> x3){ 224 | sample_face_locations.push_back(Face_location(face_vector[id],{{x1,x2,x3}})); 225 | } 226 | } 227 | else{ // randomly pick the seeds on the surface of the mesh 228 | int id; double x1,x2,x3,total; 229 | CGAL::Random rand; 230 | sprintf(filename, "%s_sampling_seed.txt",prefix); 231 | std::ofstream sample_output(filename); 232 | for (int i=0;i sample_points(sample_cnt); 245 | for (unsigned int i=0;i precentage={0.002,0.004,0.006,0.008,0.010,0.012,0.015}; 253 | std::vector radius(precentage.size()); 254 | for (unsigned int i=0;i > density(sample_cnt,std::vector(radius.size())); 260 | auto start = std::chrono::system_clock::now(); 261 | pthread_t tid[THREAD]; 262 | int inds[THREAD+1]; 263 | int interval = ceil(sample_cnt*1.0/THREAD); 264 | for (int i=0;i elapsed_seconds = end-start; 302 | std::time_t end_time = std::chrono::system_clock::to_time_t(end); 303 | std::cout << "finished computation at " << std::ctime(&end_time) 304 | << "elapsed time: " << elapsed_seconds.count() << "s\n";*/ 305 | return 0; 306 | } 307 | 308 | -------------------------------------------------------------------------------- /loss.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import os 3 | import numpy as np 4 | from sklearn.neighbors import KDTree 5 | 6 | def nn_distance(xyz1,xyz2): 7 | #xyz1(B,3,N1) 8 | #xyz2(B,3,N2) 9 | square_dist=torch.sum((xyz1.unsqueeze(-1)-xyz2.unsqueeze(-2))**2,dim=1,keepdim=False) 10 | dist1,idx1=square_dist.min(dim=-1,keepdim=False) 11 | dist2,idx2=square_dist.min(dim=-2,keepdim=False) 12 | 13 | return dist1,idx1,dist2,idx2 14 | 15 | def cd_loss(gen,gt,radius,ration=0.5): 16 | dists_forward,idx1,dists_backward,idx2=nn_distance(gt,gen) 17 | cd_dist = 0.5*dists_forward + 0.5*dists_backward 18 | cd_dist = torch.mean(cd_dist, dim=1) 19 | 20 | cd_dist_norm = cd_dist/radius 21 | cd_loss=torch.mean(cd_dist_norm) 22 | 23 | return cd_loss,idx1,idx2 24 | 25 | def abs_dense_normal_loss(gen_normal, gt_normal, idx1, idx2, radius, ratio=0.5): 26 | #gen_normal B,3,N 27 | fwd1=torch.gather(gen_normal,dim=2,index=idx1.unsqueeze(1).repeat(1,3,1)) 28 | pos_dist1 = torch.mean((gt_normal - fwd1) ** 2,dim=1) 29 | neg_dist1 = torch.mean((gt_normal + fwd1) ** 2,dim=1) 30 | 31 | dist1=torch.where(pos_dist1 (batch_size*num_points, num_dims) # batch_size * num_points * k + range(0, batch_size*num_points) 36 | feature = x.view(batch_size * num_points, -1)[idx, :] 37 | feature = feature.view(batch_size, num_points, k, num_dims) 38 | x = x.view(batch_size, num_points, 1, num_dims).repeat(1, 1, k, 1) 39 | 40 | feature = torch.cat((feature - x, x), dim=3).permute(0, 3, 1, 2).contiguous() 41 | 42 | return feature 43 | 44 | 45 | class pugeonet(nn.Module): 46 | def __init__(self, up_ratio, knn=30, fd=64, fD=1024): 47 | super(pugeonet, self).__init__() 48 | self.knn = knn 49 | self.up_ratio = up_ratio 50 | self.feat_list = ["expand", "net_max_1", "net_mean_1", 51 | "out3", "net_max_2", "net_mean_2", 52 | "out5", "net_max_3", "net_mean_3", 53 | "out7", "out8"] 54 | #self.input_transform_net = input_transform_net(6) 55 | 56 | self.dgcnn_conv1 = nn.Sequential(nn.Conv2d(6, fd, kernel_size=1), 57 | nn.BatchNorm2d(fd), 58 | nn.LeakyReLU(negative_slope=0.2)) 59 | self.dgcnn_conv2 = nn.Sequential(nn.Conv2d(fd, fd, kernel_size=1), 60 | nn.BatchNorm2d(fd), 61 | nn.LeakyReLU(negative_slope=0.2)) 62 | self.dgcnn_conv3 = nn.Sequential(nn.Conv1d(fd + fd, fd, kernel_size=1), 63 | nn.BatchNorm1d(fd), 64 | nn.LeakyReLU(negative_slope=0.2)) 65 | self.dgcnn_conv4 = nn.Sequential(nn.Conv2d(fd + fd, fd, kernel_size=1), 66 | nn.BatchNorm2d(fd), 67 | nn.LeakyReLU(negative_slope=0.2)) 68 | self.dgcnn_conv5 = nn.Sequential(nn.Conv1d(fd + fd, fd, kernel_size=1), 69 | nn.BatchNorm1d(fd), 70 | nn.LeakyReLU(negative_slope=0.2)) 71 | self.dgcnn_conv6 = nn.Sequential(nn.Conv2d(fd + fd, fd, kernel_size=1), 72 | nn.BatchNorm2d(fd), 73 | nn.LeakyReLU(negative_slope=0.2)) 74 | self.dgcnn_conv7 = nn.Sequential(nn.Conv1d(fd + fd, fd, kernel_size=1), 75 | nn.BatchNorm1d(fd), 76 | nn.LeakyReLU(negative_slope=0.2)) 77 | self.dgcnn_conv8 = nn.Sequential(nn.Conv1d(fd + fd + fd, fD, kernel_size=1), 78 | nn.BatchNorm1d(fD), 79 | nn.LeakyReLU(negative_slope=0.2)) 80 | 81 | self.attention_conv1 = nn.Sequential(nn.Conv1d(fd * 9 + fD * 2, 128, kernel_size=1), 82 | nn.BatchNorm1d(128), 83 | nn.LeakyReLU(negative_slope=0.2)) 84 | self.attention_conv2 = nn.Sequential(nn.Conv1d(128, 64, kernel_size=1), 85 | nn.BatchNorm1d(64), 86 | nn.LeakyReLU(negative_slope=0.2)) 87 | self.attention_conv3 = nn.Sequential(nn.Conv1d(64, len(self.feat_list), kernel_size=1), 88 | nn.BatchNorm1d(len(self.feat_list)), 89 | nn.LeakyReLU(negative_slope=0.2)) 90 | 91 | self.concat_conv = nn.Sequential(nn.Conv1d(fd * 9 + fD * 2, 256, kernel_size=1), 92 | nn.BatchNorm1d(256), 93 | nn.LeakyReLU(negative_slope=0.2)) 94 | self.dg1 = nn.Sequential() 95 | 96 | self.uv_conv1 = nn.Sequential(nn.Conv1d(256, up_ratio * 2, kernel_size=1)) 97 | 98 | self.patch_conv1 = nn.Sequential(nn.Conv1d(256, 9, kernel_size=1)) 99 | 100 | self.normal_offset_conv1 = nn.Sequential(nn.Conv1d(256, up_ratio * 3, kernel_size=1)) 101 | 102 | self.up_layer1 = nn.Sequential(nn.Conv2d(256 + 3, 128, kernel_size=1), 103 | nn.BatchNorm2d(128), 104 | nn.LeakyReLU(negative_slope=0.2)) 105 | 106 | self.up_dg1 = nn.Sequential() 107 | self.up_layer2 = nn.Sequential(nn.Conv2d(128, 128, kernel_size=1), 108 | nn.BatchNorm2d(128), 109 | nn.LeakyReLU(negative_slope=0.2)) 110 | self.up_dg2 = nn.Sequential() 111 | 112 | self.fc_layer = nn.Conv2d(128, 1, kernel_size=1) 113 | 114 | def forward(self, x): 115 | # x:(B,3,N) 116 | batch_size = x.size(0) 117 | num_point = x.size(2) 118 | edge_feature = get_graph_feature(x, k=self.knn) 119 | '''transform = self.input_transform_net(edge_feature) 120 | 121 | point_cloud_transformed = torch.bmm(x.transpose(1, 2), transform) 122 | point_cloud_transformed = point_cloud_transformed.transpose(1, 2) 123 | edge_feature = get_graph_feature(point_cloud_transformed, k=self.knn)''' 124 | out1 = self.dgcnn_conv1(edge_feature) 125 | out2 = self.dgcnn_conv2(out1) 126 | net_max_1 = out2.max(dim=-1, keepdim=False)[0] 127 | net_mean_1 = out2.mean(dim=-1, keepdim=False) 128 | 129 | out3 = self.dgcnn_conv3(torch.cat((net_max_1, net_mean_1), 1)) 130 | 131 | edge_feature = get_graph_feature(out3, k=self.knn) 132 | out4 = self.dgcnn_conv4(edge_feature) 133 | 134 | net_max_2 = out4.max(dim=-1, keepdim=False)[0] 135 | net_mean_2 = out4.mean(dim=-1, keepdim=False) 136 | 137 | out5 = self.dgcnn_conv5(torch.cat((net_max_2, net_mean_2), 1)) 138 | 139 | edge_feature = get_graph_feature(out5) 140 | out6 = self.dgcnn_conv6(edge_feature) 141 | 142 | net_max_3 = out6.max(dim=-1, keepdim=False)[0] 143 | net_mean_3 = out6.mean(dim=-1, keepdim=False) 144 | 145 | out7 = self.dgcnn_conv7(torch.cat((net_max_3, net_mean_3), dim=1)) 146 | 147 | out8 = self.dgcnn_conv8(torch.cat((out3, out5, out7), 1)) 148 | 149 | out_max = out8.max(dim=-1, keepdim=True)[0] # B,C 150 | 151 | expand = out_max.repeat(1, 1, num_point) 152 | 153 | concat_unweight = torch.cat((expand, # 1024 154 | net_max_1, # 64 155 | net_mean_1, 156 | out3, # 64 157 | net_max_2, 158 | net_mean_2, 159 | out5, # 64 160 | net_max_3, 161 | net_mean_3, 162 | out7, # 64 163 | out8 # 1024 164 | ), dim=1) # (B,C,N) 165 | out_attention = self.attention_conv1(concat_unweight) 166 | out_attention = self.attention_conv2(out_attention) 167 | out_attention = self.attention_conv3(out_attention) # (B,C,N) 168 | out_attention = out_attention.max(dim=-1, keepdim=False)[0] # (B,C) 169 | out_attention = F.softmax(out_attention, dim=-1) # (B,C) 170 | 171 | for i in range(len(self.feat_list)): 172 | tmp1 = out_attention[:, i] 173 | dim = eval('%s.size(1)' % self.feat_list[i]) 174 | tmp2 = tmp1.unsqueeze(-1).repeat(1, dim) 175 | if i == 0: 176 | attention_weight = tmp2 177 | else: 178 | attention_weight = torch.cat((attention_weight, tmp2), axis=-1) 179 | attention_weight = attention_weight.unsqueeze(-1) 180 | concat = attention_weight * concat_unweight # (B,C,N) 181 | concat = self.concat_conv(concat) 182 | concat = self.dg1(concat) # (B,C,N) 183 | 184 | uv_2d = self.uv_conv1(concat) 185 | uv_2d = uv_2d.reshape(batch_size, self.up_ratio, 2, num_point) # B,U,2,N 186 | uv_2d = torch.cat((uv_2d, torch.zeros((batch_size, self.up_ratio, 1, num_point)).to(x.device)), 187 | dim=2) # B,U,3,N 188 | 189 | affine_T = self.patch_conv1(concat) 190 | affine_T = affine_T.reshape(batch_size, 3, 3, num_point) # B,3,3,N 191 | 192 | uv_3d = torch.matmul(uv_2d.permute(0, 3, 1, 2), affine_T.permute(0, 3, 1, 2)) # B, N, U, 3 193 | uv_3d = uv_3d.permute(0, 2, 3, 1) # (B,U,3,N) 194 | uv_3d = x.unsqueeze(1).repeat(1, self.up_ratio, 1, 1) + uv_3d # (B,U,3,N) 195 | 196 | uv_3d = uv_3d.transpose(1,2) #(B,3,U,N) 197 | 198 | # B,3,U,N 199 | #uv_3d = uv_3d.permute(0, 2, 1, 3).reshape(batch_size, 3, self.up_ratio * num_point) 200 | 201 | # norm predict 202 | dense_normal_offset = self.normal_offset_conv1(concat) 203 | dense_normal_offset = dense_normal_offset.reshape(batch_size, self.up_ratio, 3, num_point) 204 | 205 | sparse_normal = torch.from_numpy(np.array([0, 0, 1]).astype(np.float32)).squeeze().reshape(1, 1, 3, 1).repeat( 206 | batch_size, 1, 1, num_point).to(x.device) 207 | 208 | sparse_normal = torch.matmul(sparse_normal.permute(0, 3, 1, 2), affine_T.permute(0, 3, 1, 2)) 209 | sparse_normal = sparse_normal.permute(0, 2, 3, 1) 210 | sparse_normal = F.normalize(sparse_normal, dim=2) # B,1,3,N 211 | 212 | dense_normal = sparse_normal.repeat(1, self.up_ratio, 1, 1, ) + dense_normal_offset 213 | dense_normal = F.normalize(dense_normal, dim=2) # B, U, 3, N 214 | 215 | dense_normal=dense_normal.transpose(1,2).reshape(batch_size,3,-1) #(B,U,3,N)->(B,3,U,N)->(B,3,U*N) 216 | 217 | grid = uv_3d #(B,3,U,N) 218 | 219 | #concat_up = concat.repeat(1, 1, self.up_ratio) 220 | concat_up=concat.unsqueeze(2).repeat(1,1,self.up_ratio,1) #(B,C,U,N) 221 | concat_up = torch.cat((concat_up, grid), axis=1) #(B,C+3,U,N) 222 | 223 | concat_up = self.up_layer1(concat_up) 224 | concat_up = self.up_dg1(concat_up) 225 | concat_up = self.up_layer2(concat_up) 226 | concat_up = self.up_dg2(concat_up) 227 | 228 | coord_z = self.fc_layer(concat_up) #(B,1,U,N) 229 | 230 | 231 | coord_z = torch.cat((torch.zeros_like(coord_z), torch.zeros_like(coord_z), coord_z), dim=1) # B,3,U,N 232 | 233 | coord_z = torch.matmul(coord_z.permute(0, 3, 2, 1), affine_T.permute(0, 3, 1, 2)) # B,N,U,3 234 | 235 | coord = uv_3d + coord_z.permute(0, 3, 2, 1) #(B,3,U,N) 236 | 237 | coord=coord.reshape(batch_size,3,-1) 238 | 239 | return {'dense_xyz':coord, 'dense_normal':dense_normal, 'sparse_normal':sparse_normal.squeeze(1)} 240 | 241 | -------------------------------------------------------------------------------- /pc_util.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | from sklearn.neighbors import NearestNeighbors 5 | import numpy as np 6 | 7 | 8 | def farthest_point_sample(point, npoint): 9 | """ 10 | Input: 11 | xyz: pointcloud data, [N, D] 12 | npoint: number of samples 13 | Return: 14 | centroids: sampled pointcloud index, [npoint, D] 15 | """ 16 | N, D = point.shape 17 | xyz = point[:, :3] 18 | centroids = np.zeros((npoint,)) 19 | distance = np.ones((N,)) * 1e10 20 | farthest = np.random.randint(0, N) 21 | for i in range(npoint): 22 | centroids[i] = farthest 23 | centroid = xyz[farthest, :] 24 | dist = np.sum((xyz - centroid) ** 2, -1) 25 | mask = dist < distance 26 | distance[mask] = dist[mask] 27 | farthest = np.argmax(distance, -1) 28 | point = point[centroids.astype(np.int32)] 29 | return point 30 | 31 | def group_points(xyz1,xyz2,k): 32 | #xyz2: keypoints 33 | #print(xyz1.shape) 34 | #print(xyz2.shape) 35 | square_dists=np.sum((np.expand_dims(xyz1,0)-np.expand_dims(xyz2,1))**2,axis=-1,keepdims=False) 36 | final_result=np.zeros((xyz2.shape[0],k,3),dtype=np.float32) 37 | idx=np.argsort(square_dists,axis=1)[:,0:k] #N2,k 38 | for i in range(idx.shape[0]): 39 | final_result[i,:,:]=xyz1[idx[i],:] 40 | return final_result 41 | 42 | 43 | def group_points_with_normal(xyz1,xyz2,k): 44 | #xyz2: keypoints 45 | #print(xyz1.shape) 46 | #print(xyz2.shape) 47 | square_dists=np.sum((np.expand_dims(xyz1[:,0:3],0)-np.expand_dims(xyz2[:,0:3],1))**2,axis=-1,keepdims=False) 48 | final_result=np.zeros((xyz2.shape[0],k,xyz2.shape[-1]),dtype=np.float32) 49 | idx=np.argsort(square_dists,axis=1)[:,0:k] #N2,k 50 | for i in range(idx.shape[0]): 51 | final_result[i,:,:]=xyz1[idx[i],:] 52 | return final_result 53 | 54 | 55 | 56 | 57 | def extract_knn_patch(queries, pc, k): 58 | """ 59 | queries [M, C] 60 | pc [P, C] 61 | """ 62 | knn_search = NearestNeighbors(n_neighbors=k, algorithm='auto') 63 | knn_search.fit(pc) 64 | knn_idx = knn_search.kneighbors(queries, return_distance=False) 65 | k_patches = np.take(pc, knn_idx, axis=0) # M, K, C 66 | return k_patches 67 | 68 | 69 | """def knn_point(k, xyz1, xyz2): 70 | ''' 71 | Input: 72 | k: int32, number of k in k-nn search 73 | xyz1: (batch_size, ndataset, c) float32 array, input points 74 | xyz2: (batch_size, npoint, c) float32 array, query points 75 | Output: 76 | val: (batch_size, npoint, k) float32 array, L2 distances 77 | idx: (batch_size, npoint, k) int32 array, indices to input points 78 | ''' 79 | # b = xyz1.get_shape()[0].value 80 | # n = xyz1.get_shape()[1].value 81 | # c = xyz1.get_shape()[2].value 82 | # m = xyz2.get_shape()[1].value 83 | # xyz1 = tf.tile(tf.reshape(xyz1, (b,1,n,c)), [1,m,1,1]) 84 | # xyz2 = tf.tile(tf.reshape(xyz2, (b,m,1,c)), [1,1,n,1]) 85 | xyz1 = tf.expand_dims(xyz1, axis=1) 86 | xyz2 = tf.expand_dims(xyz2, axis=2) 87 | dist = tf.reduce_sum((xyz1 - xyz2) ** 2, -1) 88 | 89 | # outi, out = select_top_k(k, dist) 90 | # idx = tf.slice(outi, [0,0,0], [-1,-1,k]) 91 | # val = tf.slice(out, [0,0,0], [-1,-1,k]) 92 | 93 | val, idx = tf.nn.top_k(-dist, k=k) # ONLY SUPPORT CPU 94 | return val, idx""" 95 | 96 | 97 | def normalize_point_cloud(input): 98 | """ 99 | input: pc [N, P, 3] 100 | output: pc, centroid, furthest_distance 101 | """ 102 | if len(input.shape) == 2: 103 | axis = 0 104 | elif len(input.shape) == 3: 105 | axis = 1 106 | centroid = np.mean(input, axis=axis, keepdims=True) 107 | input = input - centroid 108 | furthest_distance = np.amax( 109 | np.sqrt(np.sum(input ** 2, axis=-1, keepdims=True)), axis=axis, keepdims=True) 110 | input = input / furthest_distance 111 | return input, centroid, furthest_distance 112 | -------------------------------------------------------------------------------- /prepare_data/mesh2ply.py: -------------------------------------------------------------------------------- 1 | import os 2 | import open3d as o3d 3 | import numpy as np 4 | 5 | 6 | def mesh2pc(num_point,mode,base_data_path): 7 | #num_point=20000 8 | #mode='train' 9 | data_path=os.path.join(base_data_path,'%s_mesh'%mode) 10 | #data_path='D:\\PUGEO\\mesh\\%s_mesh'%mode 11 | shape_name_list=os.listdir(data_path) 12 | save_path=os.path.join(data_path,'..','%s_%d'%(mode,num_point)) 13 | 14 | try: 15 | os.mkdir(save_path) 16 | except: 17 | pass 18 | 19 | for shape_name in shape_name_list: 20 | 21 | ms=o3d.io.read_triangle_mesh(os.path.join(data_path,shape_name)) 22 | point_cloud=ms.sample_points_poisson_disk(num_point,use_triangle_normal=True) 23 | #o3d.visualization.draw_geometries([point_cloud]) 24 | #print(pc.shape) 25 | pc=np.array(point_cloud.points).astype(np.float32) 26 | normal=np.array(point_cloud.normals).astype(np.float32) 27 | print(shape_name,num_point) 28 | #print(pc.shape) 29 | #print(normal.shape) 30 | np.savetxt(os.path.join(save_path,shape_name[:-4]+'.xyz'),np.concatenate((pc,normal),axis=-1)) 31 | 32 | 33 | if __name__=='__main__': 34 | base_data_path='D:\\PUGEO\\mesh' 35 | num_point_list=[5000,20000,40000,60000,80000] 36 | mode_list=['train','test'] 37 | 38 | for num_point in num_point_list: 39 | for mode in mode_list: 40 | mesh2pc(num_point, mode, base_data_path) -------------------------------------------------------------------------------- /prepare_data/ply2patch.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import os 3 | import open3d as o3d 4 | from pc_util import extract_knn_patch, normalize_point_cloud, farthest_point_sample, group_points,group_points_with_normal 5 | 6 | 7 | 8 | raw_data_path='D:\\PUGEO\\mesh' 9 | save_root_path='D:\\PUGEO\\pytorch_data' 10 | 11 | 12 | basic_num=5000 13 | num_point_per_patch=256 14 | num_patch=int(basic_num/num_point_per_patch*3) 15 | 16 | 17 | def build_dataset(up_ratio_list,mode): 18 | for up_ratio in up_ratio_list: 19 | try: 20 | os.mkdir(os.path.join(save_root_path,'%d'%up_ratio)) 21 | 22 | except: 23 | pass 24 | try: 25 | os.mkdir(os.path.join(save_root_path, 'basic')) 26 | except: 27 | pass 28 | 29 | input_data_path_list =os.listdir(os.path.join(raw_data_path, '%s_%d' % (mode, int(basic_num)))) 30 | #label_data_path_list =os.listdir( os.path.join(raw_data_path,'%s_%d'%(mode,int(basic_num*up_ratio)))) 31 | i=0 32 | for input_data_name in input_data_path_list: 33 | input_data=np.loadtxt(os.path.join(os.path.join(raw_data_path, '%s_%d' % (mode, int(basic_num)),input_data_name))) 34 | xyz,centroid,furthest_distance=normalize_point_cloud(input_data[:,0:3]) 35 | input_data[:,0:3]=xyz 36 | centroid_points=farthest_point_sample(input_data,num_patch) 37 | input_patches=group_points_with_normal(input_data,centroid_points,num_point_per_patch) 38 | normalized_input_patches_xyz,centroid_patches,furthest_distance_patches=normalize_point_cloud(input_patches[:,:,0:3]) 39 | input_patches[:,:,0:3]=normalized_input_patches_xyz 40 | np.save(os.path.join(save_root_path,'basic','%d.npy'%i),input_patches) 41 | for up_ratio in up_ratio_list: 42 | label_data=np.loadtxt(os.path.join(os.path.join(raw_data_path, '%s_%d' % (mode, int(basic_num*up_ratio)),input_data_name))) 43 | xyz=(label_data[:,0:3]-centroid)/furthest_distance 44 | label_data[:,0:3]=xyz 45 | label_patches=group_points_with_normal(label_data,centroid_points,num_point_per_patch*up_ratio) 46 | label_patches_xyz=(label_patches[:,:,0:3]-centroid_patches)/furthest_distance_patches 47 | label_patches[:,:,0:3]=label_patches_xyz 48 | np.save(os.path.join(save_root_path,'%d'%up_ratio,'%d.npy'%i),label_patches) 49 | print(input_data_name,up_ratio) 50 | i=i+1 51 | 52 | if __name__=='__main__': 53 | up_ratio_list = [4, 8, 12, 16] 54 | build_dataset(up_ratio_list,'train') --------------------------------------------------------------------------------