1
I’m dealing with python and pycuda, studying codes and so on and came across the following question: What exactly is happening in the second line ? service will receive some attributes, in the first line, and until then everything okay. However in the second line service is a function ?? What a role the service is playing there ?
service = getattr(entity, event["name"])
service(event["data"], event["tx"], event["txId"])
In pycuda I noticed something similar too:
func = mod.get_function("doublify")
func(a_gpu, block=(4,4,1))
In the code above I had the impression that "func" will perform the role of "doublify" (an excerpt of CUDA code) and then receives some arguments. In the first example, of "service", it became obscure for me.