deeplearning4j/deeplearning4j

View on GitHub
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java

Summary

Maintainability
F
4 days
Test Coverage

CpuLevel1 has 42 methods (exceeds 20 allowed). Consider refactoring.
Open

public class CpuLevel1 extends BaseLevel1 {
    private Nd4jBlas nd4jBlas = (Nd4jBlas) Nd4j.factory().blas();

    @Override
    protected float sdsdot(long N, float alpha, INDArray X, int incX, INDArray Y, int incY) {

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

        public void saxpy(long n, float alpha, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY) {

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

          public void haxpy(long n, float alpha, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY) {

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

            public void daxpy(long n, double alpha, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY) {

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

              protected float hdot(long N, DataBuffer X, int offsetX, int incX, DataBuffer Y, int offsetY, int incY) {

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

                protected double ddot(long N, DataBuffer X, int offsetX, int incX, DataBuffer Y, int offsetY, int incY) {

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

                  protected float sdot(long N, DataBuffer X, int offsetX, int incX, DataBuffer Y, int offsetY, int incY) {

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

                    protected void srot(long N, INDArray X, int incX, INDArray Y, int incY, float c, float s) {

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

                      protected void drot(long N, INDArray X, int incX, INDArray Y, int incY, double c, double s) {

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

                        protected void dcopy(long n, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY) {

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

                          protected void scopy(long n, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY) {

                        Method sdsdot has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            protected float sdsdot(long N, float alpha, INDArray X, int incX, INDArray Y, int incY) {

                          Method daxpy has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              protected void daxpy(long N, double alpha, INDArray X, int incX, INDArray Y, int incY) {

                            Method haxpy has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                protected void haxpy(long N, float alpha, INDArray X, int incX, INDArray Y, int incY) {

                              Method saxpy has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  protected void saxpy(long N, float alpha, INDArray X, int incX, INDArray Y, int incY) {

                                Method drotm has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    protected void drotm(long N, INDArray X, int incX, INDArray Y, int incY, INDArray P) {

                                  Method srotm has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                      protected void srotm(long N, INDArray X, int incX, INDArray Y, int incY, INDArray P) {

                                    Method hdot has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        protected float hdot(long N, INDArray X, int incX, INDArray Y, int incY) {

                                      Method ddot has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          protected double ddot(long N, INDArray X, int incX, INDArray Y, int incY) {

                                        Method dsdot has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                            protected double dsdot(long N, INDArray X, int incX, INDArray Y, int incY) {

                                          Method sdot has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open

                                              protected float sdot(long N, INDArray X, int incX, INDArray Y, int incY) {

                                            Method sswap has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                                protected void sswap(long N, INDArray X, int incX, INDArray Y, int incY) {

                                              Method srotmg has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  protected void srotmg(float d1, float d2, float b1, float b2, INDArray P) {

                                                Method dcopy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    protected void dcopy(long N, INDArray X, int incX, INDArray Y, int incY) {

                                                  Method scopy has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      protected void scopy(long N, INDArray X, int incX, INDArray Y, int incY) {

                                                    Method dswap has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        protected void dswap(long N, INDArray X, int incX, INDArray Y, int incY) {

                                                      Method drotmg has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          protected void drotmg(double d1, double d2, double b1, double b2, INDArray P) {

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

                                                            @Override
                                                            protected double ddot(long N, INDArray X, int incX, INDArray Y, int incY) {
                                                                if (incX >= 1 && incY >= 1) {
                                                                    return Nd4j.getBlasLapackDelegator().cblas_ddot((int) N, (DoublePointer) X.data().addressPointer(), incX,
                                                                                    (DoublePointer) Y.data().addressPointer(), incY);
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 62..73

                                                        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 90.

                                                        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 float sdot(long N, INDArray X, int incX, INDArray Y, int incY) {
                                                                if (incX >= 1 && incY >= 1) {
                                                                    return Nd4j.getBlasLapackDelegator().cblas_sdot((int) N, (FloatPointer) X.data().addressPointer(), incX,
                                                                                    (FloatPointer) Y.data().addressPointer(), incY);
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 80..91

                                                        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 90.

                                                        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 drotm(long N, INDArray X, int incX, INDArray Y, int incY, INDArray P) {
                                                                Nd4j.getBlasLapackDelegator().cblas_drotm((int) N, (DoublePointer) X.data().addressPointer(), incX, (DoublePointer) Y.data().addressPointer(), incY,
                                                                                (DoublePointer) P.data().addressPointer());
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 233..238

                                                        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 49.

                                                        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 srotm(long N, INDArray X, int incX, INDArray Y, int incY, INDArray P) {
                                                                Nd4j.getBlasLapackDelegator().cblas_srotm((int) N, (FloatPointer) X.data().addressPointer(), incX, (FloatPointer) Y.data().addressPointer(), incY,
                                                                                (FloatPointer) P.data().addressPointer());
                                                        
                                                        
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 258..262

                                                        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 49.

                                                        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 srot(long N, INDArray X, int incX, INDArray Y, int incY, float c, float s) {
                                                                Nd4j.getBlasLapackDelegator().cblas_srot((int) N, (FloatPointer) X.data().addressPointer(), incX, (FloatPointer) Y.data().addressPointer(), incY, c,
                                                                                s);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 251..255

                                                        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 46.

                                                        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 drot(long N, INDArray X, int incX, INDArray Y, int incY, double c, double s) {
                                                                Nd4j.getBlasLapackDelegator().cblas_drot((int) N, (DoublePointer) X.data().addressPointer(), incX, (DoublePointer) Y.data().addressPointer(), incY,
                                                                                c, s);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 227..231

                                                        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 46.

                                                        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 saxpy(long N, float alpha, INDArray X, int incX, INDArray Y, int incY) {
                                                                Nd4j.getBlasLapackDelegator().cblas_saxpy((int) N, alpha, (FloatPointer) X.data().addressPointer(), incX, (FloatPointer) Y.data().addressPointer(),
                                                                                incY);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 203..208

                                                        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 43.

                                                        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 daxpy(long N, double alpha, INDArray X, int incX, INDArray Y, int incY) {
                                                                Nd4j.getBlasLapackDelegator().cblas_daxpy((int) N, alpha, (DoublePointer) X.data().addressPointer(), incX,
                                                                                (DoublePointer) Y.data().addressPointer(), incY);
                                                        
                                                        
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 169..173

                                                        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 43.

                                                        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 4 locations. Consider refactoring.
                                                        Open

                                                            @Override
                                                            protected void sswap(long N, INDArray X, int incX, INDArray Y, int incY) {
                                                                Nd4j.getBlasLapackDelegator().cblas_sswap((int) N, (FloatPointer) X.data().addressPointer(), incX, (FloatPointer) Y.data().addressPointer(), incY);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 154..157
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 186..190
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 192..196

                                                        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 40.

                                                        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 4 locations. Consider refactoring.
                                                        Open

                                                            @Override
                                                            protected void dswap(long N, INDArray X, int incX, INDArray Y, int incY) {
                                                                Nd4j.getBlasLapackDelegator().cblas_dswap((int) N, (DoublePointer) X.data().addressPointer(), incX, (DoublePointer) Y.data().addressPointer(),
                                                                                incY);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 149..152
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 154..157
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 192..196

                                                        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 40.

                                                        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 4 locations. Consider refactoring.
                                                        Open

                                                            @Override
                                                            protected void scopy(long N, INDArray X, int incX, INDArray Y, int incY) {
                                                                Nd4j.getBlasLapackDelegator().cblas_scopy((int) N, (FloatPointer) X.data().addressPointer(), incX, (FloatPointer) Y.data().addressPointer(), incY);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 149..152
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 186..190
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 192..196

                                                        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 40.

                                                        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 4 locations. Consider refactoring.
                                                        Open

                                                            @Override
                                                            protected void dcopy(long N, INDArray X, int incX, INDArray Y, int incY) {
                                                                Nd4j.getBlasLapackDelegator().cblas_dcopy((int) N, (DoublePointer) X.data().addressPointer(), incX, (DoublePointer) Y.data().addressPointer(),
                                                                                incY);
                                                            }
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 149..152
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 154..157
                                                        nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cpu-backend-common/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/CpuLevel1.java on lines 186..190

                                                        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 40.

                                                        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