From 81a291f86066204d214418d69b58c9c2f478e88a Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 25 Aug 2023 03:47:05 +0300 Subject: [PATCH] round up some pointers --- src/builtins/grade.h | 4 ++-- src/builtins/transpose.c | 4 ++-- src/core/stuff.h | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/builtins/grade.h b/src/builtins/grade.h index a818a777..fe0b5cd3 100644 --- a/src/builtins/grade.h +++ b/src/builtins/grade.h @@ -143,7 +143,7 @@ extern i8 (*const avx2_count_i8)(usz*, i8*, u64, i8); TFREE(c0) #define RADIX_SORT_i16(T, TYP, I) \ - TALLOC(u8, alloc, (2*256+ROFF)*sizeof(T) + n*(2 + CHOOSE_SG_##TYP(0,sizeof(I)))); \ + TALLOC(u8, alloc, (2*256+ROFF)*sizeof(T) + n*(2 + CHOOSE_SG_##TYP(0,sizeof(I))) + sizeof(i32)); \ T* c0=(T*)alloc; T* c1=c0+256; T* c1o=c1+128; \ for (usz j=0; j<2*256; j++) c0[j]=0; \ c1[0]=GRADE_UD(-n,c0[0]=n); \ @@ -154,7 +154,7 @@ extern i8 (*const avx2_count_i8)(usz*, i8*, u64, i8); for (usz i=0; i>8)]++]=v; } \ , \ - I *g0 = (i32*)(r0+n); \ + I *g0 = ptr_roundUpToEl((i32*)(r0+n)); \ for (usz i=0; i>8)]++]=g0[i]; } \ ) \ diff --git a/src/builtins/transpose.c b/src/builtins/transpose.c index a339b3f8..1e896e79 100644 --- a/src/builtins/transpose.c +++ b/src/builtins/transpose.c @@ -170,7 +170,7 @@ B transp_c2(B t, B w, B x) { if (isAtm(x) || (xr=RNK(x))