Gpu-Accelerated Terrain Processing
Total Page:16
File Type:pdf, Size:1020Kb
GPU-ACCELERATED TERRAIN PROCESSING By Wenli Li A Dissertation Submitted to the Graduate Faculty of Rensselaer Polytechnic Institute in Partial Fulfillment of the Requirements for the Degree of DOCTOR OF PHILOSOPHY Major Subject: COMPUTER SCIENCE Examining Committee: W. Randolph Franklin, Dissertation Adviser Christopher D. Carothers, Member Barbara M. Cutler, Member Richard J. Radke, Member Charles V. Stewart, Member Rensselaer Polytechnic Institute Troy, New York July 2016 (For Graduation August 2016) c Copyright 2016 by Wenli Li All Rights Reserved ii CONTENTS LIST OF TABLES . vi LIST OF FIGURES . ix ABSTRACT . xi ACKNOWLEDGMENT . xiii 1. Introduction . 1 2. Background and Related Work . 4 2.1 Terrain and Visibility . 4 2.2 CUDA . 7 2.3 ODETLAP . 8 2.4 Spatial Interpolation . 13 2.5 Spatial Data Compression . 20 3. 1D ODETLAP Approximation and Compression . 23 3.1 1D ODETLAP Approximation . 23 3.2 1D ODETLAP Compression . 25 3.3 Suitability of Datasets . 26 3.4 Summary . 28 4. 2D ODETLAP Approximation . 29 4.1 GPU Acceleration . 29 4.2 ODETLAP Approximation, Natural Neighbor Interpolation, and Ra- dial Basis Function Interpolation . 31 4.3 Summary . 36 5. 2D ODETLAP Compression . 38 5.1 2D Datasets . 38 5.2 The Simple Algorithm . 38 5.3 Adding and Removing Points . 46 5.4 Optimizing Point Values . 47 5.5 Anterior Optimizations . 55 iii 5.6 Posterior Optimizations . 57 5.7 Anterior and Posterior Optimizations (the Complex Algorithm) . 57 5.8 Compressing Selected Points . 60 5.9 Regular Points . 64 5.10 JPEG 2000 . 65 5.11 Summary . 72 6. 3D ODETLAP Compression . 74 6.1 3D Datasets . 74 6.2 The Simple Algorithm . 75 6.3 Adding and Removing Points . 77 6.4 Optimizing Point Values . 77 6.5 Anterior Optimizations . 78 6.6 Posterior Optimizations . 78 6.7 The Complex Algorithm . 79 6.8 Compressing Selected Points . 80 6.9 Regular Points . 82 6.10 JP3D . 83 6.11 Summary . 85 7. 3D Segmented ODETLAP Compression . 87 7.1 Introduction . 87 7.2 The Algorithm . 89 7.3 Results . 93 7.4 Evaluation . 98 7.5 Summary . 101 8. GPU-Accelerated Multiple Observer Siting . 102 8.1 Introduction . 102 8.2 Multiple Observer Siting . 104 8.3 Optimization . 107 8.4 Parallelization . 109 8.5 Results and Discussion . 112 8.6 Summary . 118 iv 9. Conclusions and Future Work . 120 REFERENCES . 122 v LIST OF TABLES 4.1 Average running time in seconds and device memory usage in MB, using different sparse matrix formats . 30 4.2 Average running time in seconds and device memory usage in MB, using different iterative solvers . 31 4.3 Average running time in seconds and GPU to CPU speedups . 31 4.4 Average elevation, slope, and curvature errors of ODETLAP approxima- tion on the three tests . 33 4.5 Average elevation, slope, and curvature errors of natural neighbor inter- polation on the three tests . 35 4.6 Average elevation, slope, and curvature errors of multiquadric RBF interpolation/approximation on the three tests . 36 5.1 Statistics of the 2D datasets . 39 5.2 Elevation, slope, and curvature errors of the simple algorithm and different initial sets, dataset n43w074 . 41 5.3 Elevation, slope, and curvature errors of the simple algorithm and different Rs, dataset n43w074 . 41 5.4 Elevation, slope, and curvature errors of the simple algorithm and two smoothing factors, dataset n43w074 . 42 5.5 Elevation, slope, and curvature errors of the simple algorithm and a varying R, dataset n43w074 . 43 5.6 Elevation, slope, and curvature errors of the simple algorithm and different averaging equations, dataset n43w074 . 44 5.7 Elevation, slope, and curvature errors of Algorithms 5.1 and 5.2, dataset n43w074 . 47 5.8 Elevation, slope, and curvature errors of Algorithm 5.3 and different ωs, dataset n43w074 . 49 5.9 Elevation, slope, and curvature errors of Algorithms 5.1–5.3 and different accuracy and precision settings, dataset n43w074 . 51 5.10 Elevation, slope, and curvature errors of Algorithm 5.4, dataset n43w074 57 vi 5.11 Elevation, slope, and curvature errors of Algorithms 5.3–5.5, dataset n43w074 . 58 5.12 Elevation, slope, and curvature errors of the complex algorithm and a varying R . 60 5.13 Elevation, slope, and curvature errors of the simple algorithm and quantization, dataset n43w074 . 61 5.14 Elevation, slope, and curvature errors of the complex algorithm and quantization, dataset n43w074 . 61 5.15 Compressing the selected-point mask, dataset n43w074 . 62 5.16 Compressing the values of selected points, dataset n43w074 . 63 5.17 Elevation, slope, and curvature errors of ODETLAP compression . 66 5.18 Compression pipelines and compressed sizes of ODETLAP compression 66 5.19 Specified compression ratio, compressed size, and compression errors of JPEG 2000, dataset n43w074 . 67 5.20 Relative elevation/value errors of ODETLAP compression to JPEG 2000 72 6.1 Statistics of the 3D datasets . 75 6.2 Value and gradient errors of the simple algorithm and different Rs, dataset mri1 . 76 6.3 Value and gradient errors of the simple algorithm and two smoothing factors, dataset mri1 . 77 6.4 Value and gradient errors of the simple algorithm and a varying R, dataset mri1 . 77 6.5 Value and gradient errors of Algorithms 5.1 and 5.2, dataset mri1 . 78 6.6 Value and gradient errors of Algorithm 5.3 and different ωs, dataset mri1 78 6.7 Value and gradient errors of Algorithm 5.4, dataset mri1 . 79 6.8 Value and gradient errors of Algorithms 5.3–5.5, dataset mri1 . 79 6.9 Value and gradient errors of the complex algorithm and a varying R . 79 6.10 Value and gradient errors of the simple algorithm and quantization, dataset mri1 . 80 6.11 Value and gradient errors of the complex algorithm and quantization, dataset mri1 . 80 vii 6.12 Compressing the selected-point mask, dataset mri1 . 81 6.13 Compressing the values of selected points, dataset mri1 . 81 6.14 Value and gradient errors of ODETLAP compression . 82 6.15 Compression pipelines and compressed sizes of ODETLAP compression 83 6.16 Relative value errors of ODETLAP compression to JP3D . 86 7.1 Statistics of the datasets. Empty: the percentage of empty data points for the atmospheric datasets or the percentage of zero data points for the MRI dataset. 94 7.2 Results of segmented ODETLAP compression. Sizes are in bytes. 97 7.3 Smoothness measures of the datasets normalized on [0, 1], and the compression ratio for 2% target. RMSL: root-mean-square Laplacian. RMSB: root-mean-square biharmonic. 98 7.4 Interpolated compressed sizes in KB of segmented ODETLAP compres- sion and JP3D when MAXE is 2% and 1%. 101 8.1 Results of vix using 10, 50, or 250 random targets per point. interval: the interval between successive evaluation points along the line of sight. Time: the running time of CUDA vix in seconds. RMSE: the RMSE of the approximate visibility index map. Observ.: the number of observers selected for 95% coverage. 116 8.2 Results of the CUDA, OpenMP, and sequential programs, averaged over 10 runs. vix, . , total: running time in seconds. Observers: the number of observers selected for 95% coverage. 118 8.3 Speedups of the CUDA and OpenMP programs over the sequential program. 119 viii LIST.