-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finished x86-64 implementation of hebi_pctz
- Loading branch information
1 parent
dd72fe0
commit b13c698
Showing
8 changed files
with
115 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,6 +194,7 @@ BENCH_P := \ | |
padd \ | ||
paddu \ | ||
pclz \ | ||
pctz \ | ||
pcmp \ | ||
pcopy \ | ||
pdivrem \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* hebimath - arbitrary precision arithmetic library | ||
* See LICENSE file for copyright and license details | ||
*/ | ||
|
||
#include "../bench.h" | ||
|
||
static volatile size_t result_sink; | ||
|
||
int | ||
main(int argc, char *argv[]) | ||
{ | ||
bench_args p = { .iter = 5000, .an = 32768 }; | ||
hebi_packet *a; | ||
int i; | ||
|
||
bench_init(argc, argv, &p); | ||
|
||
a = hebi_palloc(HEBI_ALLOC_DEFAULT, p.an); | ||
hebi_pzero(a, p.an); | ||
a->hp_limbs32[p.an + HEBI_PACKET_LIMBS32 - 1] = 0x80000000u; | ||
|
||
bench_start(); | ||
|
||
for (i = 0; i < p.iter; ++i) | ||
result_sink = hebi_pctz(a, p.an); | ||
|
||
bench_stop(); | ||
|
||
hebi_pfree(HEBI_ALLOC_DEFAULT, a, p.an); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters