Skip to content

Commit

Permalink
clang-format corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
amcamd committed Jul 25, 2024
1 parent 8b7c1a7 commit 09b536d
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions clients/include/hipblas_init.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ void hipblas_init_matrix_trig(hipblas_matrix_type matrix_type,
#endif
for(size_t i = 0; i < M; ++i)
for(size_t j = 0; j < N; ++j)
A[i + j * lda] = T(seedReset ? cos(i + j * M ) : sin(i + j * M ));
A[i + j * lda] = T(seedReset ? cos(i + j * M) : sin(i + j * M));
}
else if(matrix_type == hipblas_hermitian_matrix)
{
Expand All @@ -355,7 +355,7 @@ void hipblas_init_matrix_trig(hipblas_matrix_type matrix_type,
for(size_t i = 0; i < N; ++i)
for(size_t j = 0; j <= i; ++j)
{
auto value = T(seedReset ? cos(i + j * N ) : sin(i + j * N ));
auto value = T(seedReset ? cos(i + j * N) : sin(i + j * N));

if(i == j)
A[j + i * lda] = hipblas_real(value);
Expand Down Expand Up @@ -384,7 +384,7 @@ void hipblas_init_matrix_trig(hipblas_matrix_type matrix_type,
for(size_t i = 0; i < N; ++i)
for(size_t j = 0; j <= i; ++j)
{
auto value = T(seedReset ? cos(i + j * N ) : sin(i + j * N ));
auto value = T(seedReset ? cos(i + j * N) : sin(i + j * N));
if(i == j)
A[j + i * lda] = value;
else if(uplo == 'U')
Expand Down Expand Up @@ -414,9 +414,8 @@ void hipblas_init_matrix_trig(hipblas_matrix_type matrix_type,
{
auto value
= uplo == 'U'
? (j >= i ? T(seedReset ? cos(i + j * M ) : sin(i + j * M )) : T(0))
: (j <= i ? T(seedReset ? cos(i + j * M ) : sin(i + j * M ))
: T(0));
? (j >= i ? T(seedReset ? cos(i + j * M) : sin(i + j * M)) : T(0))
: (j <= i ? T(seedReset ? cos(i + j * M) : sin(i + j * M)) : T(0));
A[i + j * lda] = value;
}
}
Expand All @@ -436,7 +435,7 @@ void hipblas_init_vector_trig(T* x, int64_t N, int64_t incx, bool seedReset = fa
#pragma omp parallel for
#endif
for(int64_t j = 0; j < N; ++j)
x[j * incx] = T(seedReset ? cos(j ) : sin(j ));
x[j * incx] = T(seedReset ? cos(j) : sin(j));
}

/* ============================================================================================ */
Expand Down

0 comments on commit 09b536d

Please sign in to comment.