diff --git a/android-demo/.gitignore b/android-demo/.gitignore
new file mode 100644
index 0000000..8299e9a
--- /dev/null
+++ b/android-demo/.gitignore
@@ -0,0 +1,11 @@
+*.iml
+.gradle
+/local.properties
+/.idea
+.DS_Store
+app/.cxx
+app/release
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/android-demo/app/.gitignore b/android-demo/app/.gitignore
new file mode 100644
index 0000000..c591fde
--- /dev/null
+++ b/android-demo/app/.gitignore
@@ -0,0 +1,2 @@
+/build
+.cxx
\ No newline at end of file
diff --git a/android-demo/app/build.gradle b/android-demo/app/build.gradle
new file mode 100644
index 0000000..68e833e
--- /dev/null
+++ b/android-demo/app/build.gradle
@@ -0,0 +1,47 @@
+plugins {
+ alias(libs.plugins.android.application)
+}
+
+android {
+ namespace 'com.gyq.yolov8'
+ compileSdk 34
+
+ defaultConfig {
+ applicationId "com.gyq.yolov8"
+ minSdk 24
+ targetSdk 34
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+ externalNativeBuild {
+ cmake {
+ version "3.31.1" // 确保你的CMake版本是正确的
+ path file('src/main/jni/CMakeLists.txt')
+ }
+ }
+ ndkVersion "25.2.9519653"
+}
+
+dependencies {
+
+ implementation libs.appcompat
+ implementation libs.material
+ implementation libs.activity
+ implementation libs.constraintlayout
+ testImplementation libs.junit
+ androidTestImplementation libs.ext.junit
+ androidTestImplementation libs.espresso.core
+}
\ No newline at end of file
diff --git a/android-demo/app/proguard-rules.pro b/android-demo/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/android-demo/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/android-demo/app/src/main/AndroidManifest.xml b/android-demo/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..87ef5fb
--- /dev/null
+++ b/android-demo/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/android-demo/app/src/main/assets/yolov8n.bin b/android-demo/app/src/main/assets/yolov8n.bin
new file mode 100644
index 0000000..0295cc6
Binary files /dev/null and b/android-demo/app/src/main/assets/yolov8n.bin differ
diff --git a/android-demo/app/src/main/assets/yolov8n.param b/android-demo/app/src/main/assets/yolov8n.param
new file mode 100644
index 0000000..d5c8a60
--- /dev/null
+++ b/android-demo/app/src/main/assets/yolov8n.param
@@ -0,0 +1,199 @@
+7767517
+197 233
+Input images 0 1 images
+Convolution Conv_0 1 1 images 128 0=16 1=3 3=2 4=1 5=1 6=432
+Swish Mul_2 1 1 128 130
+Convolution Conv_3 1 1 130 131 0=32 1=3 3=2 4=1 5=1 6=4608
+Swish Mul_5 1 1 131 133
+Convolution Conv_6 1 1 133 134 0=32 1=1 5=1 6=1024
+Swish Mul_8 1 1 134 136
+Split splitncnn_0 1 2 136 136_splitncnn_0 136_splitncnn_1
+Crop Slice_13 1 1 136_splitncnn_1 141 -23309=1,0 -23310=1,16 -23311=1,0
+Crop Slice_18 1 1 136_splitncnn_0 146 -23309=1,16 -23310=1,32 -23311=1,0
+Split splitncnn_1 1 3 146 146_splitncnn_0 146_splitncnn_1 146_splitncnn_2
+Convolution Conv_19 1 1 146_splitncnn_2 147 0=16 1=3 4=1 5=1 6=2304
+Swish Mul_21 1 1 147 149
+Convolution Conv_22 1 1 149 150 0=16 1=3 4=1 5=1 6=2304
+Swish Mul_24 1 1 150 152
+BinaryOp Add_25 2 1 146_splitncnn_1 152 153
+Concat Concat_26 3 1 141 146_splitncnn_0 153 154
+Convolution Conv_27 1 1 154 155 0=32 1=1 5=1 6=1536
+Swish Mul_29 1 1 155 157
+Convolution Conv_30 1 1 157 158 0=64 1=3 3=2 4=1 5=1 6=18432
+Swish Mul_32 1 1 158 160
+Convolution Conv_33 1 1 160 161 0=64 1=1 5=1 6=4096
+Swish Mul_35 1 1 161 163
+Split splitncnn_2 1 2 163 163_splitncnn_0 163_splitncnn_1
+Crop Slice_40 1 1 163_splitncnn_1 168 -23309=1,0 -23310=1,32 -23311=1,0
+Crop Slice_45 1 1 163_splitncnn_0 173 -23309=1,32 -23310=1,64 -23311=1,0
+Split splitncnn_3 1 3 173 173_splitncnn_0 173_splitncnn_1 173_splitncnn_2
+Convolution Conv_46 1 1 173_splitncnn_2 174 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_48 1 1 174 176
+Convolution Conv_49 1 1 176 177 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_51 1 1 177 179
+BinaryOp Add_52 2 1 173_splitncnn_1 179 180
+Split splitncnn_4 1 3 180 180_splitncnn_0 180_splitncnn_1 180_splitncnn_2
+Convolution Conv_53 1 1 180_splitncnn_2 181 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_55 1 1 181 183
+Convolution Conv_56 1 1 183 184 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_58 1 1 184 186
+BinaryOp Add_59 2 1 180_splitncnn_1 186 187
+Concat Concat_60 4 1 168 173_splitncnn_0 180_splitncnn_0 187 188
+Convolution Conv_61 1 1 188 189 0=64 1=1 5=1 6=8192
+Swish Mul_63 1 1 189 191
+Split splitncnn_5 1 2 191 191_splitncnn_0 191_splitncnn_1
+Convolution Conv_64 1 1 191_splitncnn_1 192 0=128 1=3 3=2 4=1 5=1 6=73728
+Swish Mul_66 1 1 192 194
+Convolution Conv_67 1 1 194 195 0=128 1=1 5=1 6=16384
+Swish Mul_69 1 1 195 197
+Split splitncnn_6 1 2 197 197_splitncnn_0 197_splitncnn_1
+Crop Slice_74 1 1 197_splitncnn_1 202 -23309=1,0 -23310=1,64 -23311=1,0
+Crop Slice_79 1 1 197_splitncnn_0 207 -23309=1,64 -23310=1,128 -23311=1,0
+Split splitncnn_7 1 3 207 207_splitncnn_0 207_splitncnn_1 207_splitncnn_2
+Convolution Conv_80 1 1 207_splitncnn_2 208 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_82 1 1 208 210
+Convolution Conv_83 1 1 210 211 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_85 1 1 211 213
+BinaryOp Add_86 2 1 207_splitncnn_1 213 214
+Split splitncnn_8 1 3 214 214_splitncnn_0 214_splitncnn_1 214_splitncnn_2
+Convolution Conv_87 1 1 214_splitncnn_2 215 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_89 1 1 215 217
+Convolution Conv_90 1 1 217 218 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_92 1 1 218 220
+BinaryOp Add_93 2 1 214_splitncnn_1 220 221
+Concat Concat_94 4 1 202 207_splitncnn_0 214_splitncnn_0 221 222
+Convolution Conv_95 1 1 222 223 0=128 1=1 5=1 6=32768
+Swish Mul_97 1 1 223 225
+Split splitncnn_9 1 2 225 225_splitncnn_0 225_splitncnn_1
+Convolution Conv_98 1 1 225_splitncnn_1 226 0=256 1=3 3=2 4=1 5=1 6=294912
+Swish Mul_100 1 1 226 228
+Convolution Conv_101 1 1 228 229 0=256 1=1 5=1 6=65536
+Swish Mul_103 1 1 229 231
+Split splitncnn_10 1 2 231 231_splitncnn_0 231_splitncnn_1
+Crop Slice_108 1 1 231_splitncnn_1 236 -23309=1,0 -23310=1,128 -23311=1,0
+Crop Slice_113 1 1 231_splitncnn_0 241 -23309=1,128 -23310=1,256 -23311=1,0
+Split splitncnn_11 1 3 241 241_splitncnn_0 241_splitncnn_1 241_splitncnn_2
+Convolution Conv_114 1 1 241_splitncnn_2 242 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_116 1 1 242 244
+Convolution Conv_117 1 1 244 245 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_119 1 1 245 247
+BinaryOp Add_120 2 1 241_splitncnn_1 247 248
+Concat Concat_121 3 1 236 241_splitncnn_0 248 249
+Convolution Conv_122 1 1 249 250 0=256 1=1 5=1 6=98304
+Swish Mul_124 1 1 250 252
+Convolution Conv_125 1 1 252 253 0=128 1=1 5=1 6=32768
+Swish Mul_127 1 1 253 255
+Split splitncnn_12 1 2 255 255_splitncnn_0 255_splitncnn_1
+Pooling MaxPool_128 1 1 255_splitncnn_1 256 1=5 3=2 5=1
+Split splitncnn_13 1 2 256 256_splitncnn_0 256_splitncnn_1
+Pooling MaxPool_129 1 1 256_splitncnn_1 257 1=5 3=2 5=1
+Split splitncnn_14 1 2 257 257_splitncnn_0 257_splitncnn_1
+Pooling MaxPool_130 1 1 257_splitncnn_1 258 1=5 3=2 5=1
+Concat Concat_131 4 1 255_splitncnn_0 256_splitncnn_0 257_splitncnn_0 258 259
+Convolution Conv_132 1 1 259 260 0=256 1=1 5=1 6=131072
+Swish Mul_134 1 1 260 262
+Split splitncnn_15 1 2 262 262_splitncnn_0 262_splitncnn_1
+Interp Resize_136 1 1 262_splitncnn_1 267 0=1 1=2.000000e+00 2=2.000000e+00
+Concat Concat_137 2 1 267 225_splitncnn_0 268
+Convolution Conv_138 1 1 268 269 0=128 1=1 5=1 6=49152
+Swish Mul_140 1 1 269 271
+Split splitncnn_16 1 2 271 271_splitncnn_0 271_splitncnn_1
+Crop Slice_145 1 1 271_splitncnn_1 276 -23309=1,0 -23310=1,64 -23311=1,0
+Crop Slice_150 1 1 271_splitncnn_0 281 -23309=1,64 -23310=1,128 -23311=1,0
+Split splitncnn_17 1 2 281 281_splitncnn_0 281_splitncnn_1
+Convolution Conv_151 1 1 281_splitncnn_1 282 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_153 1 1 282 284
+Convolution Conv_154 1 1 284 285 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_156 1 1 285 287
+Concat Concat_157 3 1 276 281_splitncnn_0 287 288
+Convolution Conv_158 1 1 288 289 0=128 1=1 5=1 6=24576
+Swish Mul_160 1 1 289 291
+Split splitncnn_18 1 2 291 291_splitncnn_0 291_splitncnn_1
+Interp Resize_162 1 1 291_splitncnn_1 296 0=1 1=2.000000e+00 2=2.000000e+00
+Concat Concat_163 2 1 296 191_splitncnn_0 297
+Convolution Conv_164 1 1 297 298 0=64 1=1 5=1 6=12288
+Swish Mul_166 1 1 298 300
+Split splitncnn_19 1 2 300 300_splitncnn_0 300_splitncnn_1
+Crop Slice_171 1 1 300_splitncnn_1 305 -23309=1,0 -23310=1,32 -23311=1,0
+Crop Slice_176 1 1 300_splitncnn_0 310 -23309=1,32 -23310=1,64 -23311=1,0
+Split splitncnn_20 1 2 310 310_splitncnn_0 310_splitncnn_1
+Convolution Conv_177 1 1 310_splitncnn_1 311 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_179 1 1 311 313
+Convolution Conv_180 1 1 313 314 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_182 1 1 314 316
+Concat Concat_183 3 1 305 310_splitncnn_0 316 317
+Convolution Conv_184 1 1 317 318 0=64 1=1 5=1 6=6144
+Swish Mul_186 1 1 318 320
+Split splitncnn_21 1 3 320 320_splitncnn_0 320_splitncnn_1 320_splitncnn_2
+Convolution Conv_187 1 1 320_splitncnn_2 321 0=64 1=3 3=2 4=1 5=1 6=36864
+Swish Mul_189 1 1 321 323
+Concat Concat_190 2 1 323 291_splitncnn_0 324
+Convolution Conv_191 1 1 324 325 0=128 1=1 5=1 6=24576
+Swish Mul_193 1 1 325 327
+Split splitncnn_22 1 2 327 327_splitncnn_0 327_splitncnn_1
+Crop Slice_198 1 1 327_splitncnn_1 332 -23309=1,0 -23310=1,64 -23311=1,0
+Crop Slice_203 1 1 327_splitncnn_0 337 -23309=1,64 -23310=1,128 -23311=1,0
+Split splitncnn_23 1 2 337 337_splitncnn_0 337_splitncnn_1
+Convolution Conv_204 1 1 337_splitncnn_1 338 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_206 1 1 338 340
+Convolution Conv_207 1 1 340 341 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_209 1 1 341 343
+Concat Concat_210 3 1 332 337_splitncnn_0 343 344
+Convolution Conv_211 1 1 344 345 0=128 1=1 5=1 6=24576
+Swish Mul_213 1 1 345 347
+Split splitncnn_24 1 3 347 347_splitncnn_0 347_splitncnn_1 347_splitncnn_2
+Convolution Conv_214 1 1 347_splitncnn_2 348 0=128 1=3 3=2 4=1 5=1 6=147456
+Swish Mul_216 1 1 348 350
+Concat Concat_217 2 1 350 262_splitncnn_0 351
+Convolution Conv_218 1 1 351 352 0=256 1=1 5=1 6=98304
+Swish Mul_220 1 1 352 354
+Split splitncnn_25 1 2 354 354_splitncnn_0 354_splitncnn_1
+Crop Slice_225 1 1 354_splitncnn_1 359 -23309=1,0 -23310=1,128 -23311=1,0
+Crop Slice_230 1 1 354_splitncnn_0 364 -23309=1,128 -23310=1,256 -23311=1,0
+Split splitncnn_26 1 2 364 364_splitncnn_0 364_splitncnn_1
+Convolution Conv_231 1 1 364_splitncnn_1 365 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_233 1 1 365 367
+Convolution Conv_234 1 1 367 368 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_236 1 1 368 370
+Concat Concat_237 3 1 359 364_splitncnn_0 370 371
+Convolution Conv_238 1 1 371 372 0=256 1=1 5=1 6=98304
+Swish Mul_240 1 1 372 374
+Split splitncnn_27 1 2 374 374_splitncnn_0 374_splitncnn_1
+Convolution Conv_241 1 1 320_splitncnn_1 376 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_243 1 1 376 378
+Convolution Conv_244 1 1 378 379 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_246 1 1 379 381
+Convolution Conv_247 1 1 381 382 0=64 1=1 5=1 6=4096
+Convolution Conv_248 1 1 320_splitncnn_0 383 0=80 1=3 4=1 5=1 6=46080
+Swish Mul_250 1 1 383 385
+Convolution Conv_251 1 1 385 386 0=80 1=3 4=1 5=1 6=57600
+Swish Mul_253 1 1 386 388
+Convolution Conv_254 1 1 388 389 0=80 1=1 5=1 6=6400
+Concat Concat_255 2 1 382 389 390
+Convolution Conv_256 1 1 347_splitncnn_1 391 0=64 1=3 4=1 5=1 6=73728
+Swish Mul_258 1 1 391 393
+Convolution Conv_259 1 1 393 394 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_261 1 1 394 396
+Convolution Conv_262 1 1 396 397 0=64 1=1 5=1 6=4096
+Convolution Conv_263 1 1 347_splitncnn_0 398 0=80 1=3 4=1 5=1 6=92160
+Swish Mul_265 1 1 398 400
+Convolution Conv_266 1 1 400 401 0=80 1=3 4=1 5=1 6=57600
+Swish Mul_268 1 1 401 403
+Convolution Conv_269 1 1 403 404 0=80 1=1 5=1 6=6400
+Concat Concat_270 2 1 397 404 405
+Convolution Conv_271 1 1 374_splitncnn_1 406 0=64 1=3 4=1 5=1 6=147456
+Swish Mul_273 1 1 406 408
+Convolution Conv_274 1 1 408 409 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_276 1 1 409 411
+Convolution Conv_277 1 1 411 412 0=64 1=1 5=1 6=4096
+Convolution Conv_278 1 1 374_splitncnn_0 413 0=80 1=3 4=1 5=1 6=184320
+Swish Mul_280 1 1 413 415
+Convolution Conv_281 1 1 415 416 0=80 1=3 4=1 5=1 6=57600
+Swish Mul_283 1 1 416 418
+Convolution Conv_284 1 1 418 419 0=80 1=1 5=1 6=6400
+Concat Concat_285 2 1 412 419 420
+Reshape Reshape_286 1 1 390 427 0=-1 1=144
+Reshape Reshape_287 1 1 405 434 0=-1 1=144
+Reshape Reshape_288 1 1 420 441 0=-1 1=144
+Concat Concat_289 3 1 427 434 441 442 0=1
+Permute Transpose_526 1 1 442 output 0=1
diff --git a/android-demo/app/src/main/assets/yolov8s.bin b/android-demo/app/src/main/assets/yolov8s.bin
new file mode 100644
index 0000000..f4382f2
Binary files /dev/null and b/android-demo/app/src/main/assets/yolov8s.bin differ
diff --git a/android-demo/app/src/main/assets/yolov8s.param b/android-demo/app/src/main/assets/yolov8s.param
new file mode 100644
index 0000000..8474461
--- /dev/null
+++ b/android-demo/app/src/main/assets/yolov8s.param
@@ -0,0 +1,199 @@
+7767517
+197 233
+Input images 0 1 images
+Convolution Conv_0 1 1 images 128 0=32 1=3 3=2 4=1 5=1 6=864
+Swish Mul_2 1 1 128 130
+Convolution Conv_3 1 1 130 131 0=64 1=3 3=2 4=1 5=1 6=18432
+Swish Mul_5 1 1 131 133
+Convolution Conv_6 1 1 133 134 0=64 1=1 5=1 6=4096
+Swish Mul_8 1 1 134 136
+Split splitncnn_0 1 2 136 136_splitncnn_0 136_splitncnn_1
+Crop Slice_13 1 1 136_splitncnn_1 141 -23309=1,0 -23310=1,32 -23311=1,0
+Crop Slice_18 1 1 136_splitncnn_0 146 -23309=1,32 -23310=1,64 -23311=1,0
+Split splitncnn_1 1 3 146 146_splitncnn_0 146_splitncnn_1 146_splitncnn_2
+Convolution Conv_19 1 1 146_splitncnn_2 147 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_21 1 1 147 149
+Convolution Conv_22 1 1 149 150 0=32 1=3 4=1 5=1 6=9216
+Swish Mul_24 1 1 150 152
+BinaryOp Add_25 2 1 146_splitncnn_1 152 153
+Concat Concat_26 3 1 141 146_splitncnn_0 153 154
+Convolution Conv_27 1 1 154 155 0=64 1=1 5=1 6=6144
+Swish Mul_29 1 1 155 157
+Convolution Conv_30 1 1 157 158 0=128 1=3 3=2 4=1 5=1 6=73728
+Swish Mul_32 1 1 158 160
+Convolution Conv_33 1 1 160 161 0=128 1=1 5=1 6=16384
+Swish Mul_35 1 1 161 163
+Split splitncnn_2 1 2 163 163_splitncnn_0 163_splitncnn_1
+Crop Slice_40 1 1 163_splitncnn_1 168 -23309=1,0 -23310=1,64 -23311=1,0
+Crop Slice_45 1 1 163_splitncnn_0 173 -23309=1,64 -23310=1,128 -23311=1,0
+Split splitncnn_3 1 3 173 173_splitncnn_0 173_splitncnn_1 173_splitncnn_2
+Convolution Conv_46 1 1 173_splitncnn_2 174 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_48 1 1 174 176
+Convolution Conv_49 1 1 176 177 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_51 1 1 177 179
+BinaryOp Add_52 2 1 173_splitncnn_1 179 180
+Split splitncnn_4 1 3 180 180_splitncnn_0 180_splitncnn_1 180_splitncnn_2
+Convolution Conv_53 1 1 180_splitncnn_2 181 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_55 1 1 181 183
+Convolution Conv_56 1 1 183 184 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_58 1 1 184 186
+BinaryOp Add_59 2 1 180_splitncnn_1 186 187
+Concat Concat_60 4 1 168 173_splitncnn_0 180_splitncnn_0 187 188
+Convolution Conv_61 1 1 188 189 0=128 1=1 5=1 6=32768
+Swish Mul_63 1 1 189 191
+Split splitncnn_5 1 2 191 191_splitncnn_0 191_splitncnn_1
+Convolution Conv_64 1 1 191_splitncnn_1 192 0=256 1=3 3=2 4=1 5=1 6=294912
+Swish Mul_66 1 1 192 194
+Convolution Conv_67 1 1 194 195 0=256 1=1 5=1 6=65536
+Swish Mul_69 1 1 195 197
+Split splitncnn_6 1 2 197 197_splitncnn_0 197_splitncnn_1
+Crop Slice_74 1 1 197_splitncnn_1 202 -23309=1,0 -23310=1,128 -23311=1,0
+Crop Slice_79 1 1 197_splitncnn_0 207 -23309=1,128 -23310=1,256 -23311=1,0
+Split splitncnn_7 1 3 207 207_splitncnn_0 207_splitncnn_1 207_splitncnn_2
+Convolution Conv_80 1 1 207_splitncnn_2 208 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_82 1 1 208 210
+Convolution Conv_83 1 1 210 211 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_85 1 1 211 213
+BinaryOp Add_86 2 1 207_splitncnn_1 213 214
+Split splitncnn_8 1 3 214 214_splitncnn_0 214_splitncnn_1 214_splitncnn_2
+Convolution Conv_87 1 1 214_splitncnn_2 215 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_89 1 1 215 217
+Convolution Conv_90 1 1 217 218 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_92 1 1 218 220
+BinaryOp Add_93 2 1 214_splitncnn_1 220 221
+Concat Concat_94 4 1 202 207_splitncnn_0 214_splitncnn_0 221 222
+Convolution Conv_95 1 1 222 223 0=256 1=1 5=1 6=131072
+Swish Mul_97 1 1 223 225
+Split splitncnn_9 1 2 225 225_splitncnn_0 225_splitncnn_1
+Convolution Conv_98 1 1 225_splitncnn_1 226 0=512 1=3 3=2 4=1 5=1 6=1179648
+Swish Mul_100 1 1 226 228
+Convolution Conv_101 1 1 228 229 0=512 1=1 5=1 6=262144
+Swish Mul_103 1 1 229 231
+Split splitncnn_10 1 2 231 231_splitncnn_0 231_splitncnn_1
+Crop Slice_108 1 1 231_splitncnn_1 236 -23309=1,0 -23310=1,256 -23311=1,0
+Crop Slice_113 1 1 231_splitncnn_0 241 -23309=1,256 -23310=1,512 -23311=1,0
+Split splitncnn_11 1 3 241 241_splitncnn_0 241_splitncnn_1 241_splitncnn_2
+Convolution Conv_114 1 1 241_splitncnn_2 242 0=256 1=3 4=1 5=1 6=589824
+Swish Mul_116 1 1 242 244
+Convolution Conv_117 1 1 244 245 0=256 1=3 4=1 5=1 6=589824
+Swish Mul_119 1 1 245 247
+BinaryOp Add_120 2 1 241_splitncnn_1 247 248
+Concat Concat_121 3 1 236 241_splitncnn_0 248 249
+Convolution Conv_122 1 1 249 250 0=512 1=1 5=1 6=393216
+Swish Mul_124 1 1 250 252
+Convolution Conv_125 1 1 252 253 0=256 1=1 5=1 6=131072
+Swish Mul_127 1 1 253 255
+Split splitncnn_12 1 2 255 255_splitncnn_0 255_splitncnn_1
+Pooling MaxPool_128 1 1 255_splitncnn_1 256 1=5 3=2 5=1
+Split splitncnn_13 1 2 256 256_splitncnn_0 256_splitncnn_1
+Pooling MaxPool_129 1 1 256_splitncnn_1 257 1=5 3=2 5=1
+Split splitncnn_14 1 2 257 257_splitncnn_0 257_splitncnn_1
+Pooling MaxPool_130 1 1 257_splitncnn_1 258 1=5 3=2 5=1
+Concat Concat_131 4 1 255_splitncnn_0 256_splitncnn_0 257_splitncnn_0 258 259
+Convolution Conv_132 1 1 259 260 0=512 1=1 5=1 6=524288
+Swish Mul_134 1 1 260 262
+Split splitncnn_15 1 2 262 262_splitncnn_0 262_splitncnn_1
+Interp Resize_136 1 1 262_splitncnn_1 267 0=1 1=2.000000e+00 2=2.000000e+00
+Concat Concat_137 2 1 267 225_splitncnn_0 268
+Convolution Conv_138 1 1 268 269 0=256 1=1 5=1 6=196608
+Swish Mul_140 1 1 269 271
+Split splitncnn_16 1 2 271 271_splitncnn_0 271_splitncnn_1
+Crop Slice_145 1 1 271_splitncnn_1 276 -23309=1,0 -23310=1,128 -23311=1,0
+Crop Slice_150 1 1 271_splitncnn_0 281 -23309=1,128 -23310=1,256 -23311=1,0
+Split splitncnn_17 1 2 281 281_splitncnn_0 281_splitncnn_1
+Convolution Conv_151 1 1 281_splitncnn_1 282 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_153 1 1 282 284
+Convolution Conv_154 1 1 284 285 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_156 1 1 285 287
+Concat Concat_157 3 1 276 281_splitncnn_0 287 288
+Convolution Conv_158 1 1 288 289 0=256 1=1 5=1 6=98304
+Swish Mul_160 1 1 289 291
+Split splitncnn_18 1 2 291 291_splitncnn_0 291_splitncnn_1
+Interp Resize_162 1 1 291_splitncnn_1 296 0=1 1=2.000000e+00 2=2.000000e+00
+Concat Concat_163 2 1 296 191_splitncnn_0 297
+Convolution Conv_164 1 1 297 298 0=128 1=1 5=1 6=49152
+Swish Mul_166 1 1 298 300
+Split splitncnn_19 1 2 300 300_splitncnn_0 300_splitncnn_1
+Crop Slice_171 1 1 300_splitncnn_1 305 -23309=1,0 -23310=1,64 -23311=1,0
+Crop Slice_176 1 1 300_splitncnn_0 310 -23309=1,64 -23310=1,128 -23311=1,0
+Split splitncnn_20 1 2 310 310_splitncnn_0 310_splitncnn_1
+Convolution Conv_177 1 1 310_splitncnn_1 311 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_179 1 1 311 313
+Convolution Conv_180 1 1 313 314 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_182 1 1 314 316
+Concat Concat_183 3 1 305 310_splitncnn_0 316 317
+Convolution Conv_184 1 1 317 318 0=128 1=1 5=1 6=24576
+Swish Mul_186 1 1 318 320
+Split splitncnn_21 1 3 320 320_splitncnn_0 320_splitncnn_1 320_splitncnn_2
+Convolution Conv_187 1 1 320_splitncnn_2 321 0=128 1=3 3=2 4=1 5=1 6=147456
+Swish Mul_189 1 1 321 323
+Concat Concat_190 2 1 323 291_splitncnn_0 324
+Convolution Conv_191 1 1 324 325 0=256 1=1 5=1 6=98304
+Swish Mul_193 1 1 325 327
+Split splitncnn_22 1 2 327 327_splitncnn_0 327_splitncnn_1
+Crop Slice_198 1 1 327_splitncnn_1 332 -23309=1,0 -23310=1,128 -23311=1,0
+Crop Slice_203 1 1 327_splitncnn_0 337 -23309=1,128 -23310=1,256 -23311=1,0
+Split splitncnn_23 1 2 337 337_splitncnn_0 337_splitncnn_1
+Convolution Conv_204 1 1 337_splitncnn_1 338 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_206 1 1 338 340
+Convolution Conv_207 1 1 340 341 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_209 1 1 341 343
+Concat Concat_210 3 1 332 337_splitncnn_0 343 344
+Convolution Conv_211 1 1 344 345 0=256 1=1 5=1 6=98304
+Swish Mul_213 1 1 345 347
+Split splitncnn_24 1 3 347 347_splitncnn_0 347_splitncnn_1 347_splitncnn_2
+Convolution Conv_214 1 1 347_splitncnn_2 348 0=256 1=3 3=2 4=1 5=1 6=589824
+Swish Mul_216 1 1 348 350
+Concat Concat_217 2 1 350 262_splitncnn_0 351
+Convolution Conv_218 1 1 351 352 0=512 1=1 5=1 6=393216
+Swish Mul_220 1 1 352 354
+Split splitncnn_25 1 2 354 354_splitncnn_0 354_splitncnn_1
+Crop Slice_225 1 1 354_splitncnn_1 359 -23309=1,0 -23310=1,256 -23311=1,0
+Crop Slice_230 1 1 354_splitncnn_0 364 -23309=1,256 -23310=1,512 -23311=1,0
+Split splitncnn_26 1 2 364 364_splitncnn_0 364_splitncnn_1
+Convolution Conv_231 1 1 364_splitncnn_1 365 0=256 1=3 4=1 5=1 6=589824
+Swish Mul_233 1 1 365 367
+Convolution Conv_234 1 1 367 368 0=256 1=3 4=1 5=1 6=589824
+Swish Mul_236 1 1 368 370
+Concat Concat_237 3 1 359 364_splitncnn_0 370 371
+Convolution Conv_238 1 1 371 372 0=512 1=1 5=1 6=393216
+Swish Mul_240 1 1 372 374
+Split splitncnn_27 1 2 374 374_splitncnn_0 374_splitncnn_1
+Convolution Conv_241 1 1 320_splitncnn_1 376 0=64 1=3 4=1 5=1 6=73728
+Swish Mul_243 1 1 376 378
+Convolution Conv_244 1 1 378 379 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_246 1 1 379 381
+Convolution Conv_247 1 1 381 382 0=64 1=1 5=1 6=4096
+Convolution Conv_248 1 1 320_splitncnn_0 383 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_250 1 1 383 385
+Convolution Conv_251 1 1 385 386 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_253 1 1 386 388
+Convolution Conv_254 1 1 388 389 0=80 1=1 5=1 6=10240
+Concat Concat_255 2 1 382 389 390
+Convolution Conv_256 1 1 347_splitncnn_1 391 0=64 1=3 4=1 5=1 6=147456
+Swish Mul_258 1 1 391 393
+Convolution Conv_259 1 1 393 394 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_261 1 1 394 396
+Convolution Conv_262 1 1 396 397 0=64 1=1 5=1 6=4096
+Convolution Conv_263 1 1 347_splitncnn_0 398 0=128 1=3 4=1 5=1 6=294912
+Swish Mul_265 1 1 398 400
+Convolution Conv_266 1 1 400 401 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_268 1 1 401 403
+Convolution Conv_269 1 1 403 404 0=80 1=1 5=1 6=10240
+Concat Concat_270 2 1 397 404 405
+Convolution Conv_271 1 1 374_splitncnn_1 406 0=64 1=3 4=1 5=1 6=294912
+Swish Mul_273 1 1 406 408
+Convolution Conv_274 1 1 408 409 0=64 1=3 4=1 5=1 6=36864
+Swish Mul_276 1 1 409 411
+Convolution Conv_277 1 1 411 412 0=64 1=1 5=1 6=4096
+Convolution Conv_278 1 1 374_splitncnn_0 413 0=128 1=3 4=1 5=1 6=589824
+Swish Mul_280 1 1 413 415
+Convolution Conv_281 1 1 415 416 0=128 1=3 4=1 5=1 6=147456
+Swish Mul_283 1 1 416 418
+Convolution Conv_284 1 1 418 419 0=80 1=1 5=1 6=10240
+Concat Concat_285 2 1 412 419 420
+Reshape Reshape_286 1 1 390 427 0=-1 1=144
+Reshape Reshape_287 1 1 405 434 0=-1 1=144
+Reshape Reshape_288 1 1 420 441 0=-1 1=144
+Concat Concat_289 3 1 427 434 441 442 0=1
+Permute Transpose_526 1 1 442 output 0=1
diff --git a/android-demo/app/src/main/java/com/gyq/yolov8/MainActivity.java b/android-demo/app/src/main/java/com/gyq/yolov8/MainActivity.java
new file mode 100644
index 0000000..84a6da1
--- /dev/null
+++ b/android-demo/app/src/main/java/com/gyq/yolov8/MainActivity.java
@@ -0,0 +1,144 @@
+package com.gyq.yolov8;
+
+import android.Manifest;
+import android.app.Activity;
+import android.content.pm.PackageManager;
+import android.graphics.PixelFormat;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.AdapterView;
+import android.widget.Button;
+import android.widget.Spinner;
+
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+
+
+public class MainActivity extends Activity implements SurfaceHolder.Callback {
+ public static final int REQUEST_CAMERA = 100; // note: 状态请求码(常量)
+
+
+ private Yolov8Ncnn yolov8ncnn = new Yolov8Ncnn(); // Yolov8Ncnn 对象,用于加载模型并进行推理处理
+ private int facing = 0; // 标志摄像头的前置或者后置
+
+ private Spinner spinnerModel; // 主界面上的Spinner控件,用于切换模型
+ private int current_model = 0;
+ private Spinner spinnerCPUGPU; // Spinner控件,用于切换CPU/GPU
+ private int current_cpugpu = 0;
+
+ private SurfaceView cameraView; // SurfaceView 控件,用于显示相机画面
+
+ /**
+ * Called when the activity is first created.
+ */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ // 根据Xml初始化界面布局(R是自动生成的资源类,控制所有的Resources)
+ setContentView(R.layout.main);
+ // 设置保持屏幕常亮
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
+ // 获取布局中的相机画面预览控件 (SurfaceView)
+ cameraView = (SurfaceView) findViewById(R.id.cameraview);
+ // 设置相机传输过来的数据格式为 RGBA_8888 (具体的可以根据手机的不同而更改,一般是这个)
+ cameraView.getHolder().setFormat(PixelFormat.RGBA_8888);
+ // TODO: 为 SurfaceView 设置回调接口
+ cameraView.getHolder().addCallback(this);
+
+ // 获取切换前置后置摄像头的Button控件
+ Button buttonSwitchCamera = (Button) findViewById(R.id.buttonSwitchCamera);
+ // 为点击摄像头的按钮写一个槽函数(事件),实现切换摄像头功能
+ buttonSwitchCamera.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View arg0) {
+ // 0->1, 1->0
+ int new_facing = 1 - facing;
+ yolov8ncnn.closeCamera();
+ yolov8ncnn.openCamera(new_facing);
+ facing = new_facing;
+ }
+ });
+
+ // 获取并设置模型选择 Spinner 的监听器
+ spinnerModel = (Spinner) findViewById(R.id.spinnerModel);
+ spinnerModel.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView> arg0, View arg1, int position, long id) {
+ if (position != current_model) {
+ current_model = position;
+ // 重新加载(新的)模型
+ reload();
+ }
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView> arg0) {
+ }
+ });
+
+ // 获取并设置 CPU/GPU 选择 Spinner 的监听器
+ spinnerCPUGPU = (Spinner) findViewById(R.id.spinnerCPUGPU);
+ spinnerCPUGPU.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+ @Override
+ public void onItemSelected(AdapterView> arg0, View arg1, int position, long id) {
+ if (position != current_cpugpu) {
+ current_cpugpu = position;
+ reload(); // 同样的,切换了设备,模型也需要重载
+ }
+ }
+
+ @Override
+ public void onNothingSelected(AdapterView> arg0) {
+ }
+ });
+ // 第一次启动,用默认参数加载模型
+ reload();
+ }
+
+ private void reload() {
+ // 加载模型
+ boolean ret_init = yolov8ncnn.loadModel(getAssets(), current_model, current_cpugpu);
+ if (!ret_init) {
+ Log.e("MainActivity", "yolov8ncnn loadModel failed");
+ }
+ }
+
+ @Override
+ public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+ // 当 SurfaceView 的大小发生变化时调用此方法,设置输出的 Surface 为 Camera 的预览界面
+ yolov8ncnn.setOutputWindow(holder.getSurface());
+ }
+
+ @Override
+ public void surfaceCreated(SurfaceHolder holder) {
+ }
+
+ @Override
+ public void surfaceDestroyed(SurfaceHolder holder) {
+ }
+
+ // note: 从后台重新回到该程序时应该做的
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ if (ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_DENIED) {
+ ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA);
+ }
+
+ yolov8ncnn.openCamera(facing);
+ }
+
+ // note: 程序到后台时,关闭摄像头
+ @Override
+ public void onPause() {
+ super.onPause();
+
+ yolov8ncnn.closeCamera();
+ }
+}
diff --git a/android-demo/app/src/main/java/com/gyq/yolov8/Yolov8Ncnn.java b/android-demo/app/src/main/java/com/gyq/yolov8/Yolov8Ncnn.java
new file mode 100644
index 0000000..34d8941
--- /dev/null
+++ b/android-demo/app/src/main/java/com/gyq/yolov8/Yolov8Ncnn.java
@@ -0,0 +1,23 @@
+/*
+ * note: 这里只是声明接口,用于与 C++ 层通过 JNI (Java Native Interface) 进行交互
+ */
+package com.gyq.yolov8;
+
+import android.content.res.AssetManager;
+import android.view.Surface;
+
+public class Yolov8Ncnn {
+ // mgr 是 AssetManager 用来访问应用的资源文件, modelid 是模型的 ID,cpugpu 指定使用 CPU 还是 GPU
+ public native boolean loadModel(AssetManager mgr, int modelid, int cpugpu);
+ // facing 指定打开摄像头的方向
+ public native boolean openCamera(int facing);
+ // 关闭摄像头
+ public native boolean closeCamera();
+ // 数 surface 是输出图像的显示界面,是一个 SurfaceView 控件
+ public native boolean setOutputWindow(Surface surface);
+
+ // 通过JNI,这些声明成 public native 的方法可以用C++方法实现
+ static {
+ System.loadLibrary("yolov8ncnn");
+ }
+}
diff --git a/android-demo/app/src/main/jni/CMakeLists.txt b/android-demo/app/src/main/jni/CMakeLists.txt
new file mode 100644
index 0000000..963560f
--- /dev/null
+++ b/android-demo/app/src/main/jni/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.10)
+project(yolov8ncnn)
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_FLAGS "-Werror,-Wformat-security")
+
+include_directories(ocsort/include)
+include_directories(eigen)
+set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.6.0-android/sdk/native/jni)
+find_package(OpenCV REQUIRED core imgproc)
+
+set(ncnn_DIR ${CMAKE_SOURCE_DIR}/ncnn-20230223-android-vulkan/${ANDROID_ABI}/lib/cmake/ncnn)
+find_package(ncnn REQUIRED)
+
+
+add_library(yolov8ncnn SHARED yolov8ncnn.cpp yolo.cpp ndkcamera.cpp
+ ${CMAKE_SOURCE_DIR}/ocsort/src/lapjv.cpp
+ ${CMAKE_SOURCE_DIR}/ocsort/src/KalmanFilter.cpp
+ ${CMAKE_SOURCE_DIR}/ocsort/src/KalmanBoxTracker.cpp
+ ${CMAKE_SOURCE_DIR}/ocsort/src/association.cpp
+ ${CMAKE_SOURCE_DIR}/ocsort/src/OCsort.cpp
+ ${CMAKE_SOURCE_DIR}/ocsort/src/Utilities.cpp
+)
+target_link_libraries(yolov8ncnn ncnn ${OpenCV_LIBS} camera2ndk mediandk)
diff --git a/android-demo/app/src/main/jni/Object.h b/android-demo/app/src/main/jni/Object.h
new file mode 100644
index 0000000..de4b8eb
--- /dev/null
+++ b/android-demo/app/src/main/jni/Object.h
@@ -0,0 +1,9 @@
+#pragma once
+#include
+struct Object
+{
+ // Generally it is the coordinates of the top left corner + width and height
+ cv::Rect_ rect;
+ int label;
+ float prob;
+};
\ No newline at end of file
diff --git a/android-demo/app/src/main/jni/ncnn-20230223-android-vulkan/arm64-v8a/include/glslang/Include/BaseTypes.h b/android-demo/app/src/main/jni/ncnn-20230223-android-vulkan/arm64-v8a/include/glslang/Include/BaseTypes.h
new file mode 100644
index 0000000..156d98b
--- /dev/null
+++ b/android-demo/app/src/main/jni/ncnn-20230223-android-vulkan/arm64-v8a/include/glslang/Include/BaseTypes.h
@@ -0,0 +1,609 @@
+//
+// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+// Copyright (C) 2012-2013 LunarG, Inc.
+// Copyright (C) 2017 ARM Limited.
+// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+
+#ifndef _BASICTYPES_INCLUDED_
+#define _BASICTYPES_INCLUDED_
+
+namespace glslang {
+
+//
+// Basic type. Arrays, vectors, sampler details, etc., are orthogonal to this.
+//
+enum TBasicType {
+ EbtVoid,
+ EbtFloat,
+ EbtDouble,
+ EbtFloat16,
+ EbtInt8,
+ EbtUint8,
+ EbtInt16,
+ EbtUint16,
+ EbtInt,
+ EbtUint,
+ EbtInt64,
+ EbtUint64,
+ EbtBool,
+ EbtAtomicUint,
+ EbtSampler,
+ EbtStruct,
+ EbtBlock,
+ EbtAccStruct,
+ EbtReference,
+ EbtRayQuery,
+#ifndef GLSLANG_WEB
+ // SPIR-V type defined by spirv_type
+ EbtSpirvType,
+#endif
+
+ // HLSL types that live only temporarily.
+ EbtString,
+
+ EbtNumTypes
+};
+
+//
+// Storage qualifiers. Should align with different kinds of storage or
+// resource or GLSL storage qualifier. Expansion is deprecated.
+//
+// N.B.: You probably DON'T want to add anything here, but rather just add it
+// to the built-in variables. See the comment above TBuiltInVariable.
+//
+// A new built-in variable will normally be an existing qualifier, like 'in', 'out', etc.
+// DO NOT follow the design pattern of, say EvqInstanceId, etc.
+//
+enum TStorageQualifier {
+ EvqTemporary, // For temporaries (within a function), read/write
+ EvqGlobal, // For globals read/write
+ EvqConst, // User-defined constant values, will be semantically constant and constant folded
+ EvqVaryingIn, // pipeline input, read only, also supercategory for all built-ins not included in this enum (see TBuiltInVariable)
+ EvqVaryingOut, // pipeline output, read/write, also supercategory for all built-ins not included in this enum (see TBuiltInVariable)
+ EvqUniform, // read only, shared with app
+ EvqBuffer, // read/write, shared with app
+ EvqShared, // compute shader's read/write 'shared' qualifier
+#ifndef GLSLANG_WEB
+ EvqSpirvStorageClass, // spirv_storage_class
+#endif
+
+ EvqPayload,
+ EvqPayloadIn,
+ EvqHitAttr,
+ EvqCallableData,
+ EvqCallableDataIn,
+
+ EvqtaskPayloadSharedEXT,
+
+ // parameters
+ EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter
+ EvqOut, // also, for 'out' in the grammar before we know if it's a pipeline output or an 'out' parameter
+ EvqInOut,
+ EvqConstReadOnly, // input; also other read-only types having neither a constant value nor constant-value semantics
+
+ // built-ins read by vertex shader
+ EvqVertexId,
+ EvqInstanceId,
+
+ // built-ins written by vertex shader
+ EvqPosition,
+ EvqPointSize,
+ EvqClipVertex,
+
+ // built-ins read by fragment shader
+ EvqFace,
+ EvqFragCoord,
+ EvqPointCoord,
+
+ // built-ins written by fragment shader
+ EvqFragColor,
+ EvqFragDepth,
+ EvqFragStencil,
+
+ // end of list
+ EvqLast
+};
+
+//
+// Subcategories of the TStorageQualifier, simply to give a direct mapping
+// between built-in variable names and an numerical value (the enum).
+//
+// For backward compatibility, there is some redundancy between the
+// TStorageQualifier and these. Existing members should both be maintained accurately.
+// However, any new built-in variable (and any existing non-redundant one)
+// must follow the pattern that the specific built-in is here, and only its
+// general qualifier is in TStorageQualifier.
+//
+// Something like gl_Position, which is sometimes 'in' and sometimes 'out'
+// shows up as two different built-in variables in a single stage, but
+// only has a single enum in TBuiltInVariable, so both the
+// TStorageQualifier and the TBuitinVariable are needed to distinguish
+// between them.
+//
+enum TBuiltInVariable {
+ EbvNone,
+ EbvNumWorkGroups,
+ EbvWorkGroupSize,
+ EbvWorkGroupId,
+ EbvLocalInvocationId,
+ EbvGlobalInvocationId,
+ EbvLocalInvocationIndex,
+ EbvNumSubgroups,
+ EbvSubgroupID,
+ EbvSubGroupSize,
+ EbvSubGroupInvocation,
+ EbvSubGroupEqMask,
+ EbvSubGroupGeMask,
+ EbvSubGroupGtMask,
+ EbvSubGroupLeMask,
+ EbvSubGroupLtMask,
+ EbvSubgroupSize2,
+ EbvSubgroupInvocation2,
+ EbvSubgroupEqMask2,
+ EbvSubgroupGeMask2,
+ EbvSubgroupGtMask2,
+ EbvSubgroupLeMask2,
+ EbvSubgroupLtMask2,
+ EbvVertexId,
+ EbvInstanceId,
+ EbvVertexIndex,
+ EbvInstanceIndex,
+ EbvBaseVertex,
+ EbvBaseInstance,
+ EbvDrawId,
+ EbvPosition,
+ EbvPointSize,
+ EbvClipVertex,
+ EbvClipDistance,
+ EbvCullDistance,
+ EbvNormal,
+ EbvVertex,
+ EbvMultiTexCoord0,
+ EbvMultiTexCoord1,
+ EbvMultiTexCoord2,
+ EbvMultiTexCoord3,
+ EbvMultiTexCoord4,
+ EbvMultiTexCoord5,
+ EbvMultiTexCoord6,
+ EbvMultiTexCoord7,
+ EbvFrontColor,
+ EbvBackColor,
+ EbvFrontSecondaryColor,
+ EbvBackSecondaryColor,
+ EbvTexCoord,
+ EbvFogFragCoord,
+ EbvInvocationId,
+ EbvPrimitiveId,
+ EbvLayer,
+ EbvViewportIndex,
+ EbvPatchVertices,
+ EbvTessLevelOuter,
+ EbvTessLevelInner,
+ EbvBoundingBox,
+ EbvTessCoord,
+ EbvColor,
+ EbvSecondaryColor,
+ EbvFace,
+ EbvFragCoord,
+ EbvPointCoord,
+ EbvFragColor,
+ EbvFragData,
+ EbvFragDepth,
+ EbvFragStencilRef,
+ EbvSampleId,
+ EbvSamplePosition,
+ EbvSampleMask,
+ EbvHelperInvocation,
+
+ EbvBaryCoordNoPersp,
+ EbvBaryCoordNoPerspCentroid,
+ EbvBaryCoordNoPerspSample,
+ EbvBaryCoordSmooth,
+ EbvBaryCoordSmoothCentroid,
+ EbvBaryCoordSmoothSample,
+ EbvBaryCoordPullModel,
+
+ EbvViewIndex,
+ EbvDeviceIndex,
+
+ EbvShadingRateKHR,
+ EbvPrimitiveShadingRateKHR,
+
+ EbvFragSizeEXT,
+ EbvFragInvocationCountEXT,
+
+ EbvSecondaryFragDataEXT,
+ EbvSecondaryFragColorEXT,
+
+ EbvViewportMaskNV,
+ EbvSecondaryPositionNV,
+ EbvSecondaryViewportMaskNV,
+ EbvPositionPerViewNV,
+ EbvViewportMaskPerViewNV,
+ EbvFragFullyCoveredNV,
+ EbvFragmentSizeNV,
+ EbvInvocationsPerPixelNV,
+ // ray tracing
+ EbvLaunchId,
+ EbvLaunchSize,
+ EbvInstanceCustomIndex,
+ EbvGeometryIndex,
+ EbvWorldRayOrigin,
+ EbvWorldRayDirection,
+ EbvObjectRayOrigin,
+ EbvObjectRayDirection,
+ EbvRayTmin,
+ EbvRayTmax,
+ EbvCullMask,
+ EbvHitT,
+ EbvHitKind,
+ EbvObjectToWorld,
+ EbvObjectToWorld3x4,
+ EbvWorldToObject,
+ EbvWorldToObject3x4,
+ EbvIncomingRayFlags,
+ EbvCurrentRayTimeNV,
+ // barycentrics
+ EbvBaryCoordNV,
+ EbvBaryCoordNoPerspNV,
+ EbvBaryCoordEXT,
+ EbvBaryCoordNoPerspEXT,
+ // mesh shaders
+ EbvTaskCountNV,
+ EbvPrimitiveCountNV,
+ EbvPrimitiveIndicesNV,
+ EbvClipDistancePerViewNV,
+ EbvCullDistancePerViewNV,
+ EbvLayerPerViewNV,
+ EbvMeshViewCountNV,
+ EbvMeshViewIndicesNV,
+ //GL_EXT_mesh_shader
+ EbvPrimitivePointIndicesEXT,
+ EbvPrimitiveLineIndicesEXT,
+ EbvPrimitiveTriangleIndicesEXT,
+ EbvCullPrimitiveEXT,
+
+ // sm builtins
+ EbvWarpsPerSM,
+ EbvSMCount,
+ EbvWarpID,
+ EbvSMID,
+
+ // HLSL built-ins that live only temporarily, until they get remapped
+ // to one of the above.
+ EbvFragDepthGreater,
+ EbvFragDepthLesser,
+ EbvGsOutputStream,
+ EbvOutputPatch,
+ EbvInputPatch,
+
+ // structbuffer types
+ EbvAppendConsume, // no need to differentiate append and consume
+ EbvRWStructuredBuffer,
+ EbvStructuredBuffer,
+ EbvByteAddressBuffer,
+ EbvRWByteAddressBuffer,
+
+ EbvLast
+};
+
+// In this enum, order matters; users can assume higher precision is a bigger value
+// and EpqNone is 0.
+enum TPrecisionQualifier {
+ EpqNone = 0,
+ EpqLow,
+ EpqMedium,
+ EpqHigh
+};
+
+#ifdef GLSLANG_WEB
+__inline const char* GetStorageQualifierString(TStorageQualifier q) { return ""; }
+__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { return ""; }
+#else
+// These will show up in error messages
+__inline const char* GetStorageQualifierString(TStorageQualifier q)
+{
+ switch (q) {
+ case EvqTemporary: return "temp"; break;
+ case EvqGlobal: return "global"; break;
+ case EvqConst: return "const"; break;
+ case EvqConstReadOnly: return "const (read only)"; break;
+#ifndef GLSLANG_WEB
+ case EvqSpirvStorageClass: return "spirv_storage_class"; break;
+#endif
+ case EvqVaryingIn: return "in"; break;
+ case EvqVaryingOut: return "out"; break;
+ case EvqUniform: return "uniform"; break;
+ case EvqBuffer: return "buffer"; break;
+ case EvqShared: return "shared"; break;
+ case EvqIn: return "in"; break;
+ case EvqOut: return "out"; break;
+ case EvqInOut: return "inout"; break;
+ case EvqVertexId: return "gl_VertexId"; break;
+ case EvqInstanceId: return "gl_InstanceId"; break;
+ case EvqPosition: return "gl_Position"; break;
+ case EvqPointSize: return "gl_PointSize"; break;
+ case EvqClipVertex: return "gl_ClipVertex"; break;
+ case EvqFace: return "gl_FrontFacing"; break;
+ case EvqFragCoord: return "gl_FragCoord"; break;
+ case EvqPointCoord: return "gl_PointCoord"; break;
+ case EvqFragColor: return "fragColor"; break;
+ case EvqFragDepth: return "gl_FragDepth"; break;
+ case EvqFragStencil: return "gl_FragStencilRefARB"; break;
+ case EvqPayload: return "rayPayloadNV"; break;
+ case EvqPayloadIn: return "rayPayloadInNV"; break;
+ case EvqHitAttr: return "hitAttributeNV"; break;
+ case EvqCallableData: return "callableDataNV"; break;
+ case EvqCallableDataIn: return "callableDataInNV"; break;
+ case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break;
+ default: return "unknown qualifier";
+ }
+}
+
+__inline const char* GetBuiltInVariableString(TBuiltInVariable v)
+{
+ switch (v) {
+ case EbvNone: return "";
+ case EbvNumWorkGroups: return "NumWorkGroups";
+ case EbvWorkGroupSize: return "WorkGroupSize";
+ case EbvWorkGroupId: return "WorkGroupID";
+ case EbvLocalInvocationId: return "LocalInvocationID";
+ case EbvGlobalInvocationId: return "GlobalInvocationID";
+ case EbvLocalInvocationIndex: return "LocalInvocationIndex";
+ case EbvNumSubgroups: return "NumSubgroups";
+ case EbvSubgroupID: return "SubgroupID";
+ case EbvSubGroupSize: return "SubGroupSize";
+ case EbvSubGroupInvocation: return "SubGroupInvocation";
+ case EbvSubGroupEqMask: return "SubGroupEqMask";
+ case EbvSubGroupGeMask: return "SubGroupGeMask";
+ case EbvSubGroupGtMask: return "SubGroupGtMask";
+ case EbvSubGroupLeMask: return "SubGroupLeMask";
+ case EbvSubGroupLtMask: return "SubGroupLtMask";
+ case EbvSubgroupSize2: return "SubgroupSize";
+ case EbvSubgroupInvocation2: return "SubgroupInvocationID";
+ case EbvSubgroupEqMask2: return "SubgroupEqMask";
+ case EbvSubgroupGeMask2: return "SubgroupGeMask";
+ case EbvSubgroupGtMask2: return "SubgroupGtMask";
+ case EbvSubgroupLeMask2: return "SubgroupLeMask";
+ case EbvSubgroupLtMask2: return "SubgroupLtMask";
+ case EbvVertexId: return "VertexId";
+ case EbvInstanceId: return "InstanceId";
+ case EbvVertexIndex: return "VertexIndex";
+ case EbvInstanceIndex: return "InstanceIndex";
+ case EbvBaseVertex: return "BaseVertex";
+ case EbvBaseInstance: return "BaseInstance";
+ case EbvDrawId: return "DrawId";
+ case EbvPosition: return "Position";
+ case EbvPointSize: return "PointSize";
+ case EbvClipVertex: return "ClipVertex";
+ case EbvClipDistance: return "ClipDistance";
+ case EbvCullDistance: return "CullDistance";
+ case EbvNormal: return "Normal";
+ case EbvVertex: return "Vertex";
+ case EbvMultiTexCoord0: return "MultiTexCoord0";
+ case EbvMultiTexCoord1: return "MultiTexCoord1";
+ case EbvMultiTexCoord2: return "MultiTexCoord2";
+ case EbvMultiTexCoord3: return "MultiTexCoord3";
+ case EbvMultiTexCoord4: return "MultiTexCoord4";
+ case EbvMultiTexCoord5: return "MultiTexCoord5";
+ case EbvMultiTexCoord6: return "MultiTexCoord6";
+ case EbvMultiTexCoord7: return "MultiTexCoord7";
+ case EbvFrontColor: return "FrontColor";
+ case EbvBackColor: return "BackColor";
+ case EbvFrontSecondaryColor: return "FrontSecondaryColor";
+ case EbvBackSecondaryColor: return "BackSecondaryColor";
+ case EbvTexCoord: return "TexCoord";
+ case EbvFogFragCoord: return "FogFragCoord";
+ case EbvInvocationId: return "InvocationID";
+ case EbvPrimitiveId: return "PrimitiveID";
+ case EbvLayer: return "Layer";
+ case EbvViewportIndex: return "ViewportIndex";
+ case EbvPatchVertices: return "PatchVertices";
+ case EbvTessLevelOuter: return "TessLevelOuter";
+ case EbvTessLevelInner: return "TessLevelInner";
+ case EbvBoundingBox: return "BoundingBox";
+ case EbvTessCoord: return "TessCoord";
+ case EbvColor: return "Color";
+ case EbvSecondaryColor: return "SecondaryColor";
+ case EbvFace: return "Face";
+ case EbvFragCoord: return "FragCoord";
+ case EbvPointCoord: return "PointCoord";
+ case EbvFragColor: return "FragColor";
+ case EbvFragData: return "FragData";
+ case EbvFragDepth: return "FragDepth";
+ case EbvFragStencilRef: return "FragStencilRef";
+ case EbvSampleId: return "SampleId";
+ case EbvSamplePosition: return "SamplePosition";
+ case EbvSampleMask: return "SampleMaskIn";
+ case EbvHelperInvocation: return "HelperInvocation";
+
+ case EbvBaryCoordNoPersp: return "BaryCoordNoPersp";
+ case EbvBaryCoordNoPerspCentroid: return "BaryCoordNoPerspCentroid";
+ case EbvBaryCoordNoPerspSample: return "BaryCoordNoPerspSample";
+ case EbvBaryCoordSmooth: return "BaryCoordSmooth";
+ case EbvBaryCoordSmoothCentroid: return "BaryCoordSmoothCentroid";
+ case EbvBaryCoordSmoothSample: return "BaryCoordSmoothSample";
+ case EbvBaryCoordPullModel: return "BaryCoordPullModel";
+
+ case EbvViewIndex: return "ViewIndex";
+ case EbvDeviceIndex: return "DeviceIndex";
+
+ case EbvFragSizeEXT: return "FragSizeEXT";
+ case EbvFragInvocationCountEXT: return "FragInvocationCountEXT";
+
+ case EbvSecondaryFragDataEXT: return "SecondaryFragDataEXT";
+ case EbvSecondaryFragColorEXT: return "SecondaryFragColorEXT";
+
+ case EbvViewportMaskNV: return "ViewportMaskNV";
+ case EbvSecondaryPositionNV: return "SecondaryPositionNV";
+ case EbvSecondaryViewportMaskNV: return "SecondaryViewportMaskNV";
+ case EbvPositionPerViewNV: return "PositionPerViewNV";
+ case EbvViewportMaskPerViewNV: return "ViewportMaskPerViewNV";
+ case EbvFragFullyCoveredNV: return "FragFullyCoveredNV";
+ case EbvFragmentSizeNV: return "FragmentSizeNV";
+ case EbvInvocationsPerPixelNV: return "InvocationsPerPixelNV";
+ case EbvLaunchId: return "LaunchIdNV";
+ case EbvLaunchSize: return "LaunchSizeNV";
+ case EbvInstanceCustomIndex: return "InstanceCustomIndexNV";
+ case EbvGeometryIndex: return "GeometryIndexEXT";
+ case EbvWorldRayOrigin: return "WorldRayOriginNV";
+ case EbvWorldRayDirection: return "WorldRayDirectionNV";
+ case EbvObjectRayOrigin: return "ObjectRayOriginNV";
+ case EbvObjectRayDirection: return "ObjectRayDirectionNV";
+ case EbvRayTmin: return "ObjectRayTminNV";
+ case EbvRayTmax: return "ObjectRayTmaxNV";
+ case EbvHitT: return "HitTNV";
+ case EbvHitKind: return "HitKindNV";
+ case EbvIncomingRayFlags: return "IncomingRayFlagsNV";
+ case EbvObjectToWorld: return "ObjectToWorldNV";
+ case EbvWorldToObject: return "WorldToObjectNV";
+ case EbvCurrentRayTimeNV: return "CurrentRayTimeNV";
+
+ case EbvBaryCoordEXT:
+ case EbvBaryCoordNV: return "BaryCoordKHR";
+ case EbvBaryCoordNoPerspEXT:
+ case EbvBaryCoordNoPerspNV: return "BaryCoordNoPerspKHR";
+
+ case EbvTaskCountNV: return "TaskCountNV";
+ case EbvPrimitiveCountNV: return "PrimitiveCountNV";
+ case EbvPrimitiveIndicesNV: return "PrimitiveIndicesNV";
+ case EbvClipDistancePerViewNV: return "ClipDistancePerViewNV";
+ case EbvCullDistancePerViewNV: return "CullDistancePerViewNV";
+ case EbvLayerPerViewNV: return "LayerPerViewNV";
+ case EbvMeshViewCountNV: return "MeshViewCountNV";
+ case EbvMeshViewIndicesNV: return "MeshViewIndicesNV";
+ // GL_EXT_mesh_shader
+ case EbvPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT";
+ case EbvPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT";
+ case EbvPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT";
+ case EbvCullPrimitiveEXT: return "CullPrimitiveEXT";
+
+ case EbvWarpsPerSM: return "WarpsPerSMNV";
+ case EbvSMCount: return "SMCountNV";
+ case EbvWarpID: return "WarpIDNV";
+ case EbvSMID: return "SMIDNV";
+
+ case EbvShadingRateKHR: return "ShadingRateKHR";
+ case EbvPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR";
+
+ default: return "unknown built-in variable";
+ }
+}
+
+__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p)
+{
+ switch (p) {
+ case EpqNone: return ""; break;
+ case EpqLow: return "lowp"; break;
+ case EpqMedium: return "mediump"; break;
+ case EpqHigh: return "highp"; break;
+ default: return "unknown precision qualifier";
+ }
+}
+#endif
+
+__inline bool isTypeSignedInt(TBasicType type)
+{
+ switch (type) {
+ case EbtInt8:
+ case EbtInt16:
+ case EbtInt:
+ case EbtInt64:
+ return true;
+ default:
+ return false;
+ }
+}
+
+__inline bool isTypeUnsignedInt(TBasicType type)
+{
+ switch (type) {
+ case EbtUint8:
+ case EbtUint16:
+ case EbtUint:
+ case EbtUint64:
+ return true;
+ default:
+ return false;
+ }
+}
+
+__inline bool isTypeInt(TBasicType type)
+{
+ return isTypeSignedInt(type) || isTypeUnsignedInt(type);
+}
+
+__inline bool isTypeFloat(TBasicType type)
+{
+ switch (type) {
+ case EbtFloat:
+ case EbtDouble:
+ case EbtFloat16:
+ return true;
+ default:
+ return false;
+ }
+}
+
+__inline int getTypeRank(TBasicType type)
+{
+ int res = -1;
+ switch(type) {
+ case EbtInt8:
+ case EbtUint8:
+ res = 0;
+ break;
+ case EbtInt16:
+ case EbtUint16:
+ res = 1;
+ break;
+ case EbtInt:
+ case EbtUint:
+ res = 2;
+ break;
+ case EbtInt64:
+ case EbtUint64:
+ res = 3;
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ return res;
+}
+
+} // end namespace glslang
+
+#endif // _BASICTYPES_INCLUDED_
diff --git a/android-demo/app/src/main/jni/ncnn-20230223-android-vulkan/arm64-v8a/include/glslang/Include/Common.h b/android-demo/app/src/main/jni/ncnn-20230223-android-vulkan/arm64-v8a/include/glslang/Include/Common.h
new file mode 100644
index 0000000..a5b41cb
--- /dev/null
+++ b/android-demo/app/src/main/jni/ncnn-20230223-android-vulkan/arm64-v8a/include/glslang/Include/Common.h
@@ -0,0 +1,340 @@
+//
+// Copyright (C) 2002-2005 3Dlabs Inc. Ltd.
+// Copyright (C) 2012-2013 LunarG, Inc.
+//
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+//
+// Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+//
+// Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+
+#ifndef _COMMON_INCLUDED_
+#define _COMMON_INCLUDED_
+
+#include
+#include
+#ifdef _MSC_VER
+#include
+#else
+#include
+#endif
+#include
+#include
+#include
+#include