We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notice below that you could omit the check if (nrow==np) because num_symmetric_modes = nrow/np = 1 .
if (nrow==np)
num_symmetric_modes = nrow/np = 1
Thus, the loop iterates only once and mode=0, so mode_offset = mode*np = 0*np = 0 when there is only one iteration and that a == a.segment()
mode=0
mode_offset = mode*np = 0*np = 0
a == a.segment()
Maybe its a touch faster if a.segment actually copies the array, but if it generates a reference then it is sthe same.
Is this redundant, or am I missing something?
-Eric
void factrs(nec_output_file& s_output, int64_t np, int64_t nrow, complex_array& a, int_array& ip ) { DEBUG_TRACE("factrs(" << np << "," << nrow << ")"); if (nrow == np) { // no symmetry lu_decompose(s_output, np, a, ip, nrow ); return; } int num_symmetric_modes = static_cast<int>(nrow / np); DEBUG_TRACE("\tnum_symmetric_modes = " << num_symmetric_modes); for (int mode = 0; mode < num_symmetric_modes; mode++ ) { int64_t mode_offset = mode * np; complex_array a_temp = a.segment(mode_offset, a.size()-mode_offset); int_array ip_temp = ip.segment(mode_offset, ip.size()-mode_offset); lu_decompose(s_output, np, a_temp, ip_temp, nrow ); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Notice below that you could omit the check
if (nrow==np)
becausenum_symmetric_modes = nrow/np = 1
.Thus, the loop iterates only once and
mode=0
, somode_offset = mode*np = 0*np = 0
when there is only one iteration and thata == a.segment()
Maybe its a touch faster if a.segment actually copies the array, but if it generates a reference then it is sthe same.
Is this redundant, or am I missing something?
-Eric
The text was updated successfully, but these errors were encountered: