diff options
author | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-08-25 11:40:36 +0000 |
---|---|---|
committer | Nicolas Patry <patry.nicolas@protonmail.com> | 2023-08-25 11:40:36 +0000 |
commit | 1c1e34735e2d20f20ad17c03f01697ecaae5a8d1 (patch) | |
tree | f3623a38f3d6ebe010c2a3ad4004e2059c569880 /candle-kernels | |
parent | db8bab8b7a10e161339a1e9c51c503028a66cb0b (diff) | |
download | candle-1c1e34735e2d20f20ad17c03f01697ecaae5a8d1.tar.gz candle-1c1e34735e2d20f20ad17c03f01697ecaae5a8d1.tar.bz2 candle-1c1e34735e2d20f20ad17c03f01697ecaae5a8d1.zip |
`static_cast` ?
Diffstat (limited to 'candle-kernels')
-rw-r--r-- | candle-kernels/src/cast.cu | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/candle-kernels/src/cast.cu b/candle-kernels/src/cast.cu index 3e1f5414..0a2282fc 100644 --- a/candle-kernels/src/cast.cu +++ b/candle-kernels/src/cast.cu @@ -13,13 +13,13 @@ extern "C" __global__ void FN_NAME( \ const size_t *strides = info + num_dims; \ if (is_contiguous(num_dims, dims, strides)) { \ for (unsigned int i = blockIdx.x * blockDim.x + threadIdx.x; i < numel; i += blockDim.x * gridDim.x) { \ - out[i] = DST_TYPENAME(inp[i]); \ + out[i] = static_cast<DST_TYPENAME>(inp[i]); \ } \ } \ else { \ for (unsigned int i = blockIdx.x * blockDim.x + threadIdx.x; i < numel; i += blockDim.x * gridDim.x) { \ unsigned strided_i = get_strided_index(i, num_dims, dims, strides); \ - out[i] = DST_TYPENAME(inp[strided_i]); \ + out[i] = static_cast<DST_TYPENAME>(inp[strided_i]); \ } \ } \ } \ |