Mercurial > hg > octave-lyh
annotate src/ls-oct-binary.h @ 13245:027a2186cd90
parfor keyword and infrastructure, but handle parfor as normal for loop for now
* octave.gperf (octave_kw_id): New keyword ids, parfor_kw and
end_parfor_kw.
(octave_kw): Add parfor and end_parfor to the struct.
* lex.ll (is_keyword_token): Handle parfor and end_parfor.
* token.h (token::parfor_end): New end_tok_type enum value.
* oct-parse.yy (PARFOR): New token.
(loop_command): Handle PARFOR statements.
(make_for_command): New args tok_id and maxproc. Handle PARFOR loops.
* pt-loop.h (tree_simple_for_command::parallel,
tree_simple_for_command:maxproc): New data members.
(tree_simple_for_command::tree_simple_for_command): New args
parallel_arg and maxproc_arg. Initialize new data members.
(tree_simple_for_command::parallel): New function.
(tree_simple_for_command::maxproc_expr): New function.
* pt-loop.cc (tree_simple_for_command::~tree_simple_for_command):
Delete maxproc.
(tree_simple_for_command::dup): Pass parallel and maxproc to
constructor for duplicate object.
* pt-pr-code.cc (tree_print_code::visit_simple_for_command):
Handle parallel form.
* pt-check.cc (tree_checker::visit_simple_for_command): Likewise.
* pt-eval.cc (tree_evaluator::visit_simple_for_command): Note that
this is where parallel loops need to be handled.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 29 Sep 2011 02:50:53 -0400 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
rev | line source |
---|---|
4634 | 1 /* |
2 | |
11523 | 3 Copyright (C) 2003-2011 John W. Eaton |
4634 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
4634 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
4634 | 20 |
21 */ | |
22 | |
23 #if !defined (octave_ls_oct_binary_h) | |
24 #define octave_ls_oct_binary_h 1 | |
25 | |
7867
f6fffa74b9b5
Export additional symbols: octave_fcn_inline, octave_fcn_handle, read_binary_data, save_binary_data.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7017
diff
changeset
|
26 extern OCTINTERP_API bool |
4634 | 27 save_binary_data (std::ostream& os, const octave_value& tc, |
10313 | 28 const std::string& name, const std::string& doc, |
29 bool mark_as_global, bool save_as_floats); | |
4634 | 30 |
7867
f6fffa74b9b5
Export additional symbols: octave_fcn_inline, octave_fcn_handle, read_binary_data, save_binary_data.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
7017
diff
changeset
|
31 extern OCTINTERP_API std::string |
4634 | 32 read_binary_data (std::istream& is, bool swap, |
10313 | 33 oct_mach_info::float_format fmt, |
34 const std::string& filename, bool& global, | |
35 octave_value& tc, std::string& doc); | |
4634 | 36 |
37 #endif |