Check-in [42237e5a18]
Overview
Comment:Ensure that the "work" is copied from the offload engine after it is updated and before it is used
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 42237e5a18243cd50d7575984ac3675ffdc79ea499c6b233f41e828f1c6b1248
User & Date: rkeene on 2018-08-17 21:52:36
Other Links: manifest | tags
Context
2018-08-26
14:57
Fixed typo check-in: bc159a939f user: rkeene tags: trunk
2018-08-17
21:52
Ensure that the "work" is copied from the offload engine after it is updated and before it is used check-in: 42237e5a18 user: rkeene tags: trunk
20:39
More work on the networking support check-in: e79f2e1800 user: rkeene tags: trunk
Changes

Modified nano.c from [11b3eba419] to [6efa7f3405].

415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
static void nano_generate_work(const unsigned char *blockhash, unsigned char *workOut, uint64_t workMin) {
	unsigned char work[NANO_WORK_VALUE_LENGTH];
	unsigned int offset;
	int work_valid;

	memcpy(work, blockhash, sizeof(work));

	#pragma omp target
	while (1) {
		work_valid = nano_validate_work(blockhash, work, workMin);
		if (work_valid) {
			break;
		}

		offset = 0;







|







415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
static void nano_generate_work(const unsigned char *blockhash, unsigned char *workOut, uint64_t workMin) {
	unsigned char work[NANO_WORK_VALUE_LENGTH];
	unsigned int offset;
	int work_valid;

	memcpy(work, blockhash, sizeof(work));

#pragma omp target map(tofrom:work)
	while (1) {
		work_valid = nano_validate_work(blockhash, work, workMin);
		if (work_valid) {
			break;
		}

		offset = 0;