Skip to content

Consider adding descriptor to all methods #48

@DrTimothyAldenDavis

Description

@DrTimothyAldenDavis

I would like to suggest adding the descriptor parameter to all methods, even GrB_Matrix_nvals. I use the descriptor to control the # of threads the method can use, with a GxB_NTHREADS setting. The default is the use the global setting, which I can also modify, and the default for that is the result from omp_get_max_threads. This control is essential for composing parallel libraries together.

There is no such per-call thread control in the BLAS, and this is an incredible headache when trying to call the parallel BLAS from a parallel application. If two user threads both call GraphBLAS at the same time, it is essential to let those user threads tell me how many threads I can use inside GraphBLAS. All my OpenMP #pragmas use the num_threads(nthreads) parameter.

If a method has no descriptor, I can only use the global setting, but two different user threads might want to tell me to use different # of threads in each call.

The GxB_NTHREADS setting tells me, per-call, the max # of threads I can use. I sometimes use less, if the problem is small.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions