|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjcuda.utils.FileIO
public class FileIO
File I/O functions, similar to the CUTIL file functions
| Method Summary | |
|---|---|
static java.lang.String |
readFileAsString(java.lang.String filename)
Read the contents of the file with the given name, and return it as a String |
static byte[] |
readFileByte(java.lang.String filename)
Reads the file with the given name containing byte data, and returns the contents of this file as an array |
static double[] |
readFileDouble(java.lang.String filename)
Reads the file with the given name containing double precision floating point data, and returns the contents of this file as an array |
static float[] |
readFileFloat(java.lang.String filename)
Reads the file with the given name containing single precision floating point data, and returns the contents of this file as an array |
static int[] |
readFileInt(java.lang.String filename)
Reads the file with the given name containing integer data, and returns the contents of this file as an array |
static void |
writeFile(java.lang.String filename,
byte[] data)
Writes the given array into a file with the given name. |
static void |
writeFile(java.lang.String filename,
double[] data,
double epsilon)
Writes the given array into a file with the given name. |
static void |
writeFile(java.lang.String filename,
float[] data,
float epsilon)
Writes the given array into a file with the given name. |
static void |
writeFile(java.lang.String filename,
int[] data)
Writes the given array into a file with the given name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static float[] readFileFloat(java.lang.String filename)
filename - The name of the file
jcuda.CudaException - if the file could not be readpublic static double[] readFileDouble(java.lang.String filename)
filename - The name of the file
jcuda.CudaException - if the file could not be readpublic static int[] readFileInt(java.lang.String filename)
filename - The name of the file
jcuda.CudaException - if the file could not be readpublic static byte[] readFileByte(java.lang.String filename)
filename - The name of the file
jcuda.CudaException - if the file could not be read
public static void writeFile(java.lang.String filename,
float[] data,
float epsilon)
filename - The name of the filedata - The data to writeepsilon - Epsilon for comparison
jcuda.CudaException - if the file could not be written
public static void writeFile(java.lang.String filename,
double[] data,
double epsilon)
filename - The name of the filedata - The data to writeepsilon - Epsilon for comparison
jcuda.CudaException - if the file could not be written
public static void writeFile(java.lang.String filename,
int[] data)
filename - The name of the filedata - The data to write
jcuda.CudaException - if the file could not be written
public static void writeFile(java.lang.String filename,
byte[] data)
filename - The name of the filedata - The data to write
jcuda.CudaException - if the file could not be writtenpublic static java.lang.String readFileAsString(java.lang.String filename)
filename - The name of the file
jcuda.CudaException - If the file could not be read
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||