deeplearning4j/deeplearning4j

View on GitHub
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/blas/JcublasLevel2.java

Summary

Maintainability
F
6 days
Test Coverage

JcublasLevel2 has 32 methods (exceeds 20 allowed). Consider refactoring.
Open

public class JcublasLevel2 extends BaseLevel2 {
    private Allocator allocator = AtomicAllocator.getInstance();
    private Nd4jBlas nd4jBlas = (Nd4jBlas) Nd4j.factory().blas();
    private NativeOps nativeOps = NativeOpsHolder.getInstance().getDeviceNativeOps();
    private static Logger logger = LoggerFactory.getLogger(JcublasLevel2.class);

    Method sgbmv has 14 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected void sgbmv(char order, char TransA, int M, int N, int KL, int KU, float alpha, INDArray A, int lda,
                        INDArray X, int incX, float beta, INDArray Y, int incY) {

      Method dgbmv has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          protected void dgbmv(char order, char TransA, int M, int N, int KL, int KU, double alpha, INDArray A, int lda,
                          INDArray X, int incX, double beta, INDArray Y, int incY) {

        Method dgemv has 12 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            protected void dgemv(char order, char TransA, int M, int N, double alpha, INDArray A, int lda, INDArray X, int incX,
                            double beta, INDArray Y, int incY) {

          Method ssbmv has 12 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              protected void ssbmv(char order, char Uplo, int N, int K, float alpha, INDArray A, int lda, INDArray X, int incX,
                              float beta, INDArray Y, int incY) {

            Method dsbmv has 12 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                protected void dsbmv(char order, char Uplo, int N, int K, double alpha, INDArray A, int lda, INDArray X, int incX,
                                double beta, INDArray Y, int incY) {

              Method sgemv has 12 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  protected void sgemv(char order, char TransA, int M, int N, float alpha, INDArray A, int lda, INDArray X, int incX,
                                  float beta, INDArray Y, int incY) {

                Method ssymv has 11 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    protected void ssymv(char order, char Uplo, int N, float alpha, INDArray A, int lda, INDArray X, int incX,
                                    float beta, INDArray Y, int incY) {

                  Method dsymv has 11 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      protected void dsymv(char order, char Uplo, int N, double alpha, INDArray A, int lda, INDArray X, int incX,
                                      double beta, INDArray Y, int incY) {

                    Method sspmv has 10 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        protected void sspmv(char order, char Uplo, int N, float alpha, INDArray Ap, INDArray X, int incX, float beta,
                                        INDArray Y, int incY) {

                      Method dsyr2 has 10 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          protected void dsyr2(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray Y, int incY,
                                          INDArray A, int lda) {

                        Method dspmv has 10 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            protected void dspmv(char order, char Uplo, int N, double alpha, INDArray Ap, INDArray X, int incX, double beta,
                                            INDArray Y, int incY) {

                          Method dger has 10 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              protected void dger(char order, int M, int N, double alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A,
                                              int lda) {

                            Method sger has 10 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                protected void sger(char order, int M, int N, float alpha, INDArray X, int incX, INDArray Y, int incY, INDArray A,
                                                int lda) {

                              Method stbmv has 10 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  protected void stbmv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X,
                                                  int incX) {

                                Method dtbmv has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    protected void dtbmv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X,
                                                    int incX) {

                                  Method dtbsv has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      protected void dtbsv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X,
                                                      int incX) {

                                    Method stbsv has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        protected void stbsv(char order, char Uplo, char TransA, char Diag, int N, int K, INDArray A, int lda, INDArray X,
                                                        int incX) {

                                      Method ssyr2 has 10 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          protected void ssyr2(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray Y, int incY,
                                                          INDArray A, int lda) {

                                        Method dtrsv has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            protected void dtrsv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X,
                                                            int incX) {

                                          Method dtrmv has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                              protected void dtrmv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X,
                                                              int incX) {

                                            Method dspr2 has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                protected void dspr2(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray Y, int incY,
                                                                INDArray A) {

                                              Method strsv has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  protected void strsv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X,
                                                                  int incX) {

                                                Method sspr2 has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    protected void sspr2(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray Y, int incY,
                                                                    INDArray A) {

                                                  Method strmv has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      protected void strmv(char order, char Uplo, char TransA, char Diag, int N, INDArray A, int lda, INDArray X,
                                                                      int incX) {

                                                    Method ssyr has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        protected void ssyr(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray A, int lda) {

                                                      Method dsyr has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          protected void dsyr(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray A, int lda) {

                                                        Method stpsv has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            protected void stpsv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX) {

                                                          Method stpmv has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              protected void stpmv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX) {

                                                            Method dtpsv has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                protected void dtpsv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX) {

                                                              Method dtpmv has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                  protected void dtpmv(char order, char Uplo, char TransA, char Diag, int N, INDArray Ap, INDArray X, int incX) {

                                                                Method dspr has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                    protected void dspr(char order, char Uplo, int N, double alpha, INDArray X, int incX, INDArray Ap) {

                                                                  Method sspr has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                      protected void sspr(char order, char Uplo, int N, float alpha, INDArray X, int incX, INDArray Ap) {

                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                    Open

                                                                        @Override
                                                                        protected void dgemv(char order, char TransA, int M, int N, double alpha, INDArray A, int lda, INDArray X, int incX,
                                                                                        double beta, INDArray Y, int incY) {
                                                                    
                                                                            Nd4j.getExecutioner().push();
                                                                    nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/blas/JcublasLevel2.java on lines 55..79

                                                                    Duplicated Code

                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                    Tuning

                                                                    This issue has a mass of 177.

                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                    Refactorings

                                                                    Further Reading

                                                                    Similar blocks of code found in 2 locations. Consider refactoring.
                                                                    Open

                                                                        @Override
                                                                        protected void sgemv(char order, char TransA, int M, int N, float alpha, INDArray A, int lda, INDArray X, int incX,
                                                                                        float beta, INDArray Y, int incY) {
                                                                    
                                                                            Nd4j.getExecutioner().push();
                                                                    nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/blas/JcublasLevel2.java on lines 127..151

                                                                    Duplicated Code

                                                                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                    Tuning

                                                                    This issue has a mass of 177.

                                                                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                    Refactorings

                                                                    Further Reading

                                                                    There are no issues that match your filters.

                                                                    Category
                                                                    Status