We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following example requires thread_id to be typed as int, even though the return type of parallel.threadid() is known.
thread_id
def parallel_section(): """ >>> parallel_section() [1, 2, 3, 4, 5, 6, 7, 8, 9](0,) """ #cdef int thread_id ids = [] with nogil, parallel.parallel(num_threads=10): thread_id = parallel.threadid() # id=0..9 for 10 threads with gil: ids.append( thread_id ) return sorted(ids)
This is particularly annoying because it happens in a nogil section, so the code won't compile without explicitly typing the variable.
Migrated from http://trac.cython.org/ticket/774
The text was updated successfully, but these errors were encountered:
scoder changed description from
def parallel_section(): """ >>> parallel_section() [1, 2, 3, 4, 5, 6, 7, 8, 9](0,) """ #cdef int thread_id ids = [ with nogil, parallel.parallel(num_threads=10): thread_id = parallel.threadid() # id=0..9 for 10 threads with gil: ids.append( thread_id ) return sorted(ids)
This is particularly annoying because it happens is a nogil section, so the code won't compile without explicitly typing the variable.
to
def parallel_section(): """ >>> parallel_section() [0, 1, 2, 3, 4, 5, 6, 7, 8, 9](] ) """ #cdef int thread_id ids = [] with nogil, parallel.parallel(num_threads=10): thread_id = parallel.threadid() # id=0..9 for 10 threads with gil: ids.append( thread_id ) return sorted(ids)
This is particularly annoying because it happens is a nogil section, so the code won't compile without explicitly typing the variable. commented
Sorry, something went wrong.
This is particularly annoying because it happens in a nogil section, so the code won't compile without explicitly typing the variable. commented
No branches or pull requests
The following example requires
thread_id
to be typed as int, even though the return type of parallel.threadid() is known.This is particularly annoying because it happens in a nogil section, so the code won't compile without explicitly typing the variable.
Migrated from http://trac.cython.org/ticket/774
The text was updated successfully, but these errors were encountered: