Simple, O(n_features) temp space algorithm: densify row by row, then subtract and compute L1 norm. Added BLAS support code (cblas_dasum) to speed this up by a factor of two on x86-64 w/ GCC and ATLAS for pair of 93% sparse matrices of shape 1000*3000. That's an order of magnitude faster than the dense version. Also cleaned up chi2 kernel code while I was at it and added a nogil decl. |
||
|---|---|---|
| .. | ||
| ATL_drefasum.c | ||
| ATL_drefcopy.c | ||
| ATL_drefgemv.c | ||
| ATL_drefgemvN.c | ||
| ATL_drefgemvT.c | ||
| ATL_drefger.c | ||
| ATL_drefrot.c | ||
| ATL_drefrotg.c | ||
| ATL_srefcopy.c | ||
| ATL_srefrot.c | ||
| ATL_srefrotg.c | ||
| README.txt | ||
| atlas_aux.h | ||
| atlas_dsysinfo.h | ||
| atlas_enum.h | ||
| atlas_level1.h | ||
| atlas_level2.h | ||
| atlas_misc.h | ||
| atlas_refalias1.h | ||
| atlas_refalias2.h | ||
| atlas_reflevel1.h | ||
| atlas_reflevel2.h | ||
| atlas_reflvl2.h | ||
| atlas_refmisc.h | ||
| atlas_ssysinfo.h | ||
| atlas_type.h | ||
| cblas.h | ||
| cblas_dasum.c | ||
| cblas_daxpy.c | ||
| cblas_dcopy.c | ||
| cblas_ddot.c | ||
| cblas_dgemv.c | ||
| cblas_dger.c | ||
| cblas_dnrm2.c | ||
| cblas_drot.c | ||
| cblas_drotg.c | ||
| cblas_dscal.c | ||
| cblas_errprn.c | ||
| cblas_scopy.c | ||
| cblas_srot.c | ||
| cblas_srotg.c | ||
| cblas_xerbla.c | ||
README.txt
This is a stripped-down version of CBLAS (C-interface to the Basic Linear
Algebra Subroutines), containing only those parts used by scikit-learn's
C/C++/Cython extensions. It is used when no CBLAS implementation is available
at build time.
Sources here are taken from the reference implementation in ATLAS. To add new
algorithms, the only thing that should be done is to copy the reference
implementation from ${ATLAS}/src/blas/reference/level* into this directory.
Header files are taken from ${ATLAS}/include, the only change being the
inclusion of "atlas_refalias*.h" into its respective "atlas_level*.h" file.