2020#pragma warning(disable: 4244 4267) // possible loss of data
2121#endif
2222
23- void ggml_graph_compute_helper (std::vector<uint8_t > & buf, ggml_cgraph * graph, int n_threads) {
23+ static void ggml_graph_compute_helper (std::vector<uint8_t > & buf, ggml_cgraph * graph, int n_threads) {
2424 struct ggml_cplan plan = ggml_graph_plan (graph, n_threads);
2525
2626 if (plan.work_size > 0 ) {
@@ -31,7 +31,7 @@ void ggml_graph_compute_helper(std::vector<uint8_t> & buf, ggml_cgraph * graph,
3131 ggml_graph_compute (graph, &plan);
3232}
3333
34- float tensor_sum_elements (const ggml_tensor * tensor) {
34+ static float tensor_sum_elements (const ggml_tensor * tensor) {
3535 float sum = 0 ;
3636 if (tensor->type ==GGML_TYPE_F32) {
3737 for (int j = 0 ; j < tensor->ne [1 ]; j++) {
@@ -43,7 +43,7 @@ float tensor_sum_elements(const ggml_tensor * tensor) {
4343 return sum;
4444}
4545
46- void tensor_dump (const ggml_tensor * tensor, const char * name) {
46+ static void tensor_dump (const ggml_tensor * tensor, const char * name) {
4747 printf (" %15s: type = %i (%5s) ne = %5" PRIi64 " x %5" PRIi64 " x %5" PRIi64 " , nb = (%5zi, %5zi, %5zi) - " , name,
4848 tensor->type , ggml_type_name (tensor->type ),
4949 tensor->ne [0 ], tensor->ne [1 ], tensor->ne [2 ], tensor->nb [0 ], tensor->nb [1 ], tensor->nb [2 ]);
@@ -58,7 +58,7 @@ struct benchmark_params_struct {
5858 int32_t n_iterations = 10 ;
5959};
6060
61- void print_usage (int /* argc*/ , char ** argv, struct benchmark_params_struct params) {
61+ static void print_usage (int /* argc*/ , char ** argv, struct benchmark_params_struct params) {
6262 fprintf (stderr, " usage: %s [options]\n " , argv[0 ]);
6363 fprintf (stderr, " \n " );
6464 fprintf (stderr, " options:\n " );
0 commit comments