aboutsummaryrefslogblamecommitdiff
path: root/nerv/lib/matrix/cukernel.h
blob: 4654d294ed52b6e073bd57cb946a80465f75ea41 (plain) (tree)
1
2
3
4
5
6
7
8
9
                            

                                                                        
                                                      
                                                                                      
                                                                                     
                                                                                                      

                                                                                   

                                                     
                                                                      
                                                     
                                                                         

                                                                                                   
                                                                   
                                              
                                                              
                                                                                                               

                                                                      

                                                                
                                                         

                                                                    

                                                                    






                                                                                                 
      
#ifdef NERV_GENERIC_CUKERNEL
void cudak_(cuda_mul_elem)(const Matrix *a, const Matrix *b, Matrix *c);
void cudak_(cuda_log_elem)(const Matrix *a, Matrix *b);
void cudak_(cuda_sigmoid)(const Matrix *a, Matrix *b);
void cudak_(cuda_sigmoid_grad)(const Matrix *output, const Matrix *err, Matrix *nerr);
void cudak_(cuda_rand_uniform)(const Matrix *a); /* a's curand_gen may be modified */
void cudak_(cuda_thres_mask)(const Matrix *a, const Matrix *b, double thres, double low, double high);
void cudak_(cuda_tanh)(const Matrix *a, Matrix *b);
void cudak_(cuda_tanh_grad)(const Matrix *output, const Matrix *err, Matrix *nerr);
void cudak_(cuda_rowsum)(const Matrix *a, Matrix *b);
void cudak_(cuda_rowmax)(const Matrix *a, Matrix *b);
void cudak_(cuda_rowmax_idx)(const Matrix *a, Matrix *b, Matrix *idx);
void cudak_(cuda_colsum)(const Matrix *a, Matrix *b);
void cudak_(cuda_colsame)(const Matrix *a, const Matrix *ref, Matrix *b);
void cudak_(cuda_softmax_denominator)(const Matrix *a, const Matrix *max, Matrix *b);
void cudak_(cuda_softmax_final)(const Matrix *a, const Matrix *max, const Matrix *deno, Matrix *b);
void cudak_(cuda_add_row)(const Matrix *a, Matrix *b, double beta);
void cudak_(cuda_fill)(Matrix *a, double val);
void cudak_(cuda_clip)(Matrix *a, double val_1, double val_2);
void cudak_(cuda_update_select_rows)(Matrix *c, const Matrix *a, const Matrix *idx, double alpha, double beta);
void cudak_(cuda_expand_frm)(const Matrix *a, Matrix *b, int context);
void cudak_(cuda_rearrange_frm)(const Matrix *a, Matrix *b, int step);
void cudak_(cuda_scale_rows_by_row)(const Matrix *a, Matrix *b);
void cudak_(cuda_scale_rows_by_col)(const Matrix *a, Matrix *b);
void cudak_(cuda_decompress)(const Matrix *a, Matrix *b);
void cudak_(cuda_copy_rows_by_idx)(const Matrix *a, Matrix *b,
                                    const Matrix *idx, int b_begin);
void cudak_(cuda_copy_rows_by_colidx)(const Matrix *a, Matrix *b,
                                    const Matrix *idx, int b_begin);
#ifdef __NERV_FUTURE_CUDA_7
    void cudak_(cuda_update_select_rows_by_rowidx)(Matrix *c, const Matrix *a, const Matrix *idx,
                                                    double alpha, double beta);
    void cudak_(cuda_update_select_rows_by_colidx)(Matrix *c, const Matrix *a, const Matrix *idx,
                                                    double alpha, double beta);
#endif

#endif