Skip to content

Commit

Permalink
Fix bug in stack memory allocation macro
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Nov 14, 2020
1 parent 440a9da commit 0683634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static inline void *_align_upwards(void *p, uintptr_t align)
// malloc(sizeof(double)) with alignment
#define MALLOC_ALIGNED_DOUBLE_INSTACK(var, n) \
var = _align_upwards(cache, sizeof(double)*SIMDD); \
cache = (double *)var + (n);
cache = (double *)(var + (n));
#define MALLOC_INSTACK(var, n) MALLOC_ALIGNED_DOUBLE_INSTACK(var, n)

#endif

0 comments on commit 0683634

Please sign in to comment.