replaced "static unsigned const" to "static const unsigned" so that SWIG can generate wrappers without a syntax error
This commit is contained in:
parent
92338f7051
commit
8a0c63cc64
6 changed files with 126 additions and 126 deletions
|
|
@ -122,8 +122,8 @@ def run_cli(
|
|||
for file in spirv_files:
|
||||
print(xxd_cmd)
|
||||
header_data = str(run_cmd(xxd_cmd, "-i", file))
|
||||
# Ensuring the variable is a static unsigned const
|
||||
header_data = header_data.replace("unsigned", "static unsigned const")
|
||||
# Ensuring the variable is a static const unsigned
|
||||
header_data = header_data.replace("unsigned", "static const unsigned")
|
||||
if is_windows:
|
||||
raw_file_name = file.split("\\")[-1]
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ static const char* KOMPUTE_LOG_TAG = "KomputeLog";
|
|||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static unsigned const char shaders_glsl_opmult_comp_spv[] = {
|
||||
static const unsigned char shaders_glsl_opmult_comp_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00,
|
||||
0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
|
|
@ -232,7 +232,7 @@ static unsigned const char shaders_glsl_opmult_comp_spv[] = {
|
|||
0x17, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||
0x27, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
static unsigned const int shaders_glsl_opmult_comp_spv_len = 1464;
|
||||
static const unsigned int shaders_glsl_opmult_comp_spv_len = 1464;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADEROPMULT_HPP
|
||||
|
|
@ -262,7 +262,7 @@ static unsigned const int shaders_glsl_opmult_comp_spv_len = 1464;
|
|||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static unsigned const char shaders_glsl_logisticregression_comp_spv[] = {
|
||||
static const unsigned char shaders_glsl_logisticregression_comp_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00,
|
||||
0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
|
|
@ -674,7 +674,7 @@ static unsigned const char shaders_glsl_logisticregression_comp_spv[] = {
|
|||
0x06, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
|
||||
0xfe, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
static unsigned const int shaders_glsl_logisticregression_comp_spv_len = 4920;
|
||||
static const unsigned int shaders_glsl_logisticregression_comp_spv_len = 4920;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
#define SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static unsigned const char shaders_glsl_logisticregression_comp_spv[] = {
|
||||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
#define SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static const unsigned char shaders_glsl_logisticregression_comp_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00,
|
||||
0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
|
|
@ -435,7 +435,7 @@ static unsigned const char shaders_glsl_logisticregression_comp_spv[] = {
|
|||
0x06, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
|
||||
0xfe, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
static unsigned const int shaders_glsl_logisticregression_comp_spv_len = 4920;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
static const unsigned int shaders_glsl_logisticregression_comp_spv_len = 4920;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERLOGISTICREGRESSION_HPP
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADEROPMULT_HPP
|
||||
#define SHADEROP_SHADEROPMULT_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static unsigned const char shaders_glsl_opmult_comp_spv[] = {
|
||||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADEROPMULT_HPP
|
||||
#define SHADEROP_SHADEROPMULT_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static const unsigned char shaders_glsl_opmult_comp_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00,
|
||||
0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
|
|
@ -147,7 +147,7 @@ static unsigned const char shaders_glsl_opmult_comp_spv[] = {
|
|||
0x17, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||
0x27, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
static unsigned const int shaders_glsl_opmult_comp_spv_len = 1464;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADEROPMULT_HPP
|
||||
static const unsigned int shaders_glsl_opmult_comp_spv_len = 1464;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADEROPMULT_HPP
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADERTEST_LOGISTIC_REGRESSION_HPP
|
||||
#define SHADEROP_SHADERTEST_LOGISTIC_REGRESSION_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static unsigned const char test_shaders_glsl_test_logistic_regression_comp_spv[] = {
|
||||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADERTEST_LOGISTIC_REGRESSION_HPP
|
||||
#define SHADEROP_SHADERTEST_LOGISTIC_REGRESSION_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static const unsigned char test_shaders_glsl_test_logistic_regression_comp_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00,
|
||||
0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
|
|
@ -435,7 +435,7 @@ static unsigned const char test_shaders_glsl_test_logistic_regression_comp_spv[]
|
|||
0x06, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
|
||||
0xfe, 0x00, 0x02, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
static unsigned const int test_shaders_glsl_test_logistic_regression_comp_spv_len = 4920;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERTEST_LOGISTIC_REGRESSION_HPP
|
||||
static const unsigned int test_shaders_glsl_test_logistic_regression_comp_spv_len = 4920;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERTEST_LOGISTIC_REGRESSION_HPP
|
||||
|
|
|
|||
|
|
@ -1,29 +1,29 @@
|
|||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADERTEST_OP_CUSTOM_SHADER_HPP
|
||||
#define SHADEROP_SHADERTEST_OP_CUSTOM_SHADER_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static unsigned const char test_shaders_glsl_test_op_custom_shader_comp_spv[] = {
|
||||
/*
|
||||
THIS FILE HAS BEEN AUTOMATICALLY GENERATED - DO NOT EDIT
|
||||
|
||||
---
|
||||
|
||||
Copyright 2020 The Institute for Ethical AI & Machine Learning
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef SHADEROP_SHADERTEST_OP_CUSTOM_SHADER_HPP
|
||||
#define SHADEROP_SHADERTEST_OP_CUSTOM_SHADER_HPP
|
||||
|
||||
namespace kp {
|
||||
namespace shader_data {
|
||||
static const unsigned char test_shaders_glsl_test_op_custom_shader_comp_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x08, 0x00,
|
||||
0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
|
|
@ -117,7 +117,7 @@ static unsigned const char test_shaders_glsl_test_op_custom_shader_comp_spv[] =
|
|||
0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00,
|
||||
0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
static unsigned const int test_shaders_glsl_test_op_custom_shader_comp_spv_len = 1096;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERTEST_OP_CUSTOM_SHADER_HPP
|
||||
static const unsigned int test_shaders_glsl_test_op_custom_shader_comp_spv_len = 1096;
|
||||
}
|
||||
}
|
||||
#endif // define SHADEROP_SHADERTEST_OP_CUSTOM_SHADER_HPP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue