diff options
author | Michael Bien <[email protected]> | 2010-02-25 19:13:15 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-02-25 19:13:15 +0100 |
commit | 0857dbb04fe9259f1076e9559b822c5032c23461 (patch) | |
tree | 5a45cd56bf861876f13d32a731a7cf0feb8c725e /src/com/mbien/opencl/CLContext.java | |
parent | 0b7b387ff2d829f611b385a6aebfe91ee746196a (diff) |
introduced CLBuildConfiguration and CLProgramConfiguration interfaces for CLProgramBuilder.
Diffstat (limited to 'src/com/mbien/opencl/CLContext.java')
-rw-r--r-- | src/com/mbien/opencl/CLContext.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/com/mbien/opencl/CLContext.java b/src/com/mbien/opencl/CLContext.java index 73146acd..4cc21d0f 100644 --- a/src/com/mbien/opencl/CLContext.java +++ b/src/com/mbien/opencl/CLContext.java @@ -192,15 +192,15 @@ public class CLContext extends CLObject implements CLResource { } /** - * Creates a program and reads the sources from stream, the program is not build yet. + * Creates a program and reads the source from stream, the program is not build yet. * @throws IOException when a IOException occurred while reading or closing the stream. */ - public CLProgram createProgram(InputStream sources) throws IOException { + public CLProgram createProgram(InputStream source) throws IOException { - if(sources == null) - throw new IllegalArgumentException("input stream for program sources must not be null"); + if(source == null) + throw new IllegalArgumentException("input stream for program source must not be null"); - BufferedReader reader = new BufferedReader(new InputStreamReader(sources)); + BufferedReader reader = new BufferedReader(new InputStreamReader(source)); StringBuilder sb = new StringBuilder(); String line; @@ -208,7 +208,7 @@ public class CLContext extends CLObject implements CLResource { while ((line = reader.readLine()) != null) sb.append(line).append("\n"); } finally { - sources.close(); + source.close(); } return createProgram(sb.toString()); |