Update idamin.c

This commit is contained in:
Abdelrauf 2018-01-03 07:40:09 -08:00 committed by GitHub
parent 17b993c0a3
commit de3dd61036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -37,7 +37,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endif #endif
static BLASLONG __attribute__((noinline)) diamin_kernel_32(BLASLONG n, FLOAT *x, FLOAT *maxf) { static BLASLONG __attribute__((noinline)) diamin_kernel_32(BLASLONG n, FLOAT *x, FLOAT *minf) {
__asm__( __asm__(
"pfd 1, 0(%1) \n\t" "pfd 1, 0(%1) \n\t"
@ -171,7 +171,7 @@ static BLASLONG __attribute__((noinline)) diamin_kernel_32(BLASLONG n, FLOAT *x,
"std %%f0,0(%2) \n\t" "std %%f0,0(%2) \n\t"
: :
: "r"(n), "a"(x), "a"(maxf) : "r"(n), "a"(x), "a"(minf)
: "cc", "memory","r0","r1","r2","f0","v0","v1","v2","v3","v4","v5","v6","v7","v16", : "cc", "memory","r0","r1","r2","f0","v0","v1","v2","v3","v4","v5","v6","v7","v16",
"v17","v18","v19","v20","v21","v22","v23","v24","v25","v26","v27","v28","v29","v30","v31" "v17","v18","v19","v20","v21","v22","v23","v24","v25","v26","v27","v28","v29","v30","v31"
@ -183,18 +183,17 @@ BLASLONG CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x) {
BLASLONG i = 0; BLASLONG i = 0;
BLASLONG j = 0; BLASLONG j = 0;
BLASLONG ix = 0; BLASLONG ix = 0;
FLOAT minf = 0.0;
BLASLONG min = 0; BLASLONG min = 0;
FLOAT minf = 0.0;
if (n <= 0 || inc_x <= 0) return (min); if (n <= 0 || inc_x <= 0) return (min);
minf = ABS(x[0]); //index's not incremented,though it will make first comparision redundant
if (inc_x == 1) { if (inc_x == 1) {
BLASLONG n1 = n & -32; BLASLONG n1 = n & -32;
if (n1 > 0) { if (n1 > 0) {
min = diamin_kernel_32(n1, x, &minf); min = diamin_kernel_32(n1, x, &minf);
i = n1; i = n1;
} }