Skip to content

Commit

Permalink
ggml-opencl.cpp: Make private functions static (ggerganov#3300)
Browse files Browse the repository at this point in the history
  • Loading branch information
shibe2 authored Sep 21, 2023
1 parent 324f340 commit 36b904e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ggml-opencl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ std::array<std::string, 2> mul_str_values = {
"mul_f32", "float"
};

std::string& replace(std::string& s, const std::string& from, const std::string& to) {
static std::string& replace(std::string& s, const std::string& from, const std::string& to) {
size_t pos = 0;
while ((pos = s.find(from, pos)) != std::string::npos) {
s.replace(pos, from.length(), to);
Expand All @@ -856,7 +856,7 @@ std::string& replace(std::string& s, const std::string& from, const std::string&
return s;
}

std::string generate_kernels() {
static std::string generate_kernels() {
std::stringstream src;
src << program_source << '\n';
src << k_quants_source << '\n';
Expand Down Expand Up @@ -1788,7 +1788,7 @@ bool ggml_cl_can_mul_mat(const struct ggml_tensor * src0, const struct ggml_tens
return false;
}

bool ggml_cl_mul_mat_use_f16(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * /* dst */) {
static bool ggml_cl_mul_mat_use_f16(const struct ggml_tensor * src0, const struct ggml_tensor * src1, struct ggml_tensor * /* dst */) {
// If device doesn't support FP16
if (!fp16_support) {
return false;
Expand Down

0 comments on commit 36b904e

Please sign in to comment.