Skip to content

Commit fd4eadf

Browse files
committed
Make example compile again
1 parent 8f31b9f commit fd4eadf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/vector_add/main.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ __global__ void my_kernel(
2121
int i = blockIdx.x * blockDim.x + threadIdx.x;
2222

2323
if (i * N < length) {
24-
output[i] = kf::fma(input[i], input[i], kf::cast<__half>(constant));
24+
output(i) = kf::fma(input[i], input[i], kf::cast<__half>(constant));
2525
}
2626
}
2727

@@ -82,7 +82,7 @@ int main() {
8282

8383
run_kernel<1>(n);
8484
run_kernel<2>(n);
85-
run_kernel<3>(n);
85+
// run_kernel<3>(n);
8686
run_kernel<4>(n);
8787
run_kernel<8>(n);
8888

include/kernel_float/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ struct vector_ref<T, N, const U, Align> {
383383

384384
#define KERNEL_FLOAT_VECTOR_REF_ASSIGN_OP(OP, OP_ASSIGN) \
385385
template<typename T, size_t N, typename U, size_t Align, typename V> \
386-
KERNEL_FLOAT_INLINE vector_ref<T, N> operator OP_ASSIGN( \
386+
KERNEL_FLOAT_INLINE vector_ref<T, N, U, Align> operator OP_ASSIGN( \
387387
vector_ref<T, N, U, Align> ptr, \
388388
const V& value) { \
389389
ptr.write(ptr.read() OP value); \

single_include/kernel_float.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
//================================================================================
1818
// this file has been auto-generated, do not modify its contents!
19-
// date: 2024-02-22 10:29:30.717359
20-
// git hash: c4fae9db85e61372cfefc53d4755b418beb2d93e
19+
// date: 2024-03-18 16:06:55.100306
20+
// git hash: 06e08f55399e148d96070afd0ac36dd414045f04
2121
//================================================================================
2222

2323
#ifndef KERNEL_FLOAT_MACROS_H
@@ -2229,7 +2229,7 @@ struct concat_impl<V, Vs...> {
22292229
template<>
22302230
struct concat_impl<> {
22312231
using value_type = void;
2232-
static constexpr size_t size = 1;
2232+
static constexpr size_t size = 0;
22332233

22342234
template<typename U>
22352235
KERNEL_FLOAT_INLINE static void call(U* output) {}

0 commit comments

Comments
 (0)