|
Skylark (Sketching Library)
0.1
|
#include "mpi.h"#include "../../config.h"#include "../../utility/distributions.hpp"#include "../sketch.hpp"#include "../../base/context.hpp"

Go to the source code of this file.
| #define SL_COLUMNWISE 1 |
Definition at line 68 of file sketchc.hpp.
| #define SL_ROWWISE 2 |
Definition at line 69 of file sketchc.hpp.
| SKYLARK_EXTERN_API int sl_apply_sketch_transform | ( | sketchc::sketch_transform_t * | S, |
| char * | input_type, | ||
| void * | A, | ||
| char * | output_type, | ||
| void * | SA, | ||
| int | dim | ||
| ) |
Apply the sketch transformation to a matrix.
| S | sketch transform |
| input_type | input matrix type |
| A | input matrix |
| output_type | output matrix type |
| SA | sketched matrix |
| dim | dimension on which to sketch (SL_COLUMNWISE/ROWWISE) |
Definition at line 336 of file capi.cpp.
References AUTO_APPLY_DISPATCH, skylark::sketch::c::CT, skylark::sketch::c::CWT, skylark::sketch::c::DIST_MATRIX, skylark::sketch::c::DIST_MATRIX_STAR_VC, skylark::sketch::c::DIST_MATRIX_STAR_VR, skylark::sketch::c::DIST_MATRIX_VC_STAR, skylark::sketch::c::DIST_MATRIX_VR_STAR, skylark::sketch::c::DIST_SPARSE_MATRIX, skylark::sketch::c::ExpSemigroupRLT, skylark::sketch::c::FastGaussianRFT, skylark::sketch::c::FJLT, skylark::sketch::c::GaussianRFT, skylark::sketch::c::JLT, skylark::sketch::c::LaplacianRFT, skylark::sketch::c::MATRIX, skylark::sketch::c::MMT, skylark::sketch::c::PPT, skylark::sketch::c::SPARSE_MATRIX, skylark::sketch::c::sketch_transform_t::type, and skylark::sketch::c::WZT.
| SKYLARK_EXTERN_API int sl_create_context | ( | int | seed, |
| MPI_Comm | cm, | ||
| base::context_t ** | ctxt | ||
| ) |
Creating a Skylark context required for applying sketches.
| seed | for the rng generator |
| cm | MPI communicator used |
Definition at line 201 of file capi.cpp.
References SKYLARK_BEGIN_TRY, SKYLARK_CATCH_AND_RETURN_ERROR_CODE, and SKYLARK_END_TRY.
| SKYLARK_EXTERN_API int sl_create_default_context | ( | int | seed, |
| base::context_t ** | ctxt | ||
| ) |
Creating a default Skylark context required for applying sketches.
| seed | for the rng generator |
Support for skylark::base::context_t.
Definition at line 192 of file capi.cpp.
References SKYLARK_BEGIN_TRY, SKYLARK_CATCH_AND_RETURN_ERROR_CODE, and SKYLARK_END_TRY.
| SKYLARK_EXTERN_API int sl_create_sketch_transform | ( | base::context_t * | ctxt, |
| char * | type_, | ||
| int | n, | ||
| int | s, | ||
| sketchc::sketch_transform_t ** | sketch, | ||
| ... | |||
| ) |
Creating a sketch transformation.
| ctxt | Sklark context |
| type | type of the sketch |
| n | input size |
| s | output size |
Transforms
Definition at line 219 of file capi.cpp.
References AUTO_NEW_DISPATCH, AUTO_NEW_DISPATCH_1P, skylark::sketch::c::CT, skylark::sketch::c::CWT, skylark::sketch::c::ExpSemigroupRLT, skylark::sketch::c::FastGaussianRFT, skylark::sketch::c::FJLT, skylark::sketch::c::GaussianRFT, skylark::sketch::c::JLT, skylark::sketch::c::LaplacianRFT, skylark::sketch::c::MMT, skylark::sketch::c::PPT, SKYLARK_BEGIN_TRY, SKYLARK_CATCH_AND_RETURN_ERROR_CODE, SKYLARK_END_TRY, and skylark::sketch::c::WZT.
| SKYLARK_EXTERN_API int sl_deserialize_sketch_transform | ( | const char * | data, |
| sketchc::sketch_transform_t ** | sketch | ||
| ) |
Deserialize a sketch transformation.
| data | string of serialized JSON structure |
| sketch | the deserialized sketch transformation |
Definition at line 278 of file capi.cpp.
References skylark::sketch::sketch_transform_data_t::from_ptree(), and skylark::sketch::sketch_transform_data_t::get_type().

| SKYLARK_EXTERN_API int sl_free_context | ( | base::context_t * | ctxt | ) |
Free resources hold by a Skylark context.
| ctxt | Skylark context |
Definition at line 210 of file capi.cpp.
References SKYLARK_BEGIN_TRY, SKYLARK_CATCH_AND_RETURN_ERROR_CODE, and SKYLARK_END_TRY.
| SKYLARK_EXTERN_API int sl_free_raw_matrix_wrap | ( | void * | A_ | ) |
| SKYLARK_EXTERN_API int sl_free_raw_sp_matrix_wrap | ( | void * | A_ | ) |
| SKYLARK_EXTERN_API int sl_free_sketch_transform | ( | sketchc::sketch_transform_t * | S | ) |
Free resources hold by a sketch transformation.
| S | sketch transform |
Definition at line 307 of file capi.cpp.
References AUTO_DELETE_DISPATCH, skylark::sketch::c::CT, skylark::sketch::c::CWT, skylark::sketch::c::ExpSemigroupRLT, skylark::sketch::c::FastGaussianRFT, skylark::sketch::c::FJLT, skylark::sketch::c::GaussianRFT, skylark::sketch::c::JLT, skylark::sketch::c::LaplacianRFT, skylark::sketch::c::MMT, skylark::sketch::c::PPT, skylark::sketch::c::sketch_transform_t::type, and skylark::sketch::c::WZT.
| SKYLARK_EXTERN_API bool sl_has_combblas | ( | ) |
| SKYLARK_EXTERN_API bool sl_has_elemental | ( | ) |
| SKYLARK_EXTERN_API int sl_raw_sp_matrix_data | ( | void * | A_, |
| int32_t * | indptr, | ||
| int32_t * | indices, | ||
| double * | values | ||
| ) |
| SKYLARK_EXTERN_API int sl_raw_sp_matrix_nnz | ( | void * | A_, |
| int * | nnz | ||
| ) |
| SKYLARK_EXTERN_API int sl_raw_sp_matrix_reset_update_flag | ( | void * | A_ | ) |
| SKYLARK_EXTERN_API int sl_raw_sp_matrix_struct_updated | ( | void * | A_, |
| bool * | struct_updated | ||
| ) |
| SKYLARK_EXTERN_API int sl_serialize_sketch_transform | ( | const sketchc::sketch_transform_t * | sketch, |
| char ** | data | ||
| ) |
Serializes a sketch transformation.
| sketch | the sketch to be serialized |
| data | of the serialized JSON structure |
Definition at line 294 of file capi.cpp.
References skylark::sketch::sketch_transform_data_t::to_ptree(), and skylark::sketch::c::sketch_transform_t::transform_obj.

| SKYLARK_EXTERN_API const char* sl_strerror | ( | const int | errorcode | ) |
Converting an error code to a human readable string describing the failure
| errorcode | the error code to resolve |
Definition at line 171 of file capi.cpp.
References skylark_strerror().

| SKYLARK_EXTERN_API char* sl_supported_sketch_transforms | ( | ) |
Returns a string describing the sketch transforms that are supported.
Return string defining what is supported
Definition at line 70 of file capi.cpp.
References skylark::sketch::c::CT, skylark::sketch::c::CWT, skylark::sketch::c::ExpSemigroupRLT, skylark::sketch::c::FastGaussianRFT, skylark::sketch::c::FJLT, skylark::sketch::c::GaussianRFT, skylark::sketch::c::JLT, skylark::sketch::c::LaplacianRFT, skylark::sketch::c::MMT, skylark::sketch::c::PPT, SKDEF, and skylark::sketch::c::WZT.
| SKYLARK_EXTERN_API int sl_wrap_raw_matrix | ( | double * | data, |
| int | m, | ||
| int | n, | ||
| void ** | A | ||
| ) |
| SKYLARK_EXTERN_API int sl_wrap_raw_sp_matrix | ( | int * | indptr, |
| int * | ind, | ||
| double * | data, | ||
| int | nnz, | ||
| int | n_rows, | ||
| int | n_cols, | ||
| void ** | A | ||
| ) |
Definition at line 736 of file capi.cpp.
References skylark::base::sparse_matrix_t< ValueType >::attach().

1.7.6.1