A computer-implemented method comprising: - initializing a first processing unit of a heterogeneous computing system with a first compute kernel and a second processing unit of the heterogeneous computing system with a second compute kernel, wherein each of the first compute kernel and the second compute kernel is configured to perform a numerical operation derived from a program segment configured to receive a first data structure 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 of the first data structure to numerically calculate first expected costs of executing the first compute kernel on the first processing unit to perform the numerical operation with the runtime instance and to numerically calculate second expected costs of executing the second compute kernel on the second processing unit to perform the numerical operation with the runtime instance, wherein the data meta information comprises a runtime size information of the runtime instance and a runtime location information of the runtime instance; and one of: - executing the first compute kernel on the first processing unit to perform the numerical operation on the runtime instance if the first expected costs are lower than or equal to the second expected costs; and - executing the second compute kernel on the second processing unit to perform the numerical operation on the runtime instance 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 and a second processing unit of the heterogeneous computing system with a second compute kernel, wherein each of the first compute kernel and the second compute kernel is configured to perform a numerical operation derived from a program segment configured to receive a first data structure 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 of the first data structure to numerically calculate first expected costs of executing the first compute kernel on the first processing unit to perform the numerical operation with the runtime instance and to numerically calculate second expected costs of executing the second compute kernel on the second processing unit to perform the numerical operation with the runtime instance, wherein the data meta information comprises a runtime size information of the runtime instance and a runtime location information of the runtime instance; and - executing the first compute kernel on the first processing unit to perform the numerical operation on the runtime instance if the first expected costs are lower than or equal to the second expected costs; and - executing the second compute kernel on the second processing unit to perform the numerical operation on the runtime instance if the first expected costs are higher than the second expected costs.