• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5cc_library_shared {
6    name: "libRSCpuRef",
7    defaults: ["libbcc-targets"],
8    vendor_available: true,
9    native_bridge_supported: true,
10    vndk: {
11        enabled: true,
12        support_system_process: true,
13    },
14
15    srcs: [
16        "rsCpuCore.cpp",
17        "rsCpuExecutable.cpp",
18        "rsCpuScript.cpp",
19        "rsCpuRuntimeMath.cpp",
20        "rsCpuScriptGroup.cpp",
21        "rsCpuScriptGroup2.cpp",
22        "rsCpuIntrinsic.cpp",
23        "rsCpuIntrinsic3DLUT.cpp",
24        "rsCpuIntrinsicBLAS.cpp",
25        "rsCpuIntrinsicBlend.cpp",
26        "rsCpuIntrinsicBlur.cpp",
27        "rsCpuIntrinsicColorMatrix.cpp",
28        "rsCpuIntrinsicConvolve3x3.cpp",
29        "rsCpuIntrinsicConvolve5x5.cpp",
30        "rsCpuIntrinsicHistogram.cpp",
31        "rsCpuIntrinsicResize.cpp",
32        "rsCpuIntrinsicLUT.cpp",
33        "rsCpuIntrinsicYuvToRGB.cpp",
34    ],
35
36    arch: {
37        arm64: {
38            cflags: [
39                "-DARCH_ARM_USE_INTRINSICS",
40                "-DARCH_ARM64_USE_INTRINSICS",
41                "-DARCH_ARM64_HAVE_NEON",
42            ],
43
44            srcs: [
45                "rsCpuIntrinsics_advsimd_3DLUT.S",
46                "rsCpuIntrinsics_advsimd_Convolve.S",
47                "rsCpuIntrinsics_advsimd_Blur.S",
48                "rsCpuIntrinsics_advsimd_ColorMatrix.S",
49                "rsCpuIntrinsics_advsimd_Resize.S",
50                "rsCpuIntrinsics_advsimd_YuvToRGB.S",
51                "rsCpuIntrinsics_advsimd_Blend.S",
52            ],
53        },
54
55        arm: {
56            cflags: [
57                "-DARCH_ARM_HAVE_VFP",
58                "-DARCH_ARM_USE_INTRINSICS",
59            ],
60
61            srcs: [
62                "rsCpuIntrinsics_neon_3DLUT.S",
63                "rsCpuIntrinsics_neon_Blend.S",
64                "rsCpuIntrinsics_neon_Blur.S",
65                "rsCpuIntrinsics_neon_Convolve.S",
66                "rsCpuIntrinsics_neon_ColorMatrix.S",
67                "rsCpuIntrinsics_neon_Resize.S",
68                "rsCpuIntrinsics_neon_YuvToRGB.S",
69            ],
70
71            asflags: ["-mfpu=neon"],
72
73            neon: {
74                cflags: [
75                    "-DARCH_ARM_HAVE_NEON",
76                ],
77            },
78        },
79
80        x86: {
81            cflags: ["-DARCH_X86_HAVE_SSSE3"],
82            srcs: ["rsCpuIntrinsics_x86.cpp"],
83        },
84        x86_64: {
85            cflags: ["-DARCH_X86_HAVE_SSSE3"],
86            srcs: ["rsCpuIntrinsics_x86.cpp"],
87	    avx2: {
88                cflags: ["-DARCH_X86_HAVE_AVX2", "-mavx2", "-mfma"],
89            },
90        },
91    },
92
93    shared_libs: [
94        "libRS_internal",
95        "libc++",
96        "liblog",
97        "libz",
98
99        "libbcinfo",
100        "libblas",
101    ],
102    static_libs: ["libbnnmlowp"],
103    header_libs: [
104        "libutils_headers",
105        "libhardware_headers",
106    ],
107
108    include_dirs: [
109        "frameworks/compile/libbcc/include",
110        "frameworks/rs",
111    ],
112
113    cflags: [
114        "-Werror",
115        "-Wall",
116        "-Wextra",
117        "-Wno-unused-parameter",
118        "-Wno-unused-variable",
119    ],
120
121    product_variables: {
122        pdk: {
123            // Not building RenderScript modules in PDK builds, as libmediandk
124            // is not available in PDK.
125            enabled: false,
126        },
127    },
128}
129