diff --git a/opennn/opennn_strings.cpp b/opennn/opennn_strings.cpp index 2913695c6..b2082edcc 100644 --- a/opennn/opennn_strings.cpp +++ b/opennn/opennn_strings.cpp @@ -134,8 +134,10 @@ void fill_tokens(const string& str, const char& separator, Tensor& to // Find first "non-delimiter" Index index = 0; + Index old_pos; + while(string::npos != position || string::npos != last_position) { // Found a token, add it to the vector diff --git a/tests/correlations_test.cpp b/tests/correlations_test.cpp index 949015e75..2b1c34b30 100644 --- a/tests/correlations_test.cpp +++ b/tests/correlations_test.cpp @@ -483,7 +483,10 @@ void CorrelationsTest::test_exponential_correlation() { y[i] = exp(static_cast(2.5)*x[i] + static_cast(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(0.999999), LOG);)