Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rand factor in guesser function #7

Open
cguzman95 opened this issue Jan 4, 2022 · 1 comment
Open

Rand factor in guesser function #7

cguzman95 opened this issue Jan 4, 2022 · 1 comment

Comments

@cguzman95
Copy link
Collaborator

cguzman95 commented Jan 4, 2022

Hello @mattldawson,

Reviewing my old notes, I had seen that a difference worth to comment of my GPU branch with the main branch.

In the camp_solver.c file there's a rand() factor in the guesser function like this:

  // Scale incomplete jumps
    if (i_fast >= 0 && h_n > ZERO)
      h_j *= 0.95 + 0.1 * rand() / (double)RAND_MAX;
    h_j = t_n < t_0 + t_j + h_j ? t_n - (t_0 + t_j) : h_j;

In my notes, this random factor is difficulting the profiling, therefore it is disabled (replaced by just h_j *= 0.95 + 0.1) for the GPU branch. Should I keep both versions alive with a compiler option like #ifdef USE_GPU? Or do you have another suggestion?

@mattldawson
Copy link
Collaborator

Hi @cguzman95,

That sounds fine to me - or you could remove it altogether and see if the tests still pass and don't take longer to run.

cguzman95 added a commit that referenced this issue Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants