mirror of https://github.com/jlizier/jidt
Added gpuWarmUp function to shorten latency in first GPU call.
This commit is contained in:
parent
cced321abb
commit
ff868bf79f
|
|
@ -285,3 +285,13 @@ void device_reset(void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void gpuWarmUp(void) {
|
||||
cudaSetDevice(0);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ int findRadiiAlgorithm2(float *radii, const float *data, const int *indexes,
|
|||
int computeSumDigammas(float *sumDiGammas, int *nx, int *ny, unsigned int N);
|
||||
|
||||
void device_reset(void);
|
||||
|
||||
void gpuWarmUp(void);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue