Add a New Comment (Rich Markup)
This issue is still present in Octave 4.2.0.
Just had time to test this. Unfortunately it fails to compile
libinterp/operators/op-bm-bm.cc: In function 'void install_bm_bm_ops()': libinterp/operators/op-bm-bm.cc:168:2: error: 'oct_conv_float_matrix_to_bool_matrix' was not declared in this scope libinterp/operators/op-bm-bm.cc:169:49: error: 'octave_float_scalar' has not been declared libinterp/operators/op-bm-bm.cc:170:2: error: 'oct_conv_float_scalar_to_bool_matrix' was not declared in this scope
Looking to code by example, I used the DEFCONVFN macro as was done earlier in op-bm-bm.cc.
DEFCONVFN (matrix_to_bool_matrix, matrix, bool) DEFCONVFN (scalar_to_bool_matrix, scalar, bool) // Added to match declaration for doubles DEFCONVFN (float_matrix_to_bool_matrix, float_matrix, bool) DEFCONVFN (float_scalar_to_bool_matrix, float_scalar, bool)
This leads to
libinterp/operators/op-bm-bm.cc: In function 'octave_base_value* oct_conv_float_scalar_to_bool_matrix(const octave_base_value&)': libinterp/operators/op-bm-bm.cc:131:102: error: 'octave_float_scalar' does not name a type libinterp/operators/op-bm-bm.cc:131:204: error: 'v' was not declared in this scope libinterp/operators/op-bm-bm.cc: At global scope: libinterp/operators/op-bm-bm.cc:131:28: warning: unused parameter 'a' [-Wunused-parameter] libinterp/operators/op-bm-bm.cc: In function 'void install_bm_bm_ops()': libinterp/operators/op-bm-bm.cc:169:49: error: 'octave_float_scalar' has not been declared
so I commented out the scalar instance of DEFCONVFN and INSTALL_CONVOP. Now it compiles. But I get the same error as before
x0 = diag(ones(1E6, 1, "single")) * ones(1E6, 1, "logical"); error: out of memory or dimension too large for Octave's index type
Just guessing, but maybe the conversions need to be somewhere in the fdm files for float_diagonal_matrix in the operator directory.
This should be trivially fixed by adding the lines
INSTALL_CONVOP (octave_float_matrix, octave_bool_matrix, float_matrix_to_bool_matrix); INSTALL_CONVOP (octave_float_scalar, octave_bool_matrix, float_scalar_to_bool_matrix);
to libinterp/operators/op-bm-bm.cc though I can't test it D.
On the other hand,
x1 = diag(ones(1E6, 1, "double")) * ones(1E6, 1, "logical"); x2 = diag(ones(1E6, 1, "single")) * ones(1E6, 1, "single");
both work fine.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 2 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.12