Skip to content

Commit a4f2f34

Browse files
[src] Fix compilation issue with older toolkit/compiler, add __host__ (#3900)
1 parent 6c5176c commit a4f2f34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cudafeat/feature-online-batched-cmvn-cuda-kernels.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#include <cub/cub.cuh>
1919
#include "cudafeat/feature-online-batched-cmvn-cuda-kernels.h"
2020

21-
__device__ inline float2 operator-(const float2 &a, const float2 &b) {
21+
__host__ __device__ inline float2 operator-(const float2 &a, const float2 &b) {
2222
float2 retval;
2323
retval.x = a.x - b.x;
2424
retval.y = a.y - b.y;
2525
return retval;
2626
}
27-
__device__ inline float2 operator+(const float2 &a, const float2 &b) {
27+
__host__ __device__ inline float2 operator+(const float2 &a, const float2 &b) {
2828
float2 retval;
2929
retval.x = a.x + b.x;
3030
retval.y = a.y + b.y;

0 commit comments

Comments
 (0)