ggml-opencl.cpp: Make private functions static (#3300)
This commit is contained in:
parent
324f3403d5
commit
36b904e200
|
@ -847,7 +847,7 @@ std::array<std::string, 2> mul_str_values = {
|
||||||
"mul_f32", "float"
|
"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;
|
size_t pos = 0;
|
||||||
while ((pos = s.find(from, pos)) != std::string::npos) {
|
while ((pos = s.find(from, pos)) != std::string::npos) {
|
||||||
s.replace(pos, from.length(), to);
|
s.replace(pos, from.length(), to);
|
||||||
|
@ -856,7 +856,7 @@ std::string& replace(std::string& s, const std::string& from, const std::string&
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string generate_kernels() {
|
static std::string generate_kernels() {
|
||||||
std::stringstream src;
|
std::stringstream src;
|
||||||
src << program_source << '\n';
|
src << program_source << '\n';
|
||||||
src << k_quants_source << '\n';
|
src << k_quants_source << '\n';
|
||||||
|
@ -1788,7 +1788,7 @@ bool ggml_cl_can_mul_mat(const struct ggml_tensor * src0, const struct ggml_tens
|
||||||
return false;
|
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 device doesn't support FP16
|
||||||
if (!fp16_support) {
|
if (!fp16_support) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue