Skip to content

Commit

Permalink
A better fix for #173
Browse files Browse the repository at this point in the history
Prepare to re-release.
  • Loading branch information
c-blake committed Nov 23, 2020
1 parent 39b9c98 commit 71699d7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
RELEASE NOTES
=============

Version: 1.3.2
--------------
Remove prefetching optimization idea, anyway. On AMD 2950X, it was quite a
bit slower anyway.

Better fix to deactivate prefetch doing anything unless user activates (and
maybe uses special gcc flags, too.). `cligen/prefix` module is retained for
backward compatibility { no longer touching compiler flags at all }.

Version: 1.3.1
--------------
Quick fix to deactivate mslice prefetch causing build problems for some.
Expand Down
2 changes: 1 addition & 1 deletion cligen.nimble
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Package
version = "1.3.1"
version = "1.3.2"
author = "Charles Blake"
description = "Infer & generate command-line interace/option/argument parser"
license = "MIT/ISC"
Expand Down
4 changes: 2 additions & 2 deletions cligen/prefetch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ type
pfEvictL2 = 2
pfEvictNone = 3

when defined(x86prefetch) and defined(gcc): #XXX or defined(clang) etc.
{.passc: "-march=native".}
#XXX or defined(clang) etc. You may need some gcc flags for this to do anything.
when defined(cpuPrefetch) and defined(gcc):
proc prefetch*(data: pointer, rw=pfRead, kind=pfEvictNone) {.
importc: "__builtin_prefetch", nodecl .}
proc prefetchw*(data: pointer, kind=pfEvictNone) {.inline.} =
Expand Down

0 comments on commit 71699d7

Please sign in to comment.