annotate src/of-communications-1-catop.patch @ 5515:d46a116f2c8d

* src/of-communications-1-catop.patch: New file.
author John W. Eaton <jwe@octave.org>
date Tue, 25 Aug 2020 15:05:59 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5515
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 diff -uNr a/src/config.h.in b/src/config.h.in
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 --- a/src/config.h.in 2020-01-04 12:50:13.541197341 -0500
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 +++ b/src/config.h.in 2020-08-25 14:50:29.000000000 -0400
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 @@ -26,6 +26,9 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 /* Define to 1 if you have the <octave/errwarn.h> header file. */
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 #undef HAVE_OCTAVE_ERRWARN_H
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 +/* Define if first catop function argument is const-qualified */
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 +#undef HAVE_OCTAVE_FIRST_CATOP_ARG_CONST
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 /* Define to 1 if you have the <octave/gripes.h> header file. */
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 #undef HAVE_OCTAVE_GRIPES_H
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 diff -uNr a/src/configure b/src/configure
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 --- a/src/configure 2020-01-04 12:50:13.249198461 -0500
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 +++ b/src/configure 2020-08-25 13:48:13.000000000 -0400
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 @@ -4083,6 +4083,63 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 fi
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether first catop function argument is const-qualified" >&5
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 +$as_echo_n "checking whether first catop function argument is const-qualified... " >&6; }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 +if ${comm_cv_octave_first_catop_fcn_arg_const_qualified+:} false; then :
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 + $as_echo_n "(cached) " >&6
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25 +else
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 + comm_save_CPPFLAGS=$CPPFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27 + comm_save_CXXFLAGS=$CXXFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 + CPPFLAGS="$CPPFLAGS $HDF5_CFLAGS"
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 + CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS"
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 + ac_ext=cpp
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31 +ac_cpp='$CXXCPP $CPPFLAGS'
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
33 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 +/* end confdefs.h. */
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 + #include <octave/oct.h>
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 + #include <octave/ov-typeinfo.h>
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 +int
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43 +main ()
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 +{
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 + octave_value foobar_fcn (const octave_base_value&,
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
47 + const octave_base_value&,
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
48 + const Array<octave_idx_type>& ra_idx);
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 + octave::type_info::cat_op_fcn fcn = foobar_fcn;
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
50 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
51 + ;
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
52 + return 0;
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
53 +}
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
54 +_ACEOF
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
55 +if ac_fn_cxx_try_compile "$LINENO"; then :
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
56 + comm_cv_octave_first_catop_fcn_arg_const_qualified=yes
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 +else
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58 + comm_cv_octave_first_catop_fcn_arg_const_qualified=no
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
59 +fi
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
61 + ac_ext=cpp
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
62 +ac_cpp='$CXXCPP $CPPFLAGS'
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
63 +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64 +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
65 +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
66 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
67 + CPPFLAGS=$comm_save_CPPFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
68 + CXXFLAGS=$comm_save_CXXFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
69 +fi
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
70 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $comm_cv_octave_first_catop_fcn_arg_const_qualified" >&5
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
71 +$as_echo "$comm_cv_octave_first_catop_fcn_arg_const_qualified" >&6; }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
72 +if test $comm_cv_octave_first_catop_fcn_arg_const_qualified = yes; then
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
73 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
74 +$as_echo "#define HAVE_OCTAVE_FIRST_CATOP_ARG_CONST 1" >>confdefs.h
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
75 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
76 +fi
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
77 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
78 ac_config_files="$ac_config_files Makefile"
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
79
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
80 cat >confcache <<\_ACEOF
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
81 diff -uNr a/src/configure.ac b/src/configure.ac
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
82 --- a/src/configure.ac 2020-01-04 12:49:06.000000000 -0500
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
83 +++ b/src/configure.ac 2020-08-25 13:47:59.000000000 -0400
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
84 @@ -252,5 +252,30 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
85 AC_DEFINE([HAVE_OCTAVE_BASE_VALUE_PRINT_CONST],[1],[Define if octave_base_value::print is const-qualified])
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
86 fi
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
87
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
88 +AC_CACHE_CHECK([whether first catop function argument is const-qualified],
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
89 + [comm_cv_octave_first_catop_fcn_arg_const_qualified],
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
90 + [comm_save_CPPFLAGS=$CPPFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
91 + comm_save_CXXFLAGS=$CXXFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
92 + CPPFLAGS="$CPPFLAGS $HDF5_CFLAGS"
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
93 + CXXFLAGS="$CXXFLAGS $comm_CXXFLAGS"
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
94 + AC_LANG_PUSH(C++)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
95 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
96 + #include <octave/oct.h>
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
97 + #include <octave/ov-typeinfo.h>
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
98 + ]], [[
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
99 + octave_value foobar_fcn (const octave_base_value&,
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
100 + const octave_base_value&,
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
101 + const Array<octave_idx_type>& ra_idx);
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
102 + octave::type_info::cat_op_fcn fcn = foobar_fcn;
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
103 + ]])],
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
104 + [comm_cv_octave_first_catop_fcn_arg_const_qualified=yes],
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
105 + [comm_cv_octave_first_catop_fcn_arg_const_qualified=no])
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
106 + AC_LANG_POP(C++)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
107 + CPPFLAGS=$comm_save_CPPFLAGS
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
108 + CXXFLAGS=$comm_save_CXXFLAGS])
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
109 +if test $comm_cv_octave_first_catop_fcn_arg_const_qualified = yes; then
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
110 + AC_DEFINE([HAVE_OCTAVE_FIRST_CATOP_ARG_CONST],[1],[Define if first catop function argument is const-qualified])
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
111 +fi
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
112 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
113 AC_CONFIG_FILES([Makefile])
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
114 AC_OUTPUT
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
115 diff -uNr a/src/galois-ops.h b/src/galois-ops.h
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
116 --- a/src/galois-ops.h 2020-01-04 12:49:06.000000000 -0500
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
117 +++ b/src/galois-ops.h 2020-08-25 14:00:18.000000000 -0400
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
118 @@ -40,11 +40,19 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
119 #endif
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
120
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
121 #if ! defined (CATOPDECL)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
122 -# define CATOPDECL(name, a1, a2) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
123 +# if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
124 +# define CATOPDECL(name, a1, a2) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
125 + static octave_value \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
126 + CONCAT2(oct_catop_, name) (const octave_base_value& a1, \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
127 + const octave_base_value& a2, \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
128 + const Array<octave_idx_type>& ra_idx)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
129 +# else
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
130 +# define CATOPDECL(name, a1, a2) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
131 static octave_value \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
132 CONCAT2(oct_catop_, name) (octave_base_value& a1, \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
133 const octave_base_value& a2, \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
134 const Array<octave_idx_type>& ra_idx)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
135 +# endif
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
136 #endif
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
137
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
138 // Override the operator and function definition defines from Octave
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
139 @@ -124,7 +132,24 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
140 return new octave_galois (f (v1.t1 ## _value (), v2.matrix_value ())); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
141 }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
142
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
143 -#define DEFCATOP_G_FN(name, t1, t2, f) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
144 +#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
145 +# define DEFCATOP_G_FN(name, t1, t2, f) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
146 + CATOPDECL (name, a1, a2) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
147 + { \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
148 + CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
149 + return new octave_galois (f (v1.t1 ## _value (), v2.t2 ## _value (), \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
150 + ra_idx)); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
151 + }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
152 +
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
153 +#define DEFCATOP_G_METHOD(name, t1, t2, f) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
154 + CATOPDECL (name, a1, a2) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
155 + { \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
156 + CAST_BINOP_ARGS (const octave_ ## t1&, const octave_ ## t2&); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
157 + return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
158 + ra_idx)); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
159 + }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
160 +#else
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
161 +# define DEFCATOP_G_FN(name, t1, t2, f) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
162 CATOPDECL (name, a1, a2) \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
163 { \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
164 CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
165 @@ -139,6 +164,7 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
166 return new octave_galois (v1.t1 ## _value (). f (v2.t2 ## _value (), \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
167 ra_idx)); \
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
168 }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
169 +#endif
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
170
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
171 #define INSTALL_G_CATOP(t1, t2, f) INSTALL_CATOP (t1, t2, f)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
172
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
173 diff -uNr a/src/op-gm-s.cc b/src/op-gm-s.cc
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
174 --- a/src/op-gm-s.cc 2020-01-04 12:49:06.000000000 -0500
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
175 +++ b/src/op-gm-s.cc 2020-08-25 13:50:19.000000000 -0400
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
176 @@ -68,7 +68,11 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
177
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
178 DEFCATOP (gm_s, galois, scalar)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
179 {
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
180 +#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
181 + CAST_BINOP_ARGS (const octave_galois&, const octave_scalar&);
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
182 +#else
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
183 CAST_BINOP_ARGS (octave_galois&, const octave_scalar&);
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
184 +#endif
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
185 return new octave_galois (v1.galois_value (). concat (v2.matrix_value (),
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
186 ra_idx));
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
187 }
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
188 diff -uNr a/src/op-s-gm.cc b/src/op-s-gm.cc
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
189 --- a/src/op-s-gm.cc 2020-01-04 12:49:06.000000000 -0500
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
190 +++ b/src/op-s-gm.cc 2020-08-25 14:51:01.000000000 -0400
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
191 @@ -81,7 +81,11 @@
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
192
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
193 DEFCATOP (s_gm, scalar, galois)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
194 {
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
195 +#if defined (HAVE_OCTAVE_FIRST_CATOP_ARG_CONST)
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
196 + CAST_BINOP_ARGS (const octave_scalar&, const octave_galois&);
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
197 +#else
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
198 CAST_BINOP_ARGS (octave_scalar&, const octave_galois&);
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
199 +#endif
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
200 return new octave_galois (concat (v1.matrix_value (), v2.galois_value (),
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
201 ra_idx));
d46a116f2c8d * src/of-communications-1-catop.patch: New file.
John W. Eaton <jwe@octave.org>
parents:
diff changeset
202 }