Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 65bc335

Browse files
committed
fix template
1 parent 4565402 commit 65bc335

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/common/random_generator.cu

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ void RandGenerator<gpu, float>::Seed(mshadow::Stream<gpu> *s, uint32_t seed) {
5959
s->Wait();
6060
}
6161

62-
template<>
63-
void RandGenerator<gpu, float>::AllocState(RandGenerator<gpu, float> *inst) {
62+
template<typename DType>
63+
void RandGenerator<gpu, DType>::AllocState(RandGenerator<gpu, DType> *inst) {
6464
CUDA_CALL(cudaMalloc(&inst->states_,
6565
kNumRandomStates * sizeof(curandStatePhilox4_32_10_t)));
6666
}
6767

68-
template<>
69-
void RandGenerator<gpu, float>::FreeState(RandGenerator<gpu, float> *inst) {
68+
template<typename DType>
69+
void RandGenerator<gpu, DType>::FreeState(RandGenerator<gpu, DType> *inst) {
7070
CUDA_CALL(cudaFree(inst->states_));
7171
}
7272

0 commit comments

Comments
 (0)