summaryrefslogtreecommitdiff
path: root/candle-kernels
diff options
context:
space:
mode:
authorNicolas Patry <patry.nicolas@protonmail.com>2023-08-25 10:49:22 +0000
committerNicolas Patry <patry.nicolas@protonmail.com>2023-08-25 10:49:22 +0000
commitdb8bab8b7a10e161339a1e9c51c503028a66cb0b (patch)
treeaa02a991509e4e0adc3f9c5d3daef271efb3b8cf /candle-kernels
parentbc131b402b09887748141da99c942b547f02a4fc (diff)
downloadcandle-db8bab8b7a10e161339a1e9c51c503028a66cb0b.tar.gz
candle-db8bab8b7a10e161339a1e9c51c503028a66cb0b.tar.bz2
candle-db8bab8b7a10e161339a1e9c51c503028a66cb0b.zip
Different casting ?
Diffstat (limited to 'candle-kernels')
-rw-r--r--candle-kernels/src/cast.cu4
1 files changed, 2 insertions, 2 deletions
diff --git a/candle-kernels/src/cast.cu b/candle-kernels/src/cast.cu
index 0c4ddbc6..3e1f5414 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] = 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] = DST_TYPENAME(inp[strided_i]); \
} \
} \
} \