[mlpack-git] [mlpack/mlpack] Binarize Function + Test (#666)
Ryan Curtin
notifications at github.com
Wed Jun 8 14:16:08 EDT 2016
I should also say, you won't see much speedup for a 10x10 matrix, try more like 10000 points and 100 features. I think that you would also be benefited by looping columnwise instead:
```
#pragma omp parallel for
for (size_t i = 0; i < mat.n_cols; ++i)
{
// Each threads works on a single column.
for (size_t j = 0; j < mat.n_rows; ++j)
{
if (mat(j, i) < threshold)
outmat(j, i) = 0;
else
outmat(j, i) = 1;
}
}
```
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/666#issuecomment-224680700
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160608/8ad84eb1/attachment.html>
More information about the mlpack-git
mailing list