Rate This Document
Findability
Accuracy
Completeness
Readability

kupl_set_kernel_concurrency_local

Sets the concurrency level supported when the current thread acts as the master thread and calls the memcpy kernel.

Interface Definition

void kupl_set_kernel_concurrency_local(int num);

Parameters

Table 1 Parameter definitions

Parameter

Type

Description

Input/Output

num

int

Kernel concurrency value to be set for the current thread

Constraint: 1 ≤ num ≤ kupl_get_num_executors(). If the input is not within the constraint range, num is internally set to the value returned by kupl_get_num_executors().

Input

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#include <stdio.h> 
#include "kupl.h" 

int main() 
{ 
    kupl_set_kernel_concurrency_local(2); 
    int num = kupl_get_kernel_concurrency_local();
    printf("local kupl kernel concurrency = %d\n", num); 
    return 0; 
}

The execution result is as follows:

local kupl kernel concurrency = 2
  • The preceding example demonstrates how to set and print the kernel concurrency value of the current thread.
  • The kupl_set_kernel_concurrency_local function sets the kernel concurrency level to 2.