Incremental by kernel thread

Let’s say that I want to increment a property var incremental:Int32 every time a kernel thread is executed: //SWIFT var incremental:Int32 = 0 var incrementalBuffer:MTLBuffer! var incrementalPointer: …