code: func (fn Function) LaunchAndSync(gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes int, stream Stream, kernelParams []unsafe.Pointer) error {
  	argv := C.malloc(C.size_t(len(kernelParams) * pointerSize))
  	argp := C.malloc(C.size_t(len(kernelParams) * pointerSize))
  	defer C.free(argv)
  	defer C.free(argp)
  	for i := range kernelParams {
  		*((*unsafe.Pointer)(offset(argp, i))) = offset(argv, i)       // argp[i] = &argv[i]
  		*((*uint64)(offset(argv, i))) = *((*uint64)(kernelParams[i])) // argv[i] = *kernelParams[i]
  	}
  
  	err := result(C.cuLaunchAndSync(
  		fn.fn,
  		C.uint(gridDimX),
  		C.uint(gridDimY),
  		C.uint(gridDimZ),
  		C.uint(blockDimX),
  		C.uint(blockDimY),
  		C.uint(blockDimZ),
  		C.uint(sharedMemBytes),
  		stream.c(),
  		(*unsafe.Pointer)(argp),
  		(*unsafe.Pointer)(nil)))
  	return err
  }
docs: // LaunchAndSync launches the kernel and synchronizes the context