Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
develop
Branches (57)
Tags (69)
develop
gh-pages
release-0.3.0
issue5267
revert-5565-jn/makefile-rule-dynamic
revert-5643-neov2_param
revert-5479-forklock
revert-4741-Pthread_Scalability_Improvement
gemm_batch
revert-5180-openmp_use_cmake
revert-5251-issue5250
timeout-riscv-ci
revert-4920-issue4917
revert-4628-CI-c910v-mips64-loongarch64
risc-v
revert-4153-dgemv
jenkins
revert-4103-windows_perf
utest-riscv
revert-3518-elbrus
v0.3.33
v0.3.32
v0.3.31
v0.3.30
v0.3.29
v0.3.28
v0.3.27
v0.3.26
v0.3.25
v0.3.24
v0.3.23
v0.3.22
v0.3.21
v0.3.20
v0.3.19
v0.3.18
v0.3.17
v0.3.16
v0.3.15
v0.3.14
develop
Branches (57)
Tags (69)
develop
gh-pages
release-0.3.0
issue5267
revert-5565-jn/makefile-rule-dynamic
revert-5643-neov2_param
revert-5479-forklock
revert-4741-Pthread_Scalability_Improvement
gemm_batch
revert-5180-openmp_use_cmake
revert-5251-issue5250
timeout-riscv-ci
revert-4920-issue4917
revert-4628-CI-c910v-mips64-loongarch64
risc-v
revert-4153-dgemv
jenkins
revert-4103-windows_perf
utest-riscv
revert-3518-elbrus
v0.3.33
v0.3.32
v0.3.31
v0.3.30
v0.3.29
v0.3.28
v0.3.27
v0.3.26
v0.3.25
v0.3.24
v0.3.23
v0.3.22
v0.3.21
v0.3.20
v0.3.19
v0.3.18
v0.3.17
v0.3.16
v0.3.15
v0.3.14
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
develop
Branches (57)
Tags (69)
develop
gh-pages
release-0.3.0
issue5267
revert-5565-jn/makefile-rule-dynamic
revert-5643-neov2_param
revert-5479-forklock
revert-4741-Pthread_Scalability_Improvement
gemm_batch
revert-5180-openmp_use_cmake
revert-5251-issue5250
timeout-riscv-ci
revert-4920-issue4917
revert-4628-CI-c910v-mips64-loongarch64
risc-v
revert-4153-dgemv
jenkins
revert-4103-windows_perf
utest-riscv
revert-3518-elbrus
v0.3.33
v0.3.32
v0.3.31
v0.3.30
v0.3.29
v0.3.28
v0.3.27
v0.3.26
v0.3.25
v0.3.24
v0.3.23
v0.3.22
v0.3.21
v0.3.20
v0.3.19
v0.3.18
v0.3.17
v0.3.16
v0.3.15
v0.3.14
max.c 4.58 KB
Copy Edit Raw Blame History
kseniyazaytseva authored 2024年02月10日 05:48 +08:00 . check for zero inc
/*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* 1. Redistributions of source code must retain the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer. */
/* */
/* 2. Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials */
/* provided with the distribution. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY OF TEXAS AT */
/* AUSTIN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, */
/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
/* DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT */
/* AUSTIN OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, */
/* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
/* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE */
/* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR */
/* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT */
/* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE */
/* POSSIBILITY OF SUCH DAMAGE. */
/* */
/* The views and conclusions contained in the software and */
/* documentation are those of the authors and should not be */
/* interpreted as representing official policies, either expressed */
/* or implied, of The University of Texas at Austin. */
/*********************************************************************/
#include <stdio.h>
#include "common.h"
#ifdef FUNCTION_PROFILE
#include "functable.h"
#endif
#undef MAX_K
#ifdef USE_ABS
#if defined(DOUBLE)
#define ABS fabs
#else
#define ABS fabsf
#endif
#ifndef USE_MIN
/* ABS & MAX */
#ifndef COMPLEX
#ifdef XDOUBLE
#define MAX_K QAMAX_K
#elif defined(DOUBLE)
#define MAX_K DAMAX_K
#else
#define MAX_K SAMAX_K
#endif
#else
#ifdef XDOUBLE
#define MAX_K XAMAX_K
#elif defined(DOUBLE)
#define MAX_K ZAMAX_K
#else
#define MAX_K CAMAX_K
#endif
#endif
#else
/* ABS & MIN */
#ifndef COMPLEX
#ifdef XDOUBLE
#define MAX_K QAMIN_K
#elif defined(DOUBLE)
#define MAX_K DAMIN_K
#else
#define MAX_K SAMIN_K
#endif
#else
#ifdef XDOUBLE
#define MAX_K XAMIN_K
#elif defined(DOUBLE)
#define MAX_K ZAMIN_K
#else
#define MAX_K CAMIN_K
#endif
#endif
#endif
#else
#define ABS
#ifndef USE_MIN
/* MAX */
#ifdef XDOUBLE
#define MAX_K QMAX_K
#elif defined(DOUBLE)
#define MAX_K DMAX_K
#else
#define MAX_K SMAX_K
#endif
#else
/* MIN */
#ifdef XDOUBLE
#define MAX_K QMIN_K
#elif defined(DOUBLE)
#define MAX_K DMIN_K
#else
#define MAX_K SMIN_K
#endif
#endif
#endif
#ifndef CBLAS
FLOATRET NAME(blasint *N, FLOAT *x, blasint *INCX){
BLASLONG n = *N;
BLASLONG incx = *INCX;
FLOATRET ret;
PRINT_DEBUG_NAME;
if (n <= 0) return 0;
#ifndef COMPLEX
if (incx == 0) return (ABS(*x));
#else
if (incx == 0) return (ABS(*x) + ABS(*(x+1)));
#endif
IDEBUG_START;
FUNCTION_PROFILE_START();
ret = (FLOATRET)MAX_K(n, x, incx);
FUNCTION_PROFILE_END(COMPSIZE, n, 0);
IDEBUG_END;
return ret;
}
#else
#ifdef COMPLEX
FLOAT CNAME(blasint n, void *vx, blasint incx){
FLOAT *x = (FLOAT*) vx;
#else
FLOAT CNAME(blasint n, FLOAT *x, blasint incx){
#endif
FLOAT ret;
PRINT_DEBUG_CNAME;
if (n <= 0) return 0;
#ifndef COMPLEX
if (incx == 0) return (ABS(*x));
#else
if (incx == 0) return (ABS(*x) + ABS(*(x+1)));
#endif
IDEBUG_START;
FUNCTION_PROFILE_START();
ret = MAX_K(n, x, incx);
FUNCTION_PROFILE_END(COMPSIZE, n, 0);
IDEBUG_END;
return ret;
}
#endif
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

No description
Cancel

Releases (1)

All

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mll/OpenBLAS.git
git@gitee.com:mll/OpenBLAS.git
mll
OpenBLAS
OpenBLAS
develop
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /