MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / list_all_files

Function list_all_files

scripts/generate_android_bp.py:168–202  ·  view source on GitHub ↗

Gets the list of files to include to the Android.bp :param repo_path: Path of the repository :return: The filtered list of useful filess

(repo_path)

Source from the content-addressed store, hash-verified

166
167
168def list_all_files(repo_path):
169 """ Gets the list of files to include to the Android.bp
170
171 :param repo_path: Path of the repository
172 :return: The filtered list of useful filess
173 """
174 if not repo_path.endswith('/'):
175 repo_path = repo_path + "/"
176
177 # Get cpp files
178 cpp_files = []
179 cl_files = []
180 for path, subdirs, files in os.walk(repo_path):
181 for file in files:
182 if file.endswith(".cpp"):
183 cpp_files.append(os.path.join(path, file))
184 elif file.endswith(".cl"):
185 cl_files.append(os.path.join(path, file))
186 # Include CL headers
187 if "src/core/CL/cl_kernels" in path and file.endswith(".h"):
188 cl_files.append(os.path.join(path, file))
189 # Filter out unused cpp files
190 filtered_cpp_files = []
191 for cpp_file in cpp_files:
192 if any(ep in cpp_file for ep in excluded_paths) or any(ef in cpp_file for ef in excluded_files):
193 continue
194 filtered_cpp_files.append(cpp_file.replace(repo_path, ""))
195 # Filter out unused cl files
196 filtered_cl_files = []
197 for cl_file in cl_files:
198 if any(ep in cl_file for ep in excluded_paths):
199 continue
200 filtered_cl_files.append(cl_file.replace(repo_path, ""))
201
202 return filtered_cpp_files, filtered_cl_files
203
204
205if __name__ == "__main__":

Callers 1

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected