Problem description: The existing way to load a text file into device memory is to first create a DRAM, load a file into an Array, and then setMem(...). In the case where the text file is large, e.g., text processing where a file can be >100MB, doing so leads to allocating large byte arrays on the host's stack that could cause a stack overflow.
Fix in this pull request: I added a new node, loadDRAMWithASCIIText. At the host side, we don't create an Array on the stack; instead, we allocated it on the heap and delete it after memcpy-ing to the device memory.
Usage: apps/src/TextFileIO.scala
Others: Spatial's build.sbt could not support later versions of Java due to a bug in javax XML parser. I added one line in build.sbt to solve this issue.
Problem description: The existing way to load a text file into device memory is to first create a DRAM, load a file into an Array, and then setMem(...). In the case where the text file is large, e.g., text processing where a file can be >100MB, doing so leads to allocating large byte arrays on the host's stack that could cause a stack overflow. Fix in this pull request: I added a new node, loadDRAMWithASCIIText. At the host side, we don't create an Array on the stack; instead, we allocated it on the heap and delete it after memcpy-ing to the device memory. Usage: apps/src/TextFileIO.scala Others: Spatial's build.sbt could not support later versions of Java due to a bug in javax XML parser. I added one line in build.sbt to solve this issue.