-
Notifications
You must be signed in to change notification settings - Fork 3
/
clusterGPU.cuh
50 lines (39 loc) · 2.72 KB
/
clusterGPU.cuh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef _CLUSTER_GPU_KERNEL_
#define _CLUSTER_GPU_KERNEL_
#include <cstdint>
#include <iostream>
#include <mm_malloc.h>
#include "cuda_rt_call.h"
#include "cluster.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
float memTransHDTime;
float memTransDHTime;
float memAllocTime;
float memFreeTime;
float unpackRawDataTime;
float setSeedStripsTime;
float setNCSeedStripsTime;
float setStripIndexTime;
float findBoundaryTime;
float checkClusterTime;
cudaEvent_t start, stop;
} gpu_timing_t;
void allocateSSTDataGPU(int max_strips, sst_data_t *sst_data_d, sst_data_t **pt_sst_data_d, gpu_timing_t *gpu_timing, int dev, cudaStream_t stream);
void allocateCalibDataGPU(int max_strips, calib_data_t *calib_data_d, calib_data_t **pt_calib_data_t, gpu_timing_t *gpu_timing, int dev, cudaStream_t stream);
void allocateClustDataGPU(int max_strips, clust_data_t *clust_data_d, clust_data_t **pt_clust_data_t, gpu_timing_t *gpu_timing, int dev, cudaStream_t stream);
void freeSSTDataGPU(sst_data_t *sst_data_d, sst_data_t *pt_sst_data_d, gpu_timing_t *gpu_timing, int dev, cudaStream_t stream);
void freeCalibDataGPU(calib_data_t *calib_data_d, calib_data_t *pt_calib_data_t, gpu_timing_t *gpu_timing, int dev, cudaStream_t stream);
void freeClustDataGPU(clust_data_t *clust_data_d, clust_data_t *pt_clust_data_d, gpu_timing_t *gpu_timing, int dev, cudaStream_t stream);
void cpyGPUToCPU(sst_data_t *sst_data_d, sst_data_t *pt_sst_data_d, clust_data_t *clust_data, clust_data_t *clust_data_d, gpu_timing_t *gpu_timing, cudaStream_t stream);
void cpySSTDataToGPU(sst_data_t *sst_data, sst_data_t *sst_data_d, gpu_timing_t *gpu_timing, cudaStream_t stream);
void cpyCalibDataToGPU(int max_strips, calib_data_t *calib_data, calib_data_t *calib_data_d, gpu_timing_t *gpu_timing, cudaStream_t stream);
void unpackRawDataGPU(const SiStripConditions *conditions, const SiStripConditionsGPU *conditionsGPU, const std::vector<FEDRawData>& fedRawDatav, const std::vector<FEDBuffer>& fedBufferv, const std::vector<fedId_t>& fedIndex, sst_data_t *sst_data_d, sst_data_t *pt_sst_data_d, calib_data_t *calib_data_d, calib_data_t *pt_calib_data_d, const FEDReadoutMode& mode, gpu_timing_t *gpu_timing, cudaStream_t stream);
void findClusterGPU(sst_data_t *sst_data_d, sst_data_t *pt_sst_data_d, calib_data_t *calib_data_d, calib_data_t *pt_calib_data_d, const SiStripConditionsGPU *conditions, clust_data_t *clust_data_d, clust_data_t *pt_clust_data_d, gpu_timing_t *gpu_timing, cudaStream_t stream);
void setSeedStripsNCIndexGPU(sst_data_t *sst_data_d, sst_data_t *pt_sst_data_d, calib_data_t *calib_data_d, calib_data_t *pt_calib_data_d, const SiStripConditionsGPU *conditions, gpu_timing_t *gpu_timing, cudaStream_t stream);
#ifdef __cplusplus
}
#endif
#endif