Skip to content

Sealed types cannot be instantiated. in Kotlin #766

@Blacktoviche

Description

@Blacktoviche

Im trying to use TornadoVM in kotlin code but can't solve this issue about sealed class in :

val executor = TornadoExecutionPlan(immutableTaskGraph)

this code is working perfectly in java but in kotlin it always produce error

Sealed types cannot be instantiated.

this is part of the example is:
val taskGraph = TaskGraph("puzzleSolver") .transferToDevice(DataTransferMode.EVERY_EXECUTION, randomSeeds, targetHash) .task("search", PuzzleKernels::randomSearchKernel, targetHash, results ) .transferToHost(DataTransferMode.EVERY_EXECUTION, results, foundKeys) val immutableTaskGraph = taskGraph.snapshot() val executor = TornadoExecutionPlan(immutableTaskGraph) executor.execute()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions