// SPDX-License-Identifier: Apache-2.0 // // Copyright 2008-2016 Conrad Sanderson (http://conradsanderson.id.au) // Copyright 2008-2016 National ICT Australia (NICTA) // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // ------------------------------------------------------------------------ //! \addtogroup op_cx_scalar //! @{ template inline void op_cx_scalar_times::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_times>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::use_at == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_plus::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_plus>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::use_at == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_minus_pre::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_minus_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::use_at == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_minus_post::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_minus_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::use_at == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_div_pre::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_div_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::use_at == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_div_post::apply ( Mat< typename std::complex >& out, const mtOp, T1, op_cx_scalar_div_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const Proxy A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); out.set_size(n_rows, n_cols); const eT k = X.aux_out_eT; eT* out_mem = out.memptr(); if(Proxy::use_at == false) { const uword n_elem = A.get_n_elem(); for(uword i=0; i inline void op_cx_scalar_times::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_times>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::use_at == false) { for(uword i=0; i inline void op_cx_scalar_plus::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_plus>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::use_at == false) { for(uword i=0; i inline void op_cx_scalar_minus_pre::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_minus_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::use_at == false) { for(uword i=0; i inline void op_cx_scalar_minus_post::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_minus_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::use_at == false) { for(uword i=0; i inline void op_cx_scalar_div_pre::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_div_pre>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::use_at == false) { for(uword i=0; i inline void op_cx_scalar_div_post::apply ( Cube< typename std::complex >& out, const mtOpCube, T1, op_cx_scalar_div_post>& X ) { arma_extra_debug_sigprint(); typedef typename std::complex eT; const ProxyCube A(X.m); const uword n_rows = A.get_n_rows(); const uword n_cols = A.get_n_cols(); const uword n_slices = A.get_n_slices(); out.set_size(n_rows, n_cols, n_slices); const eT k = X.aux_out_eT; const uword n_elem = out.n_elem; eT* out_mem = out.memptr(); if(ProxyCube::use_at == false) { for(uword i=0; i