-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathinit_seg.h
More file actions
16 lines (12 loc) · 826 Bytes
/
init_seg.h
File metadata and controls
16 lines (12 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "cuda.h"
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
__host__ int myCeil(int a, int b);
__host__ int CudaInitSeg(int* seg_cpu, int* seg_gpu, int* split_merge_pairs, int nPts,int sz, int xdim, int ydim, bool use_hex);
__global__ void InitHexCenter(double* centers, double H, double width, int max_nPts, int max_num_sp_x, int xdim, int ydim);
__global__ void InitHexSeg(int* seg, double* centers, int K, int nPts, int xdim);
__global__ void InitSquareSeg(int* seg, int nPts, int sz, int xdim, int ydim);
__global__ void InitSplitMerge(int* split_merge_pairs, int nPts);
__host__ bool saveArray( int* pdata, size_t length, const std::string& file_path );
__host__ bool loadArray( int* pdata, size_t length, const std::string& file_path);
__host__ int get_max(int* seg, int nPts);