Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions machine_learning/kohonen_som_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ double kohonen_update_weights(const double *X, struct kohonen_array_3d *W,
double d_min = 0.f;

#ifdef _OPENMP
#pragma omp for
#pragma omp parallel for
#endif
// step 1: for each 2D output point
for (x = 0; x < num_out; x++)
Expand Down Expand Up @@ -271,9 +271,7 @@ double kohonen_update_weights(const double *X, struct kohonen_array_3d *W,

// step 3b: update the weights of nodes in the
// neighborhood
#ifdef _OPENMP
#pragma omp for
#endif

for (x = from_x; x < to_x; x++)
{
for (y = from_y; y < to_y; y++)
Expand Down Expand Up @@ -306,7 +304,7 @@ double kohonen_update_weights(const double *X, struct kohonen_array_3d *W,
*
* \param[in] X data set
* \param[in,out] W weights matrix
* \param[in] num_samples number of output points
* \param[in] num_samples number of input samples
* \param[in] num_features number of features per input sample
* \param[in] num_out number of output points
* \param[in] alpha_min terminal value of alpha
Expand Down