Luke Dashjr
d4af2d0535
Turn work_restart array into a bool in thr_info
2012-07-06 05:13:05 +00:00
Luke Dashjr
d8ef28069a
work_restart should only be changed by cgminer.c now
2012-04-21 20:00:05 -04:00
Luke Dashjr
e131dfab31
Unify drivers as driver-*.c and add driver name to API
2012-03-13 12:18:23 -04:00
zefir
713e8be629
move CPU chipset specific optimization into device-cpu
2012-02-11 20:25:41 +01:00
Luke Dashjr
b9d197dee8
Refactor the CPU scanhash_* functions to use a common API. Fixes bugs.
...
- Before, some returned bool, and others returned int (which was then turned
into a bool with a comparison); now, everything returns a bool
- Before, some set hashes_done to nonce - 1 when a share was found and others
set it to nonce + 1 or 2. This caused some algorithms to scan/submit shares
twice with the new cpu_scanhash function. Now, it has all been replaced with
last_nonce, which is set to the final nonce checked by the scanhash_* func.
- VIA needs the full data, and cannot use midstate. All the others were
expecting midstate and data+64 for their parameters. Now, we pass midstate
and the full data pointer, and let the scanhash_* function choose which to
use.
2012-01-17 17:32:07 -05:00
Con Kolivas
5007805d1f
Update CPU reentrant scan code to work properly for extended periods up to scantime and adjust rate properly.
...
Simplify locking in hashmeter since it's called relatively infrequently anyway.
Set gpuminer hashmeter interval update to log interval / 5 as well.
2011-07-04 19:56:27 +10:00
Ycros
9fe2106467
Fixed up using config.h instead of cpuminer-config.h.
2011-07-04 19:56:27 +10:00
Jeff Garzik
23e9cf91f0
Ensure cpuminer-config.h is universally included, in *.c and *.h alike.
...
In miner.h, this fixes an alloca-definition-related warning.
For the other files, this is simply future-proofing/precaution.
2011-03-20 22:44:25 -04:00
Jeff Garzik
2d49a9a5d7
Introduce ability to interrupt hash scanners in the middle of scanning.
2011-03-17 22:02:28 -04:00
Jeff Garzik
ef91bd59e2
sha256_4way: skip last 3 rounds.
...
Pointed out by several people, including Raulo.
2011-03-02 22:03:11 -05:00
Raulo
a27e69aec5
Changes to make the 4-way code compile on Intel Compiler
2011-02-21 21:41:19 +01:00
Jeff Garzik
1083e15c47
Mark hash success as unlikely, using __builtin_expect() intrinsic
2011-02-17 01:22:55 -05:00
Jeff Garzik
714c0fd7c9
Continue scanhash, even if high 32 bits are zero.
...
Previously, we would stop the scan if the high 32 bits of the hash were zero,
as a quick shortcut for testing the full hash. If this quick test succeeded,
we would pass the work to the server for full validation.
Change this logic to perform full validation inside minerd, so that work may
be resumed more quickly if hash > target.
2011-02-03 00:46:55 -05:00
Jeff Garzik
c68ffb30dd
Display proof-of-work hash when one is discovered
2011-02-02 18:47:04 -05:00
Jeff Garzik
0b67740707
Pass max-nonce as arg to each sha256 algo.
...
Should be an equivalent transformation, with no behavior changes.
2011-01-29 00:56:24 -05:00
Jeff Garzik
8504cf4803
sha256_4way minor optimizations
...
http://www.bitcoin.org/smf/index.php?topic=820.msg40022#msg40022
Credit: BeeCee1
2011-01-29 00:36:32 -05:00
Jeff Garzik
0ee24c00ce
sha256_4way: work around gcc 4.5.x bug by always inlining ROTR and SHR
2010-12-18 16:29:07 -05:00
Jeff Garzik
8ca6ffa8a9
sha256_4way: do not include unnecessary headers, when !4way
...
Reported by lfm
2010-12-06 00:59:59 -05:00
Jeff Garzik
339ddf4d75
Move sha256_generic into its own .o build output. Const-ify midstate param.
2010-11-27 04:31:32 -05:00
Jeff Garzik
6288d943ab
sha256_4way: patch proper nonce into data block
2010-11-27 03:50:12 -05:00
Jeff Garzik
86eb37d631
Improve and modularize compile-time CPU detection.
...
Ideally, we should move this to autoconf.
2010-11-27 00:46:59 -05:00
Jeff Garzik
500759cea1
s/__SSE__/__SSE2__/
2010-11-27 00:12:28 -05:00
Jeff Garzik
eed9b3c7df
sha256_4way: perform 16m hashes, not 64k, per invocation
2010-11-26 23:15:38 -05:00
Jeff Garzik
35ea649d97
Improve hash performance statistics.
2010-11-26 23:12:24 -05:00
Jeff Garzik
c639149977
Add tcatm's 4way SSE2 sha256 implementation.
2010-11-26 19:04:48 -05:00