Skip to content

Commit

Permalink
Merge pull request #164 from shleym2000/patch-2
Browse files Browse the repository at this point in the history
Populating position variable before it is used
  • Loading branch information
jandres-artelnics authored Dec 18, 2020
2 parents 40d8298 + f5f8323 commit 972d265
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opennn/opennn_strings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void fill_tokens(const string& str, const char& separator, Tensor<string, 1>& to
// Find first "non-delimiter"

Index index = 0;
Index old_pos;
Index old_pos = 0;
Index old_last_pos;

while(string::npos != position || string::npos != last_position)
Expand Down
5 changes: 4 additions & 1 deletion tests/correlations_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,10 @@ void CorrelationsTest::test_exponential_correlation()
{
y[i] = exp(static_cast<type>(2.5)*x[i] + static_cast<type>(1.4));
}
const ThreadPoolDevice* thread_pool_device = thread_pool_device;

const int n = omp_get_max_threads();
NonBlockingThreadPool* non_blocking_thread_pool = new NonBlockingThreadPool(n);
ThreadPoolDevice* thread_pool_device = new ThreadPoolDevice(non_blocking_thread_pool, n);

type correlation = exponential_correlation(thread_pool_device,x,y);
//@todo(assert_true(correlation > static_cast<type>(0.999999), LOG);)
Expand Down

0 comments on commit 972d265

Please sign in to comment.