Skip to content

Commit 2feef49

Browse files
committed
Merge branch 'develop' into cmake
Conflicts: driver/others/memory.c
2 parents 53b6023 + 5a29160 commit 2feef49

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

driver/others/memory.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
142142
#if defined(_MSC_VER) && !defined(__clang__)
143143
#define CONSTRUCTOR __cdecl
144144
#define DESTRUCTOR __cdecl
145+
#elif defined(OS_DARWIN) && defined(C_GCC)
146+
#define CONSTRUCTOR __attribute__ ((constructor))
147+
#define DESTRUCTOR __attribute__ ((destructor))
145148
#else
146149
#define CONSTRUCTOR __attribute__ ((constructor(101)))
147150
#define DESTRUCTOR __attribute__ ((destructor(101)))

interface/imax.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ blasint NAME(blasint *N, FLOAT *x, blasint *INCX){
136136

137137
ret = (blasint)MAX_K(n, x, incx);
138138

139+
if(ret > n) ret=n;
140+
139141
FUNCTION_PROFILE_END(COMPSIZE, n, 0);
140142

141143
IDEBUG_END;
@@ -159,6 +161,8 @@ CBLAS_INDEX CNAME(blasint n, FLOAT *x, blasint incx){
159161

160162
ret = MAX_K(n, x, incx);
161163

164+
if (ret > n) ret=n;
165+
162166
if (ret) ret --;
163167

164168
FUNCTION_PROFILE_END(COMPSIZE, n, 0);

0 commit comments

Comments
 (0)