A computer-implemented method comprising: - initializing a first processing unit of a heterogeneous computing system with a first compute kernel (140-144) and a second processing unit of the heterogeneous computing system with a second compute kernel (150-154), wherein each of the first compute kernel (140-144) and the second compute kernel (150-154) is configured to perform a numerical operation derived from a program segment configured to receive a first data structure (A) storing multiple elements of a common data type, the program segment comprising a function meta information comprising data related to a size of an output of the numerical operation, a numerical effort for generating the output on the first processing unit , and a numerical effort for generating the output on the second processing unit ; - using the function meta information and a data meta information of a runtime instance (A1) of the first data structure (A) to numerically calculate first expected costs of executing the first compute kernel (140-144) on the first processing unit to perform the numerical operation with the runtime instance (A1) and to numerically calculate second expected costs of executing the second compute kernel (150-154) on the second processing unit to perform the numerical operation with the runtime instance (A1), wherein the data meta information comprises a runtime size information of the runtime instance (A1) and a runtime location information of the runtime instance (A1); and one of: - executing the first compute kernel (140-144) on the first processing unit to perform the numerical operation on the runtime instance (A1) if the first expected costs are lower than or equal to the second expected costs; and - executing the second compute kernel (150-154) on the second processing unit to perform the numerical operation on the runtime instance (A1) if the first expected costs are higher than the second expected costs. - initializing a first processing unit of a heterogeneous computing system with a first compute kernel (140-144) and a second processing unit of the heterogeneous computing system with a second compute kernel (150-154), wherein each of the first compute kernel (140-144) and the second compute kernel (150-154) is configured to perform a numerical operation derived from a program segment configured to receive a first data structure (A) storing multiple elements of a common data type, the program segment comprising a function meta information comprising data related to a size of an output of the numerical operation, a numerical effort for generating the output on the first processing unit , and a numerical effort for generating the output on the second processing unit ; - using the function meta information and a data meta information of a runtime instance (A1) of the first data structure (A) to numerically calculate first expected costs of executing the first compute kernel (140-144) on the first processing unit to perform the numerical operation with the runtime instance (A1) and to numerically calculate second expected costs of executing the second compute kernel (150-154) on the second processing unit to perform the numerical operation with the runtime instance (A1), wherein the data meta information comprises a runtime size information of the runtime instance (A1) and a runtime location information of the runtime instance (A1); and - executing the first compute kernel (140-144) on the first processing unit to perform the numerical operation on the runtime instance (A1) if the first expected costs are lower than or equal to the second expected costs; and - executing the second compute kernel (150-154) on the second processing unit to perform the numerical operation on the runtime instance (A1) if the first expected costs are higher than the second expected costs. <EOS>