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

Better Multithreading #1

Open
wants to merge 64 commits into
base: multithreaded
Choose a base branch
from

Conversation

SeeSoftware
Copy link
Contributor

The code styling got a bit fucked because of my settings.

Copy link
Contributor

@Earthcomputer Earthcomputer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo the formatting changes

stylefix 1
stylefix 2
stylefix 3
stylefix 4
@SeeSoftware
Copy link
Contributor Author

styling should be corrected now.

main.cu Outdated
static auto threadFunc = [&](size_t start, size_t end) {
for (int j = start; j < end; ++j) {
if (generator::ChunkGenerator::populate(tempStorage[j], X_TRANSLATE + 16)) {
std::lock_guard<std::mutex> lock(fileMutex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's going to have a heck of a lot of mutex contention. Could the threads batch up their file writes?

BalintCsala and others added 3 commits April 15, 2020 06:40
Also, use the PRIu64 macro to fix the printf format debacle once and for all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants