I just though of one, you know how you can insert images with the “upload image” button, drag and drop doesn’t seem to be supported yet.
Idk how hard that is to implement cross platform, but many sites support it.
Sounds like a cool project!
Make sure to check the issues/PRs, it looks like people already worked on CTRL+Enter.
Maybe you know more about web or android development, then you could look into contributing to the lemmy-ui or jerboa.
Yesterday I was annoyed at wide code blocks being wrapped, instead of having a horizontal scrollbar, so I took 20 minutes of googling and hacking around with my minimal css skills and wrote a PR, it’s already merged and will probably show up on instances soon.
I think the is the most accurate solution, clock()
as suggested by another answer may overflow, but this only suffers from potential precision problems with double, but you’d have to wait for an incredibly long time for this to become significant.
The critical section makes sure that only ever a single thread can execute the section at a time. So when a thread what’s to execute the section, it first needs to make sure no other thread is executing it and potentially wait for the other threads to finish executing the section.
Reductions however don’t induce this synchronization overhead, instead each thread executes with an independent parent
value, and after the loop is done, the reduction is applied to merge all parent
values. The following, is essentially what the #pragma omp parallel for reduction(min : parent)
is equivalent to:
unsigned int parents[8] = {v, v, v, v, v, v, v, v};
#pragma omp parallel for num_threads(8)
for(unsigned int j = 0; j < G.Out[v]._map.bucket_count(); j++) {
for(auto ite = G.Out[v]._map.begin(j); ite != G.Out[v]._map.end(j); ite++) {
unsigned int w = ite->first;
if(v > w)
parents[omp_get_thread_num()] = min(parents[omp_get_thread_num()],w);
}
}
unsigned int parent = v;
for (unsigned int i = 0; i < 8; ++i) {
parent = min(parent, parents[i]);
}
I recently started doing xeyes debugging.
We have so many debug logs that trying to find your log of a background takes a non zero amount of time.
So just inserting
system("xeyes");
is actually way easier, to get instant feedback, and you can just usesystem("xmessage msg")
, if you need a message.