diff options
author | soumith <soumith@fb.com> | 2017-03-04 19:39:19 +0300 |
---|---|---|
committer | soumith <soumith@fb.com> | 2017-03-04 19:39:19 +0300 |
commit | d10c2cfd7eb074a05621304cb672b6ca78693c2d (patch) | |
tree | ba683ff581f8cfea570eeae00d24bbc96a530270 | |
parent | a749032289bc19cbca44b06c0eafd1be43aeb94a (diff) |
fix critical bug in adds SSE implementation
-rw-r--r-- | lib/TH/vector/SSE.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/TH/vector/SSE.c b/lib/TH/vector/SSE.c index 01ac789..d026935 100644 --- a/lib/TH/vector/SSE.c +++ b/lib/TH/vector/SSE.c @@ -172,7 +172,7 @@ static void THFloatVector_adds_SSE(float *y, const float *x, const float c, cons ptrdiff_t i; __m128 XMM7 = _mm_set1_ps(c); __m128 XMM0, XMM2; - for (i=8; i<=((n)-8); i+=8) { + for (i=0; i<=((n)-8); i+=8) { XMM0 = _mm_loadu_ps((x)+i); XMM2 = _mm_loadu_ps((x)+i+4); XMM0 = _mm_add_ps(XMM0, XMM7); |