Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

output multiple matches at same score level #41

Open
allenday opened this issue Mar 16, 2021 · 3 comments
Open

output multiple matches at same score level #41

allenday opened this issue Mar 16, 2021 · 3 comments

Comments

@allenday
Copy link

for example, keep outputting at score=15 until score=16 is achieved

@AK42
Copy link

AK42 commented Jun 2, 2021

I'd like to do that too, the screenshot example shows that behaviour but I have no idea how to reproduce it.

@gpxl-dev
Copy link

gpxl-dev commented Jan 5, 2022

@johguse are you still maintaining this library? Seems like this could potentially be a quick change if you know what you're looking for!

@jaggedsoft
Copy link

I haven't tested this, but in theory you could edit profanity.cl and replace profanity_result_update:

void profanity_result_update(const size_t id, __global const uchar * const hash, __global result * const pResult, const uchar score, const uchar scoreMax) {
	if (score && score > scoreMax) {
		//uchar hasResult = atomic_inc(&pResult[score].found); // NOTE: If "too many" results are found it'll wrap around to 0 again and overwrite last result. Only relevant if global worksize exceeds MAX(uint).

		// Save only one result for each score, the first.
		//if (hasResult == 0) {
			pResult[score].foundId = id;

			for (int i = 0; i < 20; ++i) {
				pResult[score].foundHash[i] = hash[i];
			}
		//}
	}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants