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

Parallelize CPU intensive loops #1

Open
atomashpolskiy opened this issue Jan 8, 2018 · 0 comments
Open

Parallelize CPU intensive loops #1

atomashpolskiy opened this issue Jan 8, 2018 · 0 comments

Comments

@atomashpolskiy
Copy link
Owner

The original version uses OpenMP for parallelization, in 6 places in total. So far I've been able to use Rayon to modify the corresponding code in the Rust version, in 2 places:

(1)
MLPLayer::Compute (src/classifier/mlp.cpp:39)
classifier::surf_mlp_classifier::Layer::compute (src/classifier/surf_mlp_classifier.rs:153)

(2)
SURFFeatureMap::ComputeGradY (src/feat/surf_feature_map.cpp:197)
feat::surf_mlp_featmap::SurfMlpFeatureMap::compute_grad_y (src/feat/surf_mlp_featmap.rs:137)

Here are the remaining places:

(3)
SURFFeatureMap::ComputeGradX (src/feat/surf_feature_map.cpp:178)
feat::surf_mlp_featmap::SurfMlpFeatureMap::compute_grad_x (src/feat/surf_mlp_featmap.rs:116)

(4)
LABFeatureMap::ComputeRectSum (src/feat/lab_feature_map.cpp:145)
feat::lab_boosted_featmap::LabBoostedFeatureMap::compute_rect_sum (feat/lab_boosted_featmap.rs:183)

(5)
LABFeatureMap::ComputeFeatureMap (src/feat/lab_feature_map.cpp:173)
feat::lab_boosted_featmap::LabBoostedFeatureMap::compute_feature_map (feat/lab_boosted_featmap.rs:215)

(6)
fd::ResizeImage (include/util/image_pyramid.h:44)
common::resize_image (common/image_pyramid.rs:175)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant