diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..c610ee3 --- /dev/null +++ b/.bazelrc @@ -0,0 +1 @@ +build --copt="-fopenmp" --linkopt="-fopenmp" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 97fce47..3c53524 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,15 @@ *.log /vis* *.swo + +bazel-* + +### Automatically added by Hedron's Bazel Compile Commands Extractor: https://github.com/hedronvision/bazel-compile-commands-extractor +# Ignore the `external` link (that is added by `bazel-compile-commands-extractor`). The link differs between macOS/Linux and Windows, so it shouldn't be checked in. The pattern must not end with a trailing `/` because it's a symlink on macOS/Linux. +/external +# Ignore links to Bazel's output. The pattern needs the `*` because people can change the name of the directory into which your repository is cloned (changing the `bazel-` symlink), and must not end with a trailing `/` because it's a symlink on macOS/Linux. +/bazel-* +# Ignore generated output. Although valuable (after all, the primary purpose of `bazel-compile-commands-extractor` is to produce `compile_commands.json`!), it should not be checked in. +/compile_commands.json +# Ignore the directory in which `clangd` stores its local index. +/.cache/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1428c38 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "files.associations": { + "random": "cpp" + } +} \ No newline at end of file diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..00bb183 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,6 @@ +############################################################################### +# Bazel now uses Bzlmod by default to manage external dependencies. +# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. +# +# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 +############################################################################### diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock new file mode 100644 index 0000000..964faf9 --- /dev/null +++ b/MODULE.bazel.lock @@ -0,0 +1,1245 @@ +{ + "lockFileVersion": 3, + "moduleFileHash": "0e3e315145ac7ee7a4e0ac825e1c5e03c068ec1254dd42c3caaecb27e921dc4d", + "flags": { + "cmdRegistries": [ + "https://bcr.bazel.build/" + ], + "cmdModuleOverrides": {}, + "allowedYankedVersions": [], + "envVarAllowedYankedVersions": "", + "ignoreDevDependency": false, + "directDependenciesMode": "WARNING", + "compatibilityMode": "ERROR" + }, + "localOverrideHashes": { + "bazel_tools": "922ea6752dc9105de5af957f7a99a6933c0a6a712d23df6aad16a9c399f7e787" + }, + "moduleDepGraph": { + "": { + "name": "", + "version": "", + "key": "", + "repoName": "", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + } + }, + "bazel_tools@_": { + "name": "bazel_tools", + "version": "", + "key": "bazel_tools@_", + "repoName": "bazel_tools", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_cc_toolchains//:all", + "@local_config_sh//:local_sh_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", + "extensionName": "cc_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 17, + "column": 29 + }, + "imports": { + "local_config_cc": "local_config_cc", + "local_config_cc_toolchains": "local_config_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/osx:xcode_configure.bzl", + "extensionName": "xcode_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 21, + "column": 32 + }, + "imports": { + "local_config_xcode": "local_config_xcode" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@rules_java//java:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 24, + "column": 32 + }, + "imports": { + "local_jdk": "local_jdk", + "remote_java_tools": "remote_java_tools", + "remote_java_tools_linux": "remote_java_tools_linux", + "remote_java_tools_windows": "remote_java_tools_windows", + "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", + "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/sh:sh_configure.bzl", + "extensionName": "sh_configure_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 35, + "column": 39 + }, + "imports": { + "local_config_sh": "local_config_sh" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/test:extensions.bzl", + "extensionName": "remote_coverage_tools_extension", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 39, + "column": 48 + }, + "imports": { + "remote_coverage_tools": "remote_coverage_tools" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + }, + { + "extensionBzlFile": "@bazel_tools//tools/android:android_extensions.bzl", + "extensionName": "remote_android_tools_extensions", + "usingModule": "bazel_tools@_", + "location": { + "file": "@@bazel_tools//:MODULE.bazel", + "line": 42, + "column": 42 + }, + "imports": { + "android_gmaven_r8": "android_gmaven_r8", + "android_tools": "android_tools" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "rules_cc": "rules_cc@0.0.9", + "rules_java": "rules_java@7.1.0", + "rules_license": "rules_license@0.0.7", + "rules_proto": "rules_proto@4.0.0", + "rules_python": "rules_python@0.4.0", + "platforms": "platforms@0.0.7", + "com_google_protobuf": "protobuf@3.19.6", + "zlib": "zlib@1.3", + "build_bazel_apple_support": "apple_support@1.5.0", + "local_config_platform": "local_config_platform@_" + } + }, + "local_config_platform@_": { + "name": "local_config_platform", + "version": "", + "key": "local_config_platform@_", + "repoName": "local_config_platform", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_" + } + }, + "rules_cc@0.0.9": { + "name": "rules_cc", + "version": "0.0.9", + "key": "rules_cc@0.0.9", + "repoName": "rules_cc", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_cc_toolchains//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", + "extensionName": "cc_configure_extension", + "usingModule": "rules_cc@0.0.9", + "location": { + "file": "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel", + "line": 9, + "column": 29 + }, + "imports": { + "local_config_cc_toolchains": "local_config_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_cc~0.0.9", + "urls": [ + "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz" + ], + "integrity": "sha256-IDeHW5pEVtzkp50RKorohbvEqtlo5lh9ym5k86CQDN8=", + "strip_prefix": "rules_cc-0.0.9", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_cc/0.0.9/patches/module_dot_bazel_version.patch": "sha256-mM+qzOI0SgAdaJBlWOSMwMPKpaA9b7R37Hj/tp5bb4g=" + }, + "remote_patch_strip": 0 + } + } + }, + "rules_java@7.1.0": { + "name": "rules_java", + "version": "7.1.0", + "key": "rules_java@7.1.0", + "repoName": "rules_java", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "//toolchains:all", + "@local_jdk//:runtime_toolchain_definition", + "@local_jdk//:bootstrap_runtime_toolchain_definition", + "@remotejdk11_linux_toolchain_config_repo//:all", + "@remotejdk11_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk11_linux_ppc64le_toolchain_config_repo//:all", + "@remotejdk11_linux_s390x_toolchain_config_repo//:all", + "@remotejdk11_macos_toolchain_config_repo//:all", + "@remotejdk11_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk11_win_toolchain_config_repo//:all", + "@remotejdk11_win_arm64_toolchain_config_repo//:all", + "@remotejdk17_linux_toolchain_config_repo//:all", + "@remotejdk17_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk17_linux_ppc64le_toolchain_config_repo//:all", + "@remotejdk17_linux_s390x_toolchain_config_repo//:all", + "@remotejdk17_macos_toolchain_config_repo//:all", + "@remotejdk17_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk17_win_toolchain_config_repo//:all", + "@remotejdk17_win_arm64_toolchain_config_repo//:all", + "@remotejdk21_linux_toolchain_config_repo//:all", + "@remotejdk21_linux_aarch64_toolchain_config_repo//:all", + "@remotejdk21_macos_toolchain_config_repo//:all", + "@remotejdk21_macos_aarch64_toolchain_config_repo//:all", + "@remotejdk21_win_toolchain_config_repo//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@rules_java//java:extensions.bzl", + "extensionName": "toolchains", + "usingModule": "rules_java@7.1.0", + "location": { + "file": "https://bcr.bazel.build/modules/rules_java/7.1.0/MODULE.bazel", + "line": 19, + "column": 27 + }, + "imports": { + "remote_java_tools": "remote_java_tools", + "remote_java_tools_linux": "remote_java_tools_linux", + "remote_java_tools_windows": "remote_java_tools_windows", + "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", + "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64", + "local_jdk": "local_jdk", + "remotejdk11_linux_toolchain_config_repo": "remotejdk11_linux_toolchain_config_repo", + "remotejdk11_linux_aarch64_toolchain_config_repo": "remotejdk11_linux_aarch64_toolchain_config_repo", + "remotejdk11_linux_ppc64le_toolchain_config_repo": "remotejdk11_linux_ppc64le_toolchain_config_repo", + "remotejdk11_linux_s390x_toolchain_config_repo": "remotejdk11_linux_s390x_toolchain_config_repo", + "remotejdk11_macos_toolchain_config_repo": "remotejdk11_macos_toolchain_config_repo", + "remotejdk11_macos_aarch64_toolchain_config_repo": "remotejdk11_macos_aarch64_toolchain_config_repo", + "remotejdk11_win_toolchain_config_repo": "remotejdk11_win_toolchain_config_repo", + "remotejdk11_win_arm64_toolchain_config_repo": "remotejdk11_win_arm64_toolchain_config_repo", + "remotejdk17_linux_toolchain_config_repo": "remotejdk17_linux_toolchain_config_repo", + "remotejdk17_linux_aarch64_toolchain_config_repo": "remotejdk17_linux_aarch64_toolchain_config_repo", + "remotejdk17_linux_ppc64le_toolchain_config_repo": "remotejdk17_linux_ppc64le_toolchain_config_repo", + "remotejdk17_linux_s390x_toolchain_config_repo": "remotejdk17_linux_s390x_toolchain_config_repo", + "remotejdk17_macos_toolchain_config_repo": "remotejdk17_macos_toolchain_config_repo", + "remotejdk17_macos_aarch64_toolchain_config_repo": "remotejdk17_macos_aarch64_toolchain_config_repo", + "remotejdk17_win_toolchain_config_repo": "remotejdk17_win_toolchain_config_repo", + "remotejdk17_win_arm64_toolchain_config_repo": "remotejdk17_win_arm64_toolchain_config_repo", + "remotejdk21_linux_toolchain_config_repo": "remotejdk21_linux_toolchain_config_repo", + "remotejdk21_linux_aarch64_toolchain_config_repo": "remotejdk21_linux_aarch64_toolchain_config_repo", + "remotejdk21_macos_toolchain_config_repo": "remotejdk21_macos_toolchain_config_repo", + "remotejdk21_macos_aarch64_toolchain_config_repo": "remotejdk21_macos_aarch64_toolchain_config_repo", + "remotejdk21_win_toolchain_config_repo": "remotejdk21_win_toolchain_config_repo" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "platforms": "platforms@0.0.7", + "rules_cc": "rules_cc@0.0.9", + "bazel_skylib": "bazel_skylib@1.3.0", + "rules_proto": "rules_proto@4.0.0", + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0", + "urls": [ + "https://github.com/bazelbuild/rules_java/releases/download/7.1.0/rules_java-7.1.0.tar.gz" + ], + "integrity": "sha256-o3pOX2OrgnFuXdau75iO2EYcegC46TYnImKJn1h81OE=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_license@0.0.7": { + "name": "rules_license", + "version": "0.0.7", + "key": "rules_license@0.0.7", + "repoName": "rules_license", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_license~0.0.7", + "urls": [ + "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz" + ], + "integrity": "sha256-RTHezLkTY5ww5cdRKgVNXYdWmNrrddjPkPKEN1/nw2A=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "rules_proto@4.0.0": { + "name": "rules_proto", + "version": "4.0.0", + "key": "rules_proto@4.0.0", + "repoName": "rules_proto", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.3.0", + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_proto~4.0.0", + "urls": [ + "https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.zip" + ], + "integrity": "sha256-Lr5z6xyuRA19pNtRYMGjKaynwQpck4H/lwYyVjyhoq4=", + "strip_prefix": "rules_proto-4.0.0", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_proto/4.0.0/patches/module_dot_bazel.patch": "sha256-MclJO7tIAM2ElDAmscNId9pKTpOuDGHgVlW/9VBOIp0=" + }, + "remote_patch_strip": 0 + } + } + }, + "rules_python@0.4.0": { + "name": "rules_python", + "version": "0.4.0", + "key": "rules_python@0.4.0", + "repoName": "rules_python", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@bazel_tools//tools/python:autodetecting_toolchain" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@rules_python//bzlmod:extensions.bzl", + "extensionName": "pip_install", + "usingModule": "rules_python@0.4.0", + "location": { + "file": "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel", + "line": 7, + "column": 28 + }, + "imports": { + "pypi__click": "pypi__click", + "pypi__pip": "pypi__pip", + "pypi__pip_tools": "pypi__pip_tools", + "pypi__pkginfo": "pypi__pkginfo", + "pypi__setuptools": "pypi__setuptools", + "pypi__wheel": "pypi__wheel" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_python~0.4.0", + "urls": [ + "https://github.com/bazelbuild/rules_python/releases/download/0.4.0/rules_python-0.4.0.tar.gz" + ], + "integrity": "sha256-lUqom0kb5KCDMEosuDgBnIuMNyCnq7nEy4GseiQjDOo=", + "strip_prefix": "", + "remote_patches": { + "https://bcr.bazel.build/modules/rules_python/0.4.0/patches/propagate_pip_install_dependencies.patch": "sha256-v7S/dem/mixg63MF4KoRGDA4KEol9ab/tIVp+6Xq0D0=", + "https://bcr.bazel.build/modules/rules_python/0.4.0/patches/module_dot_bazel.patch": "sha256-kG4VIfWxQazzTuh50mvsx6pmyoRVA4lfH5rkto/Oq+Y=" + }, + "remote_patch_strip": 1 + } + } + }, + "platforms@0.0.7": { + "name": "platforms", + "version": "0.0.7", + "key": "platforms@0.0.7", + "repoName": "platforms", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "rules_license": "rules_license@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "platforms", + "urls": [ + "https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz" + ], + "integrity": "sha256-OlYcmee9vpFzqmU/1Xn+hJ8djWc5V4CrR3Cx84FDHVE=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "protobuf@3.19.6": { + "name": "protobuf", + "version": "3.19.6", + "key": "protobuf@3.19.6", + "repoName": "protobuf", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "bazel_skylib": "bazel_skylib@1.3.0", + "zlib": "zlib@1.3", + "rules_python": "rules_python@0.4.0", + "rules_cc": "rules_cc@0.0.9", + "rules_proto": "rules_proto@4.0.0", + "rules_java": "rules_java@7.1.0", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "protobuf~3.19.6", + "urls": [ + "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.19.6.zip" + ], + "integrity": "sha256-OH4sVZuyx8G8N5jE5s/wFTgaebJ1hpavy/johzC0c4k=", + "strip_prefix": "protobuf-3.19.6", + "remote_patches": { + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/relative_repo_names.patch": "sha256-w/5gw/zGv8NFId+669hcdw1Uus2lxgYpulATHIwIByI=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/remove_dependency_on_rules_jvm_external.patch": "sha256-THUTnVgEBmjA0W7fKzIyZOVG58DnW9HQTkr4D2zKUUc=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/add_module_dot_bazel_for_examples.patch": "sha256-s/b1gi3baK3LsXefI2rQilhmkb2R5jVJdnT6zEcdfHY=", + "https://bcr.bazel.build/modules/protobuf/3.19.6/patches/module_dot_bazel.patch": "sha256-S0DEni8zgx7rHscW3z/rCEubQnYec0XhNet640cw0h4=" + }, + "remote_patch_strip": 1 + } + } + }, + "zlib@1.3": { + "name": "zlib", + "version": "1.3", + "key": "zlib@1.3", + "repoName": "zlib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.7", + "rules_cc": "rules_cc@0.0.9", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "zlib~1.3", + "urls": [ + "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz" + ], + "integrity": "sha256-/wukwpIBPbwnUws6geH5qBPNOd4Byl4Pi/NVcC76WT4=", + "strip_prefix": "zlib-1.3", + "remote_patches": { + "https://bcr.bazel.build/modules/zlib/1.3/patches/add_build_file.patch": "sha256-Ei+FYaaOo7A3jTKunMEodTI0Uw5NXQyZEcboMC8JskY=", + "https://bcr.bazel.build/modules/zlib/1.3/patches/module_dot_bazel.patch": "sha256-fPWLM+2xaF/kuy+kZc1YTfW6hNjrkG400Ho7gckuyJk=" + }, + "remote_patch_strip": 0 + } + } + }, + "apple_support@1.5.0": { + "name": "apple_support", + "version": "1.5.0", + "key": "apple_support@1.5.0", + "repoName": "build_bazel_apple_support", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "@local_config_apple_cc_toolchains//:all" + ], + "extensionUsages": [ + { + "extensionBzlFile": "@build_bazel_apple_support//crosstool:setup.bzl", + "extensionName": "apple_cc_configure_extension", + "usingModule": "apple_support@1.5.0", + "location": { + "file": "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel", + "line": 17, + "column": 35 + }, + "imports": { + "local_config_apple_cc": "local_config_apple_cc", + "local_config_apple_cc_toolchains": "local_config_apple_cc_toolchains" + }, + "devImports": [], + "tags": [], + "hasDevUseExtension": false, + "hasNonDevUseExtension": true + } + ], + "deps": { + "bazel_skylib": "bazel_skylib@1.3.0", + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "apple_support~1.5.0", + "urls": [ + "https://github.com/bazelbuild/apple_support/releases/download/1.5.0/apple_support.1.5.0.tar.gz" + ], + "integrity": "sha256-miM41vja0yRPgj8txghKA+TQ+7J8qJLclw5okNW0gYQ=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + }, + "bazel_skylib@1.3.0": { + "name": "bazel_skylib", + "version": "1.3.0", + "key": "bazel_skylib@1.3.0", + "repoName": "bazel_skylib", + "executionPlatformsToRegister": [], + "toolchainsToRegister": [ + "//toolchains/unittest:cmd_toolchain", + "//toolchains/unittest:bash_toolchain" + ], + "extensionUsages": [], + "deps": { + "platforms": "platforms@0.0.7", + "bazel_tools": "bazel_tools@_", + "local_config_platform": "local_config_platform@_" + }, + "repoSpec": { + "bzlFile": "@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "bazel_skylib~1.3.0", + "urls": [ + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz" + ], + "integrity": "sha256-dNVE2W9KW7Yw1GXKi7z+Ix41lOWq5X4e2/F6brPKJQY=", + "strip_prefix": "", + "remote_patches": {}, + "remote_patch_strip": 0 + } + } + } + }, + "moduleExtensions": { + "@@apple_support~1.5.0//crosstool:setup.bzl%apple_cc_configure_extension": { + "general": { + "bzlTransitiveDigest": "pMLFCYaRPkgXPQ8vtuNkMfiHfPmRBy6QJfnid4sWfv0=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_apple_cc": { + "bzlFile": "@@apple_support~1.5.0//crosstool:setup.bzl", + "ruleClassName": "_apple_cc_autoconf", + "attributes": { + "name": "apple_support~1.5.0~apple_cc_configure_extension~local_config_apple_cc" + } + }, + "local_config_apple_cc_toolchains": { + "bzlFile": "@@apple_support~1.5.0//crosstool:setup.bzl", + "ruleClassName": "_apple_cc_autoconf_toolchains", + "attributes": { + "name": "apple_support~1.5.0~apple_cc_configure_extension~local_config_apple_cc_toolchains" + } + } + } + } + }, + "@@bazel_tools//tools/cpp:cc_configure.bzl%cc_configure_extension": { + "general": { + "bzlTransitiveDigest": "O9sf6ilKWU9Veed02jG9o2HM/xgV/UAyciuFBuxrFRY=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_cc": { + "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl", + "ruleClassName": "cc_autoconf", + "attributes": { + "name": "bazel_tools~cc_configure_extension~local_config_cc" + } + }, + "local_config_cc_toolchains": { + "bzlFile": "@@bazel_tools//tools/cpp:cc_configure.bzl", + "ruleClassName": "cc_autoconf_toolchains", + "attributes": { + "name": "bazel_tools~cc_configure_extension~local_config_cc_toolchains" + } + } + } + } + }, + "@@bazel_tools//tools/osx:xcode_configure.bzl%xcode_configure_extension": { + "general": { + "bzlTransitiveDigest": "Qh2bWTU6QW6wkrd87qrU4YeY+SG37Nvw3A0PR4Y0L2Y=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_xcode": { + "bzlFile": "@@bazel_tools//tools/osx:xcode_configure.bzl", + "ruleClassName": "xcode_autoconf", + "attributes": { + "name": "bazel_tools~xcode_configure_extension~local_config_xcode", + "xcode_locator": "@bazel_tools//tools/osx:xcode_locator.m", + "remote_xcode": "" + } + } + } + } + }, + "@@bazel_tools//tools/sh:sh_configure.bzl%sh_configure_extension": { + "general": { + "bzlTransitiveDigest": "hp4NgmNjEg5+xgvzfh6L83bt9/aiiWETuNpwNuF1MSU=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_sh": { + "bzlFile": "@@bazel_tools//tools/sh:sh_configure.bzl", + "ruleClassName": "sh_config", + "attributes": { + "name": "bazel_tools~sh_configure_extension~local_config_sh" + } + } + } + } + }, + "@@rules_java~7.1.0//java:extensions.bzl%toolchains": { + "general": { + "bzlTransitiveDigest": "iUIRqCK7tkhvcDJCAfPPqSd06IHG0a8HQD0xeQyVAqw=", + "accumulatedFileDigests": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "remotejdk21_linux_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux//:jdk\",\n)\n" + } + }, + "remotejdk17_linux_s390x_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_s390x_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_s390x//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_s390x//:jdk\",\n)\n" + } + }, + "remotejdk17_macos_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos//:jdk\",\n)\n" + } + }, + "remotejdk21_macos_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk17_linux_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk21_macos_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "2a7a99a3ea263dbd8d32a67d1e6e363ba8b25c645c826f5e167a02bbafaff1fa", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-macosx_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_aarch64.tar.gz" + ] + } + }, + "remotejdk17_linux_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux//:jdk\",\n)\n" + } + }, + "remotejdk17_macos_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "314b04568ec0ae9b36ba03c9cbd42adc9e1265f74678923b19297d66eb84dcca", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_aarch64.tar.gz" + ] + } + }, + "remote_java_tools_windows": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_windows", + "sha256": "c5c70c214a350f12cbf52da8270fa43ba629b795f3dd328028a38f8f0d39c2a1", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_windows-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_windows-v13.1.zip" + ] + } + }, + "remotejdk11_win": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "43408193ce2fa0862819495b5ae8541085b95660153f2adcf91a52d3a1710e83", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-win_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-win_x64.zip" + ] + } + }, + "remotejdk11_win_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "54174439f2b3fddd11f1048c397fe7bb45d4c9d66d452d6889b013d04d21c4de", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_aarch64.tar.gz" + ] + } + }, + "remotejdk17_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "b9482f2304a1a68a614dfacddcf29569a72f0fac32e6c74f83dc1b9a157b8340", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_x64.tar.gz" + ] + } + }, + "remotejdk11_linux_s390x_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_s390x_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_s390x//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:s390x\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_s390x//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux//:jdk\",\n)\n" + } + }, + "remotejdk11_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "bcaab11cfe586fae7583c6d9d311c64384354fb2638eb9a012eca4c3f1a1d9fd", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_x64.tar.gz" + ] + } + }, + "remotejdk11_win_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win_arm64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "b8a28e6e767d90acf793ea6f5bed0bb595ba0ba5ebdf8b99f395266161e53ec2", + "strip_prefix": "jdk-11.0.13+8", + "urls": [ + "https://mirror.bazel.build/aka.ms/download-jdk/microsoft-jdk-11.0.13.8.1-windows-aarch64.zip" + ] + } + }, + "remotejdk17_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "640453e8afe8ffe0fb4dceb4535fb50db9c283c64665eebb0ba68b19e65f4b1f", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-macosx_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-macosx_x64.tar.gz" + ] + } + }, + "remotejdk21_macos": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "9639b87db586d0c89f7a9892ae47f421e442c64b97baebdff31788fbe23265bd", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-macosx_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-macosx_x64.tar.gz" + ] + } + }, + "remotejdk21_macos_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_macos_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_macos//:jdk\",\n)\n" + } + }, + "remotejdk17_macos_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_macos_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_macos_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk17_win": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "192f2afca57701de6ec496234f7e45d971bf623ff66b8ee4a5c81582054e5637", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_x64.zip" + ] + } + }, + "remotejdk11_macos_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_ppc64le_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_ppc64le_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_ppc64le//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_ppc64le//:jdk\",\n)\n" + } + }, + "remotejdk21_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "0c0eadfbdc47a7ca64aeab51b9c061f71b6e4d25d2d87674512e9b6387e9e3a6", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-linux_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_x64.tar.gz" + ] + } + }, + "remote_java_tools_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_linux", + "sha256": "d134da9b04c9023fb6e56a5d4bffccee73f7bc9572ddc4e747778dacccd7a5a7", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_linux-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_linux-v13.1.zip" + ] + } + }, + "remotejdk21_win": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_win", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "e9959d500a0d9a7694ac243baf657761479da132f0f94720cbffd092150bd802", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-win_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-win_x64.zip", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-win_x64.zip" + ] + } + }, + "remotejdk21_linux_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 21,\n)\n", + "sha256": "1fb64b8036c5d463d8ab59af06bf5b6b006811e6012e3b0eb6bccf57f1c55835", + "strip_prefix": "zulu21.28.85-ca-jdk21.0.0-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu21.28.85-ca-jdk21.0.0-linux_aarch64.tar.gz" + ] + } + }, + "remotejdk11_linux_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_linux_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_s390x": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_s390x", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "a58fc0361966af0a5d5a31a2d8a208e3c9bb0f54f345596fd80b99ea9a39788b", + "strip_prefix": "jdk-11.0.15+10", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz", + "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.15_10.tar.gz" + ] + } + }, + "remotejdk17_linux_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "6531cef61e416d5a7b691555c8cf2bdff689201b8a001ff45ab6740062b44313", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-linux_aarch64.tar.gz" + ] + } + }, + "remotejdk17_win_arm64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win_arm64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win_arm64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win_arm64//:jdk\",\n)\n" + } + }, + "remotejdk11_linux": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "a34b404f87a08a61148b38e1416d837189e1df7a040d949e743633daf4695a3c", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-linux_x64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-linux_x64.tar.gz" + ] + } + }, + "remotejdk11_macos_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:macos\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_macos//:jdk\",\n)\n" + } + }, + "remotejdk17_linux_ppc64le_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_ppc64le_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_ppc64le//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:ppc\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_linux_ppc64le//:jdk\",\n)\n" + } + }, + "remotejdk17_win_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win_arm64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "6802c99eae0d788e21f52d03cab2e2b3bf42bc334ca03cbf19f71eb70ee19f85", + "strip_prefix": "zulu17.44.53-ca-jdk17.0.8.1-win_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip", + "https://cdn.azul.com/zulu/bin/zulu17.44.53-ca-jdk17.0.8.1-win_aarch64.zip" + ] + } + }, + "remote_java_tools_darwin_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_darwin_arm64", + "sha256": "dab5bb87ec43e980faea6e1cec14bafb217b8e2f5346f53aa784fd715929a930", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_darwin_arm64-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_darwin_arm64-v13.1.zip" + ] + } + }, + "remotejdk17_linux_ppc64le": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_ppc64le", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "00a4c07603d0218cd678461b5b3b7e25b3253102da4022d31fc35907f21a2efd", + "strip_prefix": "jdk-17.0.8.1+1", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz", + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.8.1_1.tar.gz" + ] + } + }, + "remotejdk21_linux_aarch64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_linux_aarch64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux_aarch64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:linux\", \"@platforms//cpu:aarch64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_linux_aarch64//:jdk\",\n)\n" + } + }, + "remotejdk11_win_arm64_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_win_arm64_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_11\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"11\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win_arm64//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:arm64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk11_win_arm64//:jdk\",\n)\n" + } + }, + "local_jdk": { + "bzlFile": "@@rules_java~7.1.0//toolchains:local_java_repository.bzl", + "ruleClassName": "_local_java_repository_rule", + "attributes": { + "name": "rules_java~7.1.0~toolchains~local_jdk", + "java_home": "", + "version": "", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = {RUNTIME_VERSION},\n)\n" + } + }, + "remote_java_tools_darwin_x86_64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools_darwin_x86_64", + "sha256": "0db40d8505a2b65ef0ed46e4256757807db8162f7acff16225be57c1d5726dbc", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools_darwin_x86_64-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools_darwin_x86_64-v13.1.zip" + ] + } + }, + "remote_java_tools": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remote_java_tools", + "sha256": "286bdbbd66e616fc4ed3f90101418729a73baa7e8c23a98ffbef558f74c0ad14", + "urls": [ + "https://mirror.bazel.build/bazel_java_tools/releases/java/v13.1/java_tools-v13.1.zip", + "https://github.com/bazelbuild/java_tools/releases/download/java_v13.1/java_tools-v13.1.zip" + ] + } + }, + "remotejdk17_linux_s390x": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_linux_s390x", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 17,\n)\n", + "sha256": "ffacba69c6843d7ca70d572489d6cc7ab7ae52c60f0852cedf4cf0d248b6fc37", + "strip_prefix": "jdk-17.0.8.1+1", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz", + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz" + ] + } + }, + "remotejdk17_win_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk17_win_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_17\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"17\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk17_win//:jdk\",\n)\n" + } + }, + "remotejdk11_linux_ppc64le": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_linux_ppc64le", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "a8fba686f6eb8ae1d1a9566821dbd5a85a1108b96ad857fdbac5c1e4649fc56f", + "strip_prefix": "jdk-11.0.15+10", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz", + "https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.15+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.15_10.tar.gz" + ] + } + }, + "remotejdk11_macos_aarch64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk11_macos_aarch64", + "build_file_content": "load(\"@rules_java//java:defs.bzl\", \"java_runtime\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files([\"WORKSPACE\", \"BUILD.bazel\"])\n\nfilegroup(\n name = \"jre\",\n srcs = glob(\n [\n \"jre/bin/**\",\n \"jre/lib/**\",\n ],\n allow_empty = True,\n # In some configurations, Java browser plugin is considered harmful and\n # common antivirus software blocks access to npjp2.dll interfering with Bazel,\n # so do not include it in JRE on Windows.\n exclude = [\"jre/bin/plugin2/**\"],\n ),\n)\n\nfilegroup(\n name = \"jdk-bin\",\n srcs = glob(\n [\"bin/**\"],\n # The JDK on Windows sometimes contains a directory called\n # \"%systemroot%\", which is not a valid label.\n exclude = [\"**/*%*/**\"],\n ),\n)\n\n# This folder holds security policies.\nfilegroup(\n name = \"jdk-conf\",\n srcs = glob(\n [\"conf/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-include\",\n srcs = glob(\n [\"include/**\"],\n allow_empty = True,\n ),\n)\n\nfilegroup(\n name = \"jdk-lib\",\n srcs = glob(\n [\"lib/**\", \"release\"],\n allow_empty = True,\n exclude = [\n \"lib/missioncontrol/**\",\n \"lib/visualvm/**\",\n ],\n ),\n)\n\njava_runtime(\n name = \"jdk\",\n srcs = [\n \":jdk-bin\",\n \":jdk-conf\",\n \":jdk-include\",\n \":jdk-lib\",\n \":jre\",\n ],\n # Provide the 'java` binary explicitly so that the correct path is used by\n # Bazel even when the host platform differs from the execution platform.\n # Exactly one of the two globs will be empty depending on the host platform.\n # When --incompatible_disallow_empty_glob is enabled, each individual empty\n # glob will fail without allow_empty = True, even if the overall result is\n # non-empty.\n java = glob([\"bin/java.exe\", \"bin/java\"], allow_empty = True)[0],\n version = 11,\n)\n", + "sha256": "7632bc29f8a4b7d492b93f3bc75a7b61630894db85d136456035ab2a24d38885", + "strip_prefix": "zulu11.66.15-ca-jdk11.0.20-macosx_aarch64", + "urls": [ + "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz", + "https://cdn.azul.com/zulu/bin/zulu11.66.15-ca-jdk11.0.20-macosx_aarch64.tar.gz" + ] + } + }, + "remotejdk21_win_toolchain_config_repo": { + "bzlFile": "@@rules_java~7.1.0//toolchains:remote_java_repository.bzl", + "ruleClassName": "_toolchain_config", + "attributes": { + "name": "rules_java~7.1.0~toolchains~remotejdk21_win_toolchain_config_repo", + "build_file": "\nconfig_setting(\n name = \"prefix_version_setting\",\n values = {\"java_runtime_version\": \"remotejdk_21\"},\n visibility = [\"//visibility:private\"],\n)\nconfig_setting(\n name = \"version_setting\",\n values = {\"java_runtime_version\": \"21\"},\n visibility = [\"//visibility:private\"],\n)\nalias(\n name = \"version_or_prefix_version_setting\",\n actual = select({\n \":version_setting\": \":version_setting\",\n \"//conditions:default\": \":prefix_version_setting\",\n }),\n visibility = [\"//visibility:private\"],\n)\ntoolchain(\n name = \"toolchain\",\n target_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:runtime_toolchain_type\",\n toolchain = \"@remotejdk21_win//:jdk\",\n)\ntoolchain(\n name = \"bootstrap_runtime_toolchain\",\n # These constraints are not required for correctness, but prevent fetches of remote JDK for\n # different architectures. As every Java compilation toolchain depends on a bootstrap runtime in\n # the same configuration, this constraint will not result in toolchain resolution failures.\n exec_compatible_with = [\"@platforms//os:windows\", \"@platforms//cpu:x86_64\"],\n target_settings = [\":version_or_prefix_version_setting\"],\n toolchain_type = \"@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type\",\n toolchain = \"@remotejdk21_win//:jdk\",\n)\n" + } + } + } + } + } + } +} diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel new file mode 100644 index 0000000..a8c660c --- /dev/null +++ b/WORKSPACE.bazel @@ -0,0 +1,15 @@ +workspace(name = "biest") + +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + +# Hedron's Compile Commands Extractor for Bazel +# https://github.com/hedronvision/bazel-compile-commands-extractor +# run via "bazel run @hedron_compile_commands//:refresh_all" +http_archive( + name = "hedron_compile_commands", + url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/ed994039a951b736091776d677f324b3903ef939.tar.gz", + strip_prefix = "bazel-compile-commands-extractor-ed994039a951b736091776d677f324b3903ef939", + sha256 = "085bde6c5212c8c1603595341ffe7133108034808d8c819f8978b2b303afc9e7", +) +load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup") +hedron_compile_commands_setup() diff --git a/biest/BUILD.bazel b/biest/BUILD.bazel new file mode 100644 index 0000000..c9cf054 --- /dev/null +++ b/biest/BUILD.bazel @@ -0,0 +1,45 @@ +cc_library( + name = "biest", + hdrs = [ + "biest.hpp", + "paraview.hpp", + "bie_solvers.hpp", + "boundary_integ_op.hpp", + "kernel.hpp", + "mat.hpp", + "singular_correction.hpp", + "surface.hpp", + "surface_op.hpp", + "vacuum-field.hpp", + ], + srcs = [ + "bie_solvers.cc", + "boundary_integ_op.cc", + "surface_op.cc", + "surface.cc", + "vacuum-field.cc", + ], + visibility = ["//visibility:public"], + deps = [ + "//sctl:sctl", + ], + data = [ + "//geom:lhd", + "//geom:ncsx", + "//geom:quas3", + "//geom:w7x", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) diff --git a/include/biest/bie_solvers.txx b/biest/bie_solvers.cc similarity index 99% rename from include/biest/bie_solvers.txx rename to biest/bie_solvers.cc index e98ef90..ba7beaa 100644 --- a/include/biest/bie_solvers.txx +++ b/biest/bie_solvers.cc @@ -1,5 +1,10 @@ -#include -#include +#include "biest/bie_solvers.hpp" + +#include "sctl/sctl.hpp" +#include "biest/boundary_integ_op.hpp" +#include "biest/kernel.hpp" +#include "biest/surface_op.hpp" +#include "biest/surface.hpp" namespace biest { diff --git a/include/biest/bie_solvers.hpp b/biest/bie_solvers.hpp similarity index 98% rename from include/biest/bie_solvers.hpp rename to biest/bie_solvers.hpp index 74b3263..ee97e6a 100644 --- a/include/biest/bie_solvers.hpp +++ b/biest/bie_solvers.hpp @@ -1,10 +1,10 @@ #ifndef _BIE_SOLVERS_HPP_ #define _BIE_SOLVERS_HPP_ -#include -#include -#include -#include +#include "sctl/sctl.hpp" +#include "biest/boundary_integ_op.hpp" +#include "biest/surface_op.hpp" +#include "biest/surface.hpp" namespace biest { @@ -204,6 +204,4 @@ template - #endif //_BIE_SOLVERS_HPP_ diff --git a/include/biest.hpp b/biest/biest.hpp similarity index 55% rename from include/biest.hpp rename to biest/biest.hpp index 84d5332..87ba819 100644 --- a/include/biest.hpp +++ b/biest/biest.hpp @@ -3,8 +3,8 @@ #ifndef _BIEST_HPP_ #define _BIEST_HPP_ -#include -#include -#include +#include "biest/vacuum-field.hpp" +#include "biest/bie_solvers.hpp" +#include "biest/surface.hpp" #endif //_BIEST_HPP_ diff --git a/include/biest/boundary_integ_op.txx b/biest/boundary_integ_op.cc similarity index 99% rename from include/biest/boundary_integ_op.txx rename to biest/boundary_integ_op.cc index 8bbe777..2ef7dd6 100644 --- a/include/biest/boundary_integ_op.txx +++ b/biest/boundary_integ_op.cc @@ -1,4 +1,8 @@ -#include +#include "biest/boundary_integ_op.hpp" + +#include "sctl/sctl.hpp" +#include "biest/singular_correction.hpp" +#include "biest/surface.hpp" namespace biest { diff --git a/include/biest/boundary_integ_op.hpp b/biest/boundary_integ_op.hpp similarity index 98% rename from include/biest/boundary_integ_op.hpp rename to biest/boundary_integ_op.hpp index 811b084..0630f1d 100644 --- a/include/biest/boundary_integ_op.hpp +++ b/biest/boundary_integ_op.hpp @@ -1,8 +1,9 @@ #ifndef _BOUNDARY_INTEG_OP_HPP_ #define _BOUNDARY_INTEG_OP_HPP_ -#include -#include +#include "sctl/sctl.hpp" +#include "biest/surface.hpp" +#include "biest/surface_op.hpp" namespace biest { @@ -149,6 +150,4 @@ template - #endif //_BOUNDARY_INTEG_OP_HPP_ diff --git a/include/biest/kernel.hpp b/biest/kernel.hpp similarity index 99% rename from include/biest/kernel.hpp rename to biest/kernel.hpp index f6a3771..5e36797 100644 --- a/include/biest/kernel.hpp +++ b/biest/kernel.hpp @@ -1,7 +1,7 @@ #ifndef _KERNEL_HPP_ #define _KERNEL_HPP_ -#include +#include "sctl/sctl.hpp" namespace biest { diff --git a/include/biest/mat.hpp b/biest/mat.hpp similarity index 100% rename from include/biest/mat.hpp rename to biest/mat.hpp diff --git a/biest/paraview.hpp b/biest/paraview.hpp new file mode 100644 index 0000000..f8ca4da --- /dev/null +++ b/biest/paraview.hpp @@ -0,0 +1,368 @@ +#ifndef BIEST_PARAVIEW_H_ +#define BIEST_PARAVIEW_H_ + +#include "sctl/sctl.hpp" + +namespace biest { + +struct VTKData { + typedef double VTKReal; + static constexpr sctl::Integer COORD_DIM = 3; + + std::vector point_coord; + std::vector point_value; + std::vector line_connect; + std::vector line_offset; + std::vector poly_connect; + std::vector poly_offset; + + void WriteVTK(const char* fname, const sctl::Comm& comm = sctl::Comm::Self()) { + sctl::Integer np = comm.Size(); + sctl::Integer myrank = comm.Rank(); + + std::vector& coord=this->point_coord; + std::vector& value=this->point_value; + std::vector& line_connect=this->line_connect; + std::vector& line_offset=this->line_offset; + std::vector& poly_connect=this->poly_connect; + std::vector& poly_offset=this->poly_offset; + + sctl::Long pt_cnt=coord.size()/COORD_DIM; + sctl::Long line_cnt=line_offset.size(); + sctl::Long poly_cnt=poly_offset.size(); + + // Open file for writing. + std::stringstream vtufname; + vtufname<\n"; + if(isLittleEndian) vtufile<<"\n"; + else vtufile<<"\n"; + //=========================================================================== + vtufile<<" \n"; + vtufile<<" \n"; + + //--------------------------------------------------------------------------- + vtufile<<" \n"; + vtufile<<" \n"; + data_size+=sizeof(uint32_t)+coord.size()*sizeof(VTKReal); + vtufile<<" \n"; + //--------------------------------------------------------------------------- + if(value.size()){ // value + vtufile<<" \n"; + vtufile<<" \n"; + data_size+=sizeof(uint32_t)+value.size()*sizeof(VTKReal); + vtufile<<" \n"; + } + //--------------------------------------------------------------------------- + vtufile<<" \n"; + vtufile<<" \n"; + data_size+=sizeof(uint32_t)+line_connect.size()*sizeof(int32_t); + vtufile<<" \n"; + data_size+=sizeof(uint32_t)+line_offset.size() *sizeof(int32_t); + vtufile<<" \n"; + //--------------------------------------------------------------------------- + vtufile<<" \n"; + vtufile<<" \n"; + data_size+=sizeof(uint32_t)+poly_connect.size()*sizeof(int32_t); + vtufile<<" \n"; + data_size+=sizeof(uint32_t)+poly_offset.size() *sizeof(int32_t); + vtufile<<" \n"; + //--------------------------------------------------------------------------- + + vtufile<<" \n"; + vtufile<<" \n"; + //=========================================================================== + vtufile<<" \n"; + vtufile<<" _"; + + int32_t block_size; + block_size=coord.size()*sizeof(VTKReal); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&coord [0], coord.size()*sizeof(VTKReal)); + if(value.size()){ // value + block_size=value.size()*sizeof(VTKReal); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&value [0], value.size()*sizeof(VTKReal)); + } + block_size=line_connect.size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&line_connect[0], line_connect.size()*sizeof(int32_t)); + block_size=line_offset .size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&line_offset [0], line_offset .size()*sizeof(int32_t)); + block_size=poly_connect.size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&poly_connect[0], poly_connect.size()*sizeof(int32_t)); + block_size=poly_offset .size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&poly_offset [0], poly_offset .size()*sizeof(int32_t)); + + vtufile<<"\n"; + vtufile<<" \n"; + //=========================================================================== + vtufile<<"\n"; + vtufile.close(); + + + if(myrank) return; + std::stringstream pvtufname; + pvtufname<\n"; + pvtufile<<"\n"; + pvtufile<<" \n"; + pvtufile<<" \n"; + pvtufile<<" \n"; + pvtufile<<" \n"; + if(value.size()){ // value + pvtufile<<" \n"; + pvtufile<<" \n"; + pvtufile<<" \n"; + } + { + // Extract filename from path. + std::stringstream vtupath; + vtupath<<'/'<\n"; + } + pvtufile<<" \n"; + pvtufile<<"\n"; + pvtufile.close(); + } +}; +struct VTUData { + typedef float VTKReal; + + // Point data + sctl::Vector coord; // always 3D + sctl::Vector value; + + // Cell data + sctl::Vector connect; + sctl::Vector offset; + sctl::Vector types; + + void WriteVTK(const std::string& fname, const sctl::Comm& comm = sctl::Comm::Self()) const { + typedef typename VTUData::VTKReal VTKReal; + sctl::Long value_dof = 0; + { // Write vtu file. + std::ofstream vtufile; + { // Open file for writing. + std::stringstream vtufname; + vtufname << fname << std::setfill('0') << std::setw(6) << comm.Rank() << ".vtu"; + vtufile.open(vtufname.str().c_str()); + if (vtufile.fail()) return; + } + { // Write to file. + sctl::Long pt_cnt = coord.Dim() / 3; + sctl::Long cell_cnt = types.Dim(); + value_dof = (pt_cnt ? value.Dim() / pt_cnt : 0); + + sctl::Vector mpi_rank; + { // Set mpi_rank + sctl::Integer new_myrank = comm.Rank(); + mpi_rank.ReInit(pt_cnt); + for (sctl::Long i = 0; i < mpi_rank.Dim(); i++) mpi_rank[i] = new_myrank; + } + + bool isLittleEndian; + { // Set isLittleEndian + uint16_t number = 0x1; + uint8_t *numPtr = (uint8_t *)&number; + isLittleEndian = (numPtr[0] == 1); + } + + sctl::Long data_size = 0; + vtufile << "\n"; + vtufile << "\n"; + // =========================================================================== + vtufile << " \n"; + vtufile << " \n"; + //--------------------------------------------------------------------------- + vtufile << " \n"; + vtufile << " \n"; + data_size += sizeof(uint32_t) + coord.Dim() * sizeof(VTKReal); + vtufile << " \n"; + //--------------------------------------------------------------------------- + vtufile << " \n"; + if (value_dof) { // value + vtufile << " \n"; + data_size += sizeof(uint32_t) + value.Dim() * sizeof(VTKReal); + } + { // mpi_rank + vtufile << " \n"; + data_size += sizeof(uint32_t) + pt_cnt * sizeof(int32_t); + } + vtufile << " \n"; + //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- + vtufile << " \n"; + vtufile << " \n"; + data_size += sizeof(uint32_t) + connect.Dim() * sizeof(int32_t); + vtufile << " \n"; + data_size += sizeof(uint32_t) + offset.Dim() * sizeof(int32_t); + vtufile << " \n"; + data_size += sizeof(uint32_t) + types.Dim() * sizeof(uint8_t); + vtufile << " \n"; + //--------------------------------------------------------------------------- + vtufile << " \n"; + vtufile << " \n"; + // =========================================================================== + vtufile << " \n"; + vtufile << " _"; + + int32_t block_size; + { // coord + block_size = coord.Dim() * sizeof(VTKReal); + vtufile.write((char *)&block_size, sizeof(int32_t)); + if (coord.Dim()) vtufile.write((char *)&coord[0], coord.Dim() * sizeof(VTKReal)); + } + if (value_dof) { // value + block_size = value.Dim() * sizeof(VTKReal); + vtufile.write((char *)&block_size, sizeof(int32_t)); + if (value.Dim()) vtufile.write((char *)&value[0], value.Dim() * sizeof(VTKReal)); + } + { // mpi_rank + block_size = mpi_rank.Dim() * sizeof(int32_t); + vtufile.write((char *)&block_size, sizeof(int32_t)); + if (mpi_rank.Dim()) vtufile.write((char *)&mpi_rank[0], mpi_rank.Dim() * sizeof(int32_t)); + } + { // block_size + block_size = connect.Dim() * sizeof(int32_t); + vtufile.write((char *)&block_size, sizeof(int32_t)); + if (connect.Dim()) vtufile.write((char *)&connect[0], connect.Dim() * sizeof(int32_t)); + } + { // offset + block_size = offset.Dim() * sizeof(int32_t); + vtufile.write((char *)&block_size, sizeof(int32_t)); + if (offset.Dim()) vtufile.write((char *)&offset[0], offset.Dim() * sizeof(int32_t)); + } + { // types + block_size = types.Dim() * sizeof(uint8_t); + vtufile.write((char *)&block_size, sizeof(int32_t)); + if (types.Dim()) vtufile.write((char *)&types[0], types.Dim() * sizeof(uint8_t)); + } + + vtufile << "\n"; + vtufile << " \n"; + // =========================================================================== + vtufile << "\n"; + } + vtufile.close(); // close file + } + if (!comm.Rank()) { // Write pvtu file + std::ofstream pvtufile; + { // Open file for writing + std::stringstream pvtufname; + pvtufname << fname << ".pvtu"; + pvtufile.open(pvtufname.str().c_str()); + if (pvtufile.fail()) return; + } + { // Write to file. + pvtufile << "\n"; + pvtufile << "\n"; + pvtufile << " \n"; + pvtufile << " \n"; + pvtufile << " \n"; + pvtufile << " \n"; + pvtufile << " \n"; + if (value_dof) { // value + pvtufile << " \n"; + } + { // mpi_rank + pvtufile << " \n"; + } + pvtufile << " \n"; + { + // Extract filename from path. + std::stringstream vtupath; + vtupath << '/' << fname; + std::string pathname = vtupath.str(); + std::string fname_ = pathname.substr(pathname.find_last_of("/\\") + 1); + // char *fname_ = (char*)strrchr(vtupath.str().c_str(), '/') + 1; + // std::string fname_ = + // boost::filesystem::path(fname).filename().string(). + for (sctl::Integer i = 0; i < comm.Size(); i++) pvtufile << " \n"; + } + pvtufile << " \n"; + pvtufile << "\n"; + } + pvtufile.close(); // close file + } + }; +}; + +template void WriteVTK(const char* fname, const sctl::Vector>& Svec, const sctl::Vector F, const sctl::Comm& comm) { + VTKData data; + typedef VTKData::VTKReal VTKReal; + auto& point_coord =data.point_coord ; + auto& point_value =data.point_value ; + auto& poly_connect=data.poly_connect; + auto& poly_offset =data.poly_offset ; + constexpr sctl::Integer COORD_DIM = VTKData::COORD_DIM; + + sctl::Long dof, offset = 0; + { // Set dof + sctl::Long Npt = 0; + for (const auto& S : Svec) Npt += S.NTor() * S.NPol(); + dof = F.Dim() / Npt; + SCTL_ASSERT(F.Dim() == dof * Npt); + } + for (auto& S: Svec) { // Set point_coord, point_value, poly_connect + sctl::Long Nt = S.NTor(); + sctl::Long Np = S.NPol(); + sctl::Long N = Nt * Np; + + for (sctl::Long i = 0; i < Nt; i++) { + for (sctl::Long j = 0; j < Np; j++) { + sctl::Long i0 = (i + 0) % Nt; + sctl::Long i1 = (i + 1) % Nt; + sctl::Long j0 = (j + 0) % Np; + sctl::Long j1 = (j + 1) % Np; + + poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i0+j0); + poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i1+j0); + poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i1+j1); + poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i0+j1); + poly_offset.push_back(poly_connect.size()); + } + } + + const auto X = S.Coord(); + SCTL_ASSERT(X.Dim() == COORD_DIM * N); + for (sctl::Long i = 0; i < N; i++){ // Set point_coord + for (sctl::Integer k = 0; k < COORD_DIM; k++) point_coord.push_back((VTKReal)X[k * N + i]); + } + + for (sctl::Long i = 0; i < N; i++){ // Set point_value + for (sctl::Long k = 0; k < dof; k++) point_value.push_back((VTKReal)F[dof * offset + k * N + i]); + } + offset += N; + } + data.WriteVTK(fname, comm); +} + +template void WriteVTK(const char* fname, const Surface& S, const sctl::Vector F, const sctl::Comm& comm) { + WriteVTK(fname, sctl::Vector>(1,sctl::Ptr2Itr>((Surface*)&S,1),false), F, comm); +} + +template void WriteVTK(const std::string& fname, const sctl::Integer NFP, bool half_period, const sctl::Long surf_Nt, const sctl::Long surf_Np, const sctl::Vector& X, const sctl::Long src_Nt, const sctl::Long src_Np, const sctl::Vector& F) { + sctl::Vector X_, F_; + sctl::Vector> Svec(1); + Svec[0] = biest::Surface(NFP*(half_period?2:1)*src_Nt, src_Np, biest::SurfType::None); + SurfaceOp::CompleteVecField(X_, true, half_period, NFP, surf_Nt, surf_Np, X, (half_period?sctl::const_pi()/(NFP*src_Nt*2):0)-(half_period?sctl::const_pi()/(NFP*surf_Nt*2):0)); + SurfaceOp::Resample(Svec[0].Coord(), NFP*(half_period?2:1)*src_Nt, src_Np, X_, NFP*(half_period?2:1)*surf_Nt, surf_Np); + + SurfaceOp::CompleteVecField(F_, false, half_period, NFP, src_Nt, src_Np, F); + biest::WriteVTK(fname.c_str(), Svec, F_); +} + +} + +#endif // BIEST_PARAVIEW_H_ \ No newline at end of file diff --git a/include/biest/singular_correction.hpp b/biest/singular_correction.hpp similarity index 99% rename from include/biest/singular_correction.hpp rename to biest/singular_correction.hpp index cb495e3..7035a9e 100644 --- a/include/biest/singular_correction.hpp +++ b/biest/singular_correction.hpp @@ -1,9 +1,9 @@ #ifndef _SINGULAR_CORRECTION_HPP_ #define _SINGULAR_CORRECTION_HPP_ -#include -#include -#include +#include "sctl/sctl.hpp" +#include "biest/kernel.hpp" +#include "biest/mat.hpp" namespace biest { diff --git a/include/biest/surface.txx b/biest/surface.cc similarity index 57% rename from include/biest/surface.txx rename to biest/surface.cc index 31e8bf2..f02fe79 100644 --- a/include/biest/surface.txx +++ b/biest/surface.cc @@ -1,5 +1,7 @@ -#include -#include +#include "biest/surface.hpp" + +#include "sctl/sctl.hpp" +#include "biest/surface_op.hpp" namespace biest { @@ -361,362 +363,4 @@ template Surface::Surface(sctl::Long Nt, sctl::Long Np, SurfT } } -struct VTKData { - typedef double VTKReal; - static constexpr sctl::Integer COORD_DIM = 3; - - std::vector point_coord; - std::vector point_value; - std::vector line_connect; - std::vector line_offset; - std::vector poly_connect; - std::vector poly_offset; - - void WriteVTK(const char* fname, const sctl::Comm& comm = sctl::Comm::Self()) { - sctl::Integer np = comm.Size(); - sctl::Integer myrank = comm.Rank(); - - std::vector& coord=this->point_coord; - std::vector& value=this->point_value; - std::vector& line_connect=this->line_connect; - std::vector& line_offset=this->line_offset; - std::vector& poly_connect=this->poly_connect; - std::vector& poly_offset=this->poly_offset; - - sctl::Long pt_cnt=coord.size()/COORD_DIM; - sctl::Long line_cnt=line_offset.size(); - sctl::Long poly_cnt=poly_offset.size(); - - // Open file for writing. - std::stringstream vtufname; - vtufname<\n"; - if(isLittleEndian) vtufile<<"\n"; - else vtufile<<"\n"; - //=========================================================================== - vtufile<<" \n"; - vtufile<<" \n"; - - //--------------------------------------------------------------------------- - vtufile<<" \n"; - vtufile<<" \n"; - data_size+=sizeof(uint32_t)+coord.size()*sizeof(VTKReal); - vtufile<<" \n"; - //--------------------------------------------------------------------------- - if(value.size()){ // value - vtufile<<" \n"; - vtufile<<" \n"; - data_size+=sizeof(uint32_t)+value.size()*sizeof(VTKReal); - vtufile<<" \n"; - } - //--------------------------------------------------------------------------- - vtufile<<" \n"; - vtufile<<" \n"; - data_size+=sizeof(uint32_t)+line_connect.size()*sizeof(int32_t); - vtufile<<" \n"; - data_size+=sizeof(uint32_t)+line_offset.size() *sizeof(int32_t); - vtufile<<" \n"; - //--------------------------------------------------------------------------- - vtufile<<" \n"; - vtufile<<" \n"; - data_size+=sizeof(uint32_t)+poly_connect.size()*sizeof(int32_t); - vtufile<<" \n"; - data_size+=sizeof(uint32_t)+poly_offset.size() *sizeof(int32_t); - vtufile<<" \n"; - //--------------------------------------------------------------------------- - - vtufile<<" \n"; - vtufile<<" \n"; - //=========================================================================== - vtufile<<" \n"; - vtufile<<" _"; - - int32_t block_size; - block_size=coord.size()*sizeof(VTKReal); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&coord [0], coord.size()*sizeof(VTKReal)); - if(value.size()){ // value - block_size=value.size()*sizeof(VTKReal); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&value [0], value.size()*sizeof(VTKReal)); - } - block_size=line_connect.size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&line_connect[0], line_connect.size()*sizeof(int32_t)); - block_size=line_offset .size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&line_offset [0], line_offset .size()*sizeof(int32_t)); - block_size=poly_connect.size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&poly_connect[0], poly_connect.size()*sizeof(int32_t)); - block_size=poly_offset .size()*sizeof(int32_t); vtufile.write((char*)&block_size, sizeof(int32_t)); vtufile.write((char*)&poly_offset [0], poly_offset .size()*sizeof(int32_t)); - - vtufile<<"\n"; - vtufile<<" \n"; - //=========================================================================== - vtufile<<"\n"; - vtufile.close(); - - - if(myrank) return; - std::stringstream pvtufname; - pvtufname<\n"; - pvtufile<<"\n"; - pvtufile<<" \n"; - pvtufile<<" \n"; - pvtufile<<" \n"; - pvtufile<<" \n"; - if(value.size()){ // value - pvtufile<<" \n"; - pvtufile<<" \n"; - pvtufile<<" \n"; - } - { - // Extract filename from path. - std::stringstream vtupath; - vtupath<<'/'<\n"; - } - pvtufile<<" \n"; - pvtufile<<"\n"; - pvtufile.close(); - } -}; -struct VTUData { - typedef float VTKReal; - - // Point data - sctl::Vector coord; // always 3D - sctl::Vector value; - - // Cell data - sctl::Vector connect; - sctl::Vector offset; - sctl::Vector types; - - void WriteVTK(const std::string& fname, const sctl::Comm& comm = sctl::Comm::Self()) const { - typedef typename VTUData::VTKReal VTKReal; - sctl::Long value_dof = 0; - { // Write vtu file. - std::ofstream vtufile; - { // Open file for writing. - std::stringstream vtufname; - vtufname << fname << std::setfill('0') << std::setw(6) << comm.Rank() << ".vtu"; - vtufile.open(vtufname.str().c_str()); - if (vtufile.fail()) return; - } - { // Write to file. - sctl::Long pt_cnt = coord.Dim() / 3; - sctl::Long cell_cnt = types.Dim(); - value_dof = (pt_cnt ? value.Dim() / pt_cnt : 0); - - sctl::Vector mpi_rank; - { // Set mpi_rank - sctl::Integer new_myrank = comm.Rank(); - mpi_rank.ReInit(pt_cnt); - for (sctl::Long i = 0; i < mpi_rank.Dim(); i++) mpi_rank[i] = new_myrank; - } - - bool isLittleEndian; - { // Set isLittleEndian - uint16_t number = 0x1; - uint8_t *numPtr = (uint8_t *)&number; - isLittleEndian = (numPtr[0] == 1); - } - - sctl::Long data_size = 0; - vtufile << "\n"; - vtufile << "\n"; - // =========================================================================== - vtufile << " \n"; - vtufile << " \n"; - //--------------------------------------------------------------------------- - vtufile << " \n"; - vtufile << " \n"; - data_size += sizeof(uint32_t) + coord.Dim() * sizeof(VTKReal); - vtufile << " \n"; - //--------------------------------------------------------------------------- - vtufile << " \n"; - if (value_dof) { // value - vtufile << " \n"; - data_size += sizeof(uint32_t) + value.Dim() * sizeof(VTKReal); - } - { // mpi_rank - vtufile << " \n"; - data_size += sizeof(uint32_t) + pt_cnt * sizeof(int32_t); - } - vtufile << " \n"; - //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- - vtufile << " \n"; - vtufile << " \n"; - data_size += sizeof(uint32_t) + connect.Dim() * sizeof(int32_t); - vtufile << " \n"; - data_size += sizeof(uint32_t) + offset.Dim() * sizeof(int32_t); - vtufile << " \n"; - data_size += sizeof(uint32_t) + types.Dim() * sizeof(uint8_t); - vtufile << " \n"; - //--------------------------------------------------------------------------- - vtufile << " \n"; - vtufile << " \n"; - // =========================================================================== - vtufile << " \n"; - vtufile << " _"; - - int32_t block_size; - { // coord - block_size = coord.Dim() * sizeof(VTKReal); - vtufile.write((char *)&block_size, sizeof(int32_t)); - if (coord.Dim()) vtufile.write((char *)&coord[0], coord.Dim() * sizeof(VTKReal)); - } - if (value_dof) { // value - block_size = value.Dim() * sizeof(VTKReal); - vtufile.write((char *)&block_size, sizeof(int32_t)); - if (value.Dim()) vtufile.write((char *)&value[0], value.Dim() * sizeof(VTKReal)); - } - { // mpi_rank - block_size = mpi_rank.Dim() * sizeof(int32_t); - vtufile.write((char *)&block_size, sizeof(int32_t)); - if (mpi_rank.Dim()) vtufile.write((char *)&mpi_rank[0], mpi_rank.Dim() * sizeof(int32_t)); - } - { // block_size - block_size = connect.Dim() * sizeof(int32_t); - vtufile.write((char *)&block_size, sizeof(int32_t)); - if (connect.Dim()) vtufile.write((char *)&connect[0], connect.Dim() * sizeof(int32_t)); - } - { // offset - block_size = offset.Dim() * sizeof(int32_t); - vtufile.write((char *)&block_size, sizeof(int32_t)); - if (offset.Dim()) vtufile.write((char *)&offset[0], offset.Dim() * sizeof(int32_t)); - } - { // types - block_size = types.Dim() * sizeof(uint8_t); - vtufile.write((char *)&block_size, sizeof(int32_t)); - if (types.Dim()) vtufile.write((char *)&types[0], types.Dim() * sizeof(uint8_t)); - } - - vtufile << "\n"; - vtufile << " \n"; - // =========================================================================== - vtufile << "\n"; - } - vtufile.close(); // close file - } - if (!comm.Rank()) { // Write pvtu file - std::ofstream pvtufile; - { // Open file for writing - std::stringstream pvtufname; - pvtufname << fname << ".pvtu"; - pvtufile.open(pvtufname.str().c_str()); - if (pvtufile.fail()) return; - } - { // Write to file. - pvtufile << "\n"; - pvtufile << "\n"; - pvtufile << " \n"; - pvtufile << " \n"; - pvtufile << " \n"; - pvtufile << " \n"; - pvtufile << " \n"; - if (value_dof) { // value - pvtufile << " \n"; - } - { // mpi_rank - pvtufile << " \n"; - } - pvtufile << " \n"; - { - // Extract filename from path. - std::stringstream vtupath; - vtupath << '/' << fname; - std::string pathname = vtupath.str(); - std::string fname_ = pathname.substr(pathname.find_last_of("/\\") + 1); - // char *fname_ = (char*)strrchr(vtupath.str().c_str(), '/') + 1; - // std::string fname_ = - // boost::filesystem::path(fname).filename().string(). - for (sctl::Integer i = 0; i < comm.Size(); i++) pvtufile << " \n"; - } - pvtufile << " \n"; - pvtufile << "\n"; - } - pvtufile.close(); // close file - } - }; -}; - -template void WriteVTK(const char* fname, const sctl::Vector>& Svec, const sctl::Vector F, const sctl::Comm& comm) { - VTKData data; - typedef VTKData::VTKReal VTKReal; - auto& point_coord =data.point_coord ; - auto& point_value =data.point_value ; - auto& poly_connect=data.poly_connect; - auto& poly_offset =data.poly_offset ; - constexpr sctl::Integer COORD_DIM = VTKData::COORD_DIM; - - sctl::Long dof, offset = 0; - { // Set dof - sctl::Long Npt = 0; - for (const auto& S : Svec) Npt += S.NTor() * S.NPol(); - dof = F.Dim() / Npt; - SCTL_ASSERT(F.Dim() == dof * Npt); - } - for (auto& S: Svec) { // Set point_coord, point_value, poly_connect - sctl::Long Nt = S.NTor(); - sctl::Long Np = S.NPol(); - sctl::Long N = Nt * Np; - - for (sctl::Long i = 0; i < Nt; i++) { - for (sctl::Long j = 0; j < Np; j++) { - sctl::Long i0 = (i + 0) % Nt; - sctl::Long i1 = (i + 1) % Nt; - sctl::Long j0 = (j + 0) % Np; - sctl::Long j1 = (j + 1) % Np; - - poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i0+j0); - poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i1+j0); - poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i1+j1); - poly_connect.push_back(point_coord.size() / COORD_DIM + Np*i0+j1); - poly_offset.push_back(poly_connect.size()); - } - } - - const auto X = S.Coord(); - SCTL_ASSERT(X.Dim() == COORD_DIM * N); - for (sctl::Long i = 0; i < N; i++){ // Set point_coord - for (sctl::Integer k = 0; k < COORD_DIM; k++) point_coord.push_back((VTKReal)X[k * N + i]); - } - - for (sctl::Long i = 0; i < N; i++){ // Set point_value - for (sctl::Long k = 0; k < dof; k++) point_value.push_back((VTKReal)F[dof * offset + k * N + i]); - } - offset += N; - } - data.WriteVTK(fname, comm); -} - -template void WriteVTK(const char* fname, const Surface& S, const sctl::Vector F, const sctl::Comm& comm) { - WriteVTK(fname, sctl::Vector>(1,sctl::Ptr2Itr>((Surface*)&S,1),false), F, comm); -} - -template void WriteVTK(const std::string& fname, const sctl::Integer NFP, bool half_period, const sctl::Long surf_Nt, const sctl::Long surf_Np, const sctl::Vector& X, const sctl::Long src_Nt, const sctl::Long src_Np, const sctl::Vector& F) { - sctl::Vector X_, F_; - sctl::Vector> Svec(1); - Svec[0] = biest::Surface(NFP*(half_period?2:1)*src_Nt, src_Np, biest::SurfType::None); - SurfaceOp::CompleteVecField(X_, true, half_period, NFP, surf_Nt, surf_Np, X, (half_period?sctl::const_pi()/(NFP*src_Nt*2):0)-(half_period?sctl::const_pi()/(NFP*surf_Nt*2):0)); - SurfaceOp::Resample(Svec[0].Coord(), NFP*(half_period?2:1)*src_Nt, src_Np, X_, NFP*(half_period?2:1)*surf_Nt, surf_Np); - - SurfaceOp::CompleteVecField(F_, false, half_period, NFP, src_Nt, src_Np, F); - biest::WriteVTK(fname.c_str(), Svec, F_); -} - } diff --git a/include/biest/surface.hpp b/biest/surface.hpp similarity index 98% rename from include/biest/surface.hpp rename to biest/surface.hpp index 40cf092..f4a3955 100644 --- a/include/biest/surface.hpp +++ b/biest/surface.hpp @@ -1,7 +1,7 @@ #ifndef _SURFACE_HPP_ #define _SURFACE_HPP_ -#include +#include "sctl/sctl.hpp" namespace biest { @@ -89,6 +89,4 @@ template void WriteVTK(const std::string& fname, const sctl::Intege } -#include - #endif //_SURFACE_HPP_ diff --git a/include/biest/surface_op.txx b/biest/surface_op.cc similarity index 99% rename from include/biest/surface_op.txx rename to biest/surface_op.cc index 16076a2..9a74578 100644 --- a/include/biest/surface_op.txx +++ b/biest/surface_op.cc @@ -1,6 +1,11 @@ -#include +#include "biest/surface_op.hpp" + #include +#include "sctl/sctl.hpp" +#include "biest/surface.hpp" +#include "biest/singular_correction.hpp" + namespace biest { template SurfaceOp::SurfaceOp(const sctl::Comm& comm, sctl::Long Nt, sctl::Long Np) { diff --git a/include/biest/surface_op.hpp b/biest/surface_op.hpp similarity index 99% rename from include/biest/surface_op.hpp rename to biest/surface_op.hpp index ee0396f..fe9fa14 100644 --- a/include/biest/surface_op.hpp +++ b/biest/surface_op.hpp @@ -1,9 +1,9 @@ #ifndef _SURFACE_OP_HPP_ #define _SURFACE_OP_HPP_ -#include -#include -#include +#include "sctl/sctl.hpp" +#include "biest/surface.hpp" +#include "biest/singular_correction.hpp" namespace biest { @@ -350,6 +350,4 @@ template class SurfaceOp { } -#include - #endif //_SURFACE_OP_HPP_ diff --git a/include/biest/vacuum-field.txx b/biest/vacuum-field.cc similarity index 98% rename from include/biest/vacuum-field.txx rename to biest/vacuum-field.cc index 8e6616b..7a05cd1 100644 --- a/include/biest/vacuum-field.txx +++ b/biest/vacuum-field.cc @@ -1,4 +1,11 @@ -#include +#include "biest/vacuum-field.hpp" + +#include "sctl/sctl.hpp" +#include "biest/boundary_integ_op.hpp" +#include "biest/surface.hpp" +#include "biest/surface_op.hpp" + +#include "biest/paraview.hpp" namespace biest { diff --git a/include/biest/vacuum-field.hpp b/biest/vacuum-field.hpp similarity index 98% rename from include/biest/vacuum-field.hpp rename to biest/vacuum-field.hpp index 8f46d58..dd07f1c 100644 --- a/include/biest/vacuum-field.hpp +++ b/biest/vacuum-field.hpp @@ -1,9 +1,9 @@ #ifndef _VACUUM_FIELD_HPP_ #define _VACUUM_FIELD_HPP_ -#include -#include -#include +#include "sctl/sctl.hpp" +#include "biest/boundary_integ_op.hpp" +#include "biest/surface.hpp" namespace biest { @@ -207,6 +207,4 @@ namespace biest { } -#include - #endif //_VACUUM_FIELD_HPP_ diff --git a/geom/BUILD.bazel b/geom/BUILD.bazel new file mode 100644 index 0000000..fd65279 --- /dev/null +++ b/geom/BUILD.bazel @@ -0,0 +1,37 @@ +filegroup( + name = "lhd", + visibility = ["//visibility:public"], + srcs = [ + "LHD-X.mat", + "LHD-Y.mat", + "LHD-Z.mat", + ], +) + +filegroup( + name = "ncsx", + visibility = ["//visibility:public"], + srcs = [ + "NCSX", + ], +) + +filegroup( + name = "quas3", + visibility = ["//visibility:public"], + srcs = [ + "Quas3-X.mat", + "Quas3-Y.mat", + "Quas3-Z.mat", + ], +) + +filegroup( + name = "w7x", + visibility = ["//visibility:public"], + srcs = [ + "W7X-X.mat", + "W7X-Y.mat", + "W7X-Z.mat", + ], +) diff --git a/include/sctl.hpp b/include/sctl.hpp deleted file mode 100644 index e4cfa14..0000000 --- a/include/sctl.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// Scientific Computing Template Library - -#ifndef _SCTL_HPP_ -#define _SCTL_HPP_ - -#include - -// Import PVFMM preprocessor macro definitions -#ifdef SCTL_HAVE_PVFMM -#ifndef SCTL_HAVE_MPI -#define SCTL_HAVE_MPI -#endif -#include "pvfmm_config.h" -#if defined(PVFMM_QUAD_T) && !defined(SCTL_QUAD_T) -#define SCTL_QUAD_T PVFMM_QUAD_T -#endif -#endif - -// Math utilities -#include SCTL_INCLUDE(math_utils.hpp) - -// FMM wrapper -#include SCTL_INCLUDE(fmm-wrapper.hpp) - -// Boundary Integrals -#include SCTL_INCLUDE(boundary_integral.hpp) -#include SCTL_INCLUDE(slender_element.hpp) -#include SCTL_INCLUDE(quadrule.hpp) -#include SCTL_INCLUDE(lagrange-interp.hpp) - -// ODE solver -#include SCTL_INCLUDE(ode-solver.hpp) - -// Tensor -#include SCTL_INCLUDE(tensor.hpp) - -// Tree -#include SCTL_INCLUDE(tree.hpp) -#include SCTL_INCLUDE(vtudata.hpp) - -// MPI Wrapper -#include SCTL_INCLUDE(comm.hpp) - -// Memory Manager, Iterators -#include SCTL_INCLUDE(mem_mgr.hpp) - -// Vector -#include SCTL_INCLUDE(vector.hpp) - -// Matrix, Permutation operators -#include SCTL_INCLUDE(matrix.hpp) - -// Template vector intrinsics (new) -#include SCTL_INCLUDE(vec.hpp) -#include SCTL_INCLUDE(vec-test.hpp) - -// OpenMP merge-sort and scan -#include SCTL_INCLUDE(ompUtils.hpp) - -// Parallel solver -#include SCTL_INCLUDE(parallel_solver.hpp) - -// Chebyshev basis -#include SCTL_INCLUDE(cheb_utils.hpp) - -// Morton -#include SCTL_INCLUDE(morton.hpp) - -// Spherical Harmonics -#include SCTL_INCLUDE(sph_harm.hpp) - -#include SCTL_INCLUDE(fft_wrapper.hpp) - -#include SCTL_INCLUDE(legendre_rule.hpp) - -// Profiler -#include SCTL_INCLUDE(profile.hpp) - -// Print stack trace -#include SCTL_INCLUDE(stacktrace.h) -const int sgh = SCTL_NAMESPACE::SetSigHandler(); // Set signal handler - -// Boundary quadrature, Kernel functions -#include SCTL_INCLUDE(kernel_functions.hpp) -#include SCTL_INCLUDE(boundary_quadrature.hpp) - -#endif //_SCTL_HPP_ diff --git a/sctl/BUILD.bazel b/sctl/BUILD.bazel new file mode 100644 index 0000000..ba19206 --- /dev/null +++ b/sctl/BUILD.bazel @@ -0,0 +1,72 @@ +cc_library( + name = "sctl", + hdrs = [ + "sctl.hpp", + "blas.h", + "boundary_quadrature.hpp", + "cheb_utils.hpp", + "common.hpp", + "fft_wrapper.hpp", + "intrin-wrapper.hpp", + "kernel_functions.hpp", + "lapack.h", + "legendre_rule.hpp", + "morton.hpp", + "parallel_solver.hpp", + "quadrule.hpp", + "sse2neon.h", + "stacktrace.h", + "tensor.hpp", + "vec.hpp", + "vec-test.hpp", + # + "boundary_integral.hpp", + "comm.hpp", + "fmm-wrapper.hpp", + "lagrange-interp.hpp", + "matrix.hpp", + "mat_utils.hpp", + "math_utils.hpp", + "mem_mgr.hpp", + "ode-solver.hpp", + "ompUtils.hpp", + "profile.hpp", + "slender_element.hpp", + "sph_harm.hpp", + "tree.hpp", + "vector.hpp", + "vtudata.hpp", + ], + srcs = [ + "boundary_integral.cc", + "comm.cc", + "fmm-wrapper.cc", + "lagrange-interp.cc", + "matrix.cc", + "mat_utils.cc", + "math_utils.cc", + "mem_mgr.cc", + "ode-solver.cc", + "ompUtils.cc", + "profile.cc", + "slender_element.cc", + "sph_harm.cc", + "tree.cc", + "vector.cc", + "vtudata.cc", + ], + visibility = ["//visibility:public"], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) diff --git a/include/sctl/blas.h b/sctl/blas.h similarity index 100% rename from include/sctl/blas.h rename to sctl/blas.h diff --git a/include/sctl/boundary_integral.txx b/sctl/boundary_integral.cc similarity index 99% rename from include/sctl/boundary_integral.txx rename to sctl/boundary_integral.cc index 1fcda43..62bf58b 100644 --- a/include/sctl/boundary_integral.txx +++ b/sctl/boundary_integral.cc @@ -1,16 +1,19 @@ -#include SCTL_INCLUDE(kernel_functions.hpp) -#include SCTL_INCLUDE(matrix.hpp) -#include SCTL_INCLUDE(ompUtils.hpp) -#include SCTL_INCLUDE(morton.hpp) -#include SCTL_INCLUDE(profile.hpp) -#include SCTL_INCLUDE(vector.hpp) -#include SCTL_INCLUDE(comm.hpp) -#include SCTL_INCLUDE(common.hpp) +#include "sctl/boundary_integral.hpp" +#include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/kernel_functions.hpp" +#include "sctl/matrix.hpp" +#include "sctl/ompUtils.hpp" +#include "sctl/morton.hpp" +#include "sctl/profile.hpp" +#include "sctl/vector.hpp" +#include "sctl/comm.hpp" +#include "sctl/common.hpp" + +namespace sctl { template static void concat_vecs(Vector& v, const Vector>& vec_lst) { const Long N = vec_lst.Dim(); diff --git a/include/sctl/boundary_integral.hpp b/sctl/boundary_integral.hpp similarity index 98% rename from include/sctl/boundary_integral.hpp rename to sctl/boundary_integral.hpp index 2668585..acd0e9a 100644 --- a/include/sctl/boundary_integral.hpp +++ b/sctl/boundary_integral.hpp @@ -1,15 +1,15 @@ #ifndef _SCTL_BOUNDARY_INTEGRAL_HPP_ #define _SCTL_BOUNDARY_INTEGRAL_HPP_ -#include -#include SCTL_INCLUDE(comm.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) -#include SCTL_INCLUDE(vector.hpp) - #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/comm.hpp" +#include "sctl/mem_mgr.hpp" +#include "sctl/vector.hpp" + +namespace sctl { template class Matrix; template class ParticleFMM; @@ -278,6 +278,4 @@ namespace SCTL_NAMESPACE { } -#include SCTL_INCLUDE(boundary_integral.txx) - #endif //_SCTL_BOUNDARY_INTEGRAL_HPP_ diff --git a/include/sctl/boundary_quadrature.hpp b/sctl/boundary_quadrature.hpp similarity index 99% rename from include/sctl/boundary_quadrature.hpp rename to sctl/boundary_quadrature.hpp index de06900..34748ab 100644 --- a/include/sctl/boundary_quadrature.hpp +++ b/sctl/boundary_quadrature.hpp @@ -1,20 +1,20 @@ #ifndef _SCTL_BOUNDARY_QUADRATURE_HPP_ #define _SCTL_BOUNDARY_QUADRATURE_HPP_ -#include -#include SCTL_INCLUDE(kernel_functions.hpp) -#include SCTL_INCLUDE(tree.hpp) -#include SCTL_INCLUDE(cheb_utils.hpp) -#include SCTL_INCLUDE(fmm-wrapper.hpp) -#include SCTL_INCLUDE(tensor.hpp) -#include SCTL_INCLUDE(profile.hpp) - #include #include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/kernel_functions.hpp" +#include "sctl/tree.hpp" +#include "sctl/cheb_utils.hpp" +#include "sctl/fmm-wrapper.hpp" +#include "sctl/tensor.hpp" +#include "sctl/profile.hpp" + +namespace sctl { template class Basis { public: diff --git a/include/sctl/cheb_utils.hpp b/sctl/cheb_utils.hpp similarity index 99% rename from include/sctl/cheb_utils.hpp rename to sctl/cheb_utils.hpp index 517cfa6..d9747f5 100644 --- a/include/sctl/cheb_utils.hpp +++ b/sctl/cheb_utils.hpp @@ -1,16 +1,16 @@ #ifndef _SCTL_CHEB_UTILS_HPP_ #define _SCTL_CHEB_UTILS_HPP_ -#include -#include SCTL_INCLUDE(matrix.hpp) -#include SCTL_INCLUDE(math_utils.hpp) -#include SCTL_INCLUDE(legendre_rule.hpp) - #include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/matrix.hpp" +#include "sctl/math_utils.hpp" +#include "sctl/legendre_rule.hpp" + +namespace sctl { template class BasisInterface { diff --git a/include/sctl/comm.txx b/sctl/comm.cc similarity index 99% rename from include/sctl/comm.txx rename to sctl/comm.cc index a61703b..8774564 100644 --- a/include/sctl/comm.txx +++ b/sctl/comm.cc @@ -1,8 +1,13 @@ +#include "sctl/comm.hpp" + +#include #include -#include SCTL_INCLUDE(ompUtils.hpp) -#include SCTL_INCLUDE(vector.hpp) -namespace SCTL_NAMESPACE { +#include "sctl/mem_mgr.hpp" +#include "sctl/ompUtils.hpp" +#include "sctl/vector.hpp" + +namespace sctl { inline Comm::Comm() { #ifdef SCTL_HAVE_MPI diff --git a/include/sctl/comm.hpp b/sctl/comm.hpp similarity index 98% rename from include/sctl/comm.hpp rename to sctl/comm.hpp index 91810d6..98a37a8 100644 --- a/include/sctl/comm.hpp +++ b/sctl/comm.hpp @@ -1,10 +1,9 @@ #ifndef _SCTL_COMM_HPP_ #define _SCTL_COMM_HPP_ -#include - #include #include + #ifdef SCTL_HAVE_MPI #include #endif @@ -12,7 +11,9 @@ #include #endif -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" + +namespace sctl { template class Vector; @@ -229,6 +230,4 @@ class Comm { } // end namespace -#include SCTL_INCLUDE(comm.txx) - #endif //_SCTL_COMM_HPP_ diff --git a/include/sctl/common.hpp b/sctl/common.hpp similarity index 90% rename from include/sctl/common.hpp rename to sctl/common.hpp index d9289b2..6eab45f 100644 --- a/include/sctl/common.hpp +++ b/sctl/common.hpp @@ -1,12 +1,14 @@ #ifndef _SCTL_COMMON_HPP_ #define _SCTL_COMMON_HPP_ -#ifndef SCTL_NAMESPACE -#define SCTL_NAMESPACE sctl -#endif -#define SCTL_QUOTEME(x) SCTL_QUOTEME_1(x) -#define SCTL_QUOTEME_1(x) #x -#define SCTL_INCLUDE(x) SCTL_QUOTEME(SCTL_NAMESPACE/x) +// fall-back to double if ValueType is not defined +#ifdef SCTL_DOUBLE +using ValueType = double; +#elif defined SCTL_FLOAT +using ValueType = float; +#else +#error "Must define either SCTL_DOUBLE or SCTL_FLOAT." +#endif // ValueType // Profiling parameters #ifndef SCTL_PROFILE @@ -38,7 +40,7 @@ #include #include -namespace SCTL_NAMESPACE { +namespace sctl { typedef long Integer; // bounded numbers < 32k typedef int64_t Long; // problem size } @@ -71,7 +73,7 @@ typedef int64_t Long; // problem size #define SCTL_UNUSED(x) (void)(x) // to ignore unused variable warning. -namespace SCTL_NAMESPACE { +namespace sctl { #ifdef SCTL_MEMDEBUG template class ConstIterator; template class Iterator; diff --git a/include/sctl/fft_wrapper.hpp b/sctl/fft_wrapper.hpp similarity index 99% rename from include/sctl/fft_wrapper.hpp rename to sctl/fft_wrapper.hpp index b92a5ef..0b25c53 100644 --- a/include/sctl/fft_wrapper.hpp +++ b/sctl/fft_wrapper.hpp @@ -5,6 +5,7 @@ #include #include #include + #if defined(SCTL_HAVE_FFTW) || defined(SCTL_HAVE_FFTWF) #include #ifdef SCTL_FFTW3_MKL @@ -12,15 +13,15 @@ #endif #endif -#include -#include SCTL_INCLUDE(matrix.hpp) -#include SCTL_INCLUDE(math_utils.hpp) +#include "sctl/common.hpp" +#include "sctl/matrix.hpp" +#include "sctl/math_utils.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { template class Complex { public: - Complex(ValueType r=0, ValueType i=0) : real(r), imag(i) {} + Complex(ValueType r=0, ValueType i=0) : real(r), imag(i) {} Complex operator-() const { Complex z; diff --git a/include/sctl/fmm-wrapper.txx b/sctl/fmm-wrapper.cc similarity index 99% rename from include/sctl/fmm-wrapper.txx rename to sctl/fmm-wrapper.cc index 98e01c0..14ab40c 100644 --- a/include/sctl/fmm-wrapper.txx +++ b/sctl/fmm-wrapper.cc @@ -1,12 +1,15 @@ -#include SCTL_INCLUDE(kernel_functions.hpp) -#include SCTL_INCLUDE(vector.hpp) -#include SCTL_INCLUDE(matrix.hpp) +#include "sctl/fmm-wrapper.hpp" #ifdef SCTL_HAVE_PVFMM #include #endif -namespace SCTL_NAMESPACE { +#include "sctl/profile.hpp" +#include "sctl/kernel_functions.hpp" +#include "sctl/vector.hpp" +#include "sctl/matrix.hpp" + +namespace sctl { template void ParticleFMM::test(const Comm& comm) { if (DIM != 3) return ParticleFMM::test(comm); diff --git a/include/sctl/fmm-wrapper.hpp b/sctl/fmm-wrapper.hpp similarity index 97% rename from include/sctl/fmm-wrapper.hpp rename to sctl/fmm-wrapper.hpp index 8d7e3d8..75793ce 100644 --- a/include/sctl/fmm-wrapper.hpp +++ b/sctl/fmm-wrapper.hpp @@ -1,13 +1,13 @@ #ifndef _SCTL_FMM_WRAPPER_HPP_ #define _SCTL_FMM_WRAPPER_HPP_ -#include -#include SCTL_INCLUDE(comm.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) - #include #include +#include "sctl/common.hpp" +#include "sctl/comm.hpp" +#include "sctl/mem_mgr.hpp" + #ifdef SCTL_HAVE_PVFMM namespace pvfmm { template struct Kernel; @@ -21,7 +21,7 @@ namespace pvfmm { } #endif -namespace SCTL_NAMESPACE { +namespace sctl { template class Vector; @@ -158,6 +158,4 @@ template class ParticleFMM { } // end namespace -#include SCTL_INCLUDE(fmm-wrapper.txx) - #endif //_SCTL_FMM_WRAPPER_HPP_ diff --git a/include/sctl/intrin-wrapper.hpp b/sctl/intrin-wrapper.hpp similarity index 99% rename from include/sctl/intrin-wrapper.hpp rename to sctl/intrin-wrapper.hpp index f97a51d..5d4fff3 100644 --- a/include/sctl/intrin-wrapper.hpp +++ b/sctl/intrin-wrapper.hpp @@ -1,11 +1,10 @@ #ifndef _SCTL_INTRIN_WRAPPER_HPP_ #define _SCTL_INTRIN_WRAPPER_HPP_ -#include -#include SCTL_INCLUDE(math_utils.hpp) +#include #if defined(__ARM_NEON) -# include SCTL_INCLUDE(sse2neon.h) +# include "sctl/sse2neon.h" # define __SSE__ # define __SSE2__ # define __SSE3__ @@ -20,11 +19,13 @@ # endif #endif +#include "sctl/common.hpp" +#include "sctl/math_utils.hpp" + // TODO: Check alignment when SCTL_MEMDEBUG is defined // TODO: Replace pointers with iterators - -namespace SCTL_NAMESPACE { // Traits +namespace sctl { // Traits enum class DataType { Integer, @@ -103,7 +104,7 @@ namespace SCTL_NAMESPACE { // Traits #endif } -namespace SCTL_NAMESPACE { // Generic +namespace sctl { // Generic template struct alignas(sizeof(ValueType)*N>SCTL_ALIGN_BYTES?SCTL_ALIGN_BYTES:sizeof(ValueType)*N) VecData { using ScalarType = ValueType; @@ -781,7 +782,7 @@ namespace SCTL_NAMESPACE { // Generic } } -namespace SCTL_NAMESPACE { // SSE +namespace sctl { // SSE #ifdef __SSE4_2__ template <> struct alignas(sizeof(int8_t) * 16) VecData { using ScalarType = int8_t; @@ -1491,7 +1492,7 @@ namespace SCTL_NAMESPACE { // SSE #endif } -namespace SCTL_NAMESPACE { // AVX +namespace sctl { // AVX #ifdef __AVX__ template <> struct alignas(sizeof(int8_t) * 32) VecData { using ScalarType = int8_t; @@ -2207,7 +2208,7 @@ namespace SCTL_NAMESPACE { // AVX #endif } -namespace SCTL_NAMESPACE { // AVX512 +namespace sctl { // AVX512 #if defined(__AVX512F__) template <> struct alignas(sizeof(int8_t) * 64) VecData { using ScalarType = int8_t; diff --git a/include/sctl/kernel_functions.hpp b/sctl/kernel_functions.hpp similarity index 99% rename from include/sctl/kernel_functions.hpp rename to sctl/kernel_functions.hpp index 745bebf..b1da680 100644 --- a/include/sctl/kernel_functions.hpp +++ b/sctl/kernel_functions.hpp @@ -1,11 +1,11 @@ #ifndef _SCTL_KERNEL_FUNCTIONS_HPP_ #define _SCTL_KERNEL_FUNCTIONS_HPP_ -#include -#include SCTL_INCLUDE(vec.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) +#include "sctl/common.hpp" +#include "sctl/vec.hpp" +#include "sctl/mem_mgr.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { template class Matrix; template class Vector; diff --git a/include/sctl/lagrange-interp.txx b/sctl/lagrange-interp.cc similarity index 96% rename from include/sctl/lagrange-interp.txx rename to sctl/lagrange-interp.cc index 603da19..7da4768 100644 --- a/include/sctl/lagrange-interp.txx +++ b/sctl/lagrange-interp.cc @@ -1,6 +1,10 @@ -#include SCTL_INCLUDE(vector.hpp) +#include "sctl/lagrange-interp.hpp" -namespace SCTL_NAMESPACE { +#include "sctl/vec.hpp" +#include "sctl/vector.hpp" +#include "sctl/matrix.hpp" + +namespace sctl { template void LagrangeInterp::Interpolate(Vector& wts, const Vector& src_nds, const Vector& trg_nds) { static constexpr Integer VecLen = DefaultVecLen(); diff --git a/include/sctl/lagrange-interp.hpp b/sctl/lagrange-interp.hpp similarity index 82% rename from include/sctl/lagrange-interp.hpp rename to sctl/lagrange-interp.hpp index b733a0b..ed67647 100644 --- a/include/sctl/lagrange-interp.hpp +++ b/sctl/lagrange-interp.hpp @@ -1,9 +1,9 @@ #ifndef _SCTL_LAGRANGE_INTERP_HPP_ #define _SCTL_LAGRANGE_INTERP_HPP_ -#include +#include "sctl/common.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { template class Vector; @@ -18,6 +18,4 @@ namespace SCTL_NAMESPACE { } -#include SCTL_INCLUDE(lagrange-interp.txx) - #endif //_SCTL_LAGRANGE_INTERP_HPP_ diff --git a/include/sctl/lapack.h b/sctl/lapack.h similarity index 100% rename from include/sctl/lapack.h rename to sctl/lapack.h diff --git a/include/sctl/legendre_rule.hpp b/sctl/legendre_rule.hpp similarity index 99% rename from include/sctl/legendre_rule.hpp rename to sctl/legendre_rule.hpp index 3713e84..b4f13d8 100644 --- a/include/sctl/legendre_rule.hpp +++ b/sctl/legendre_rule.hpp @@ -10,7 +10,7 @@ # include # include -namespace SCTL_NAMESPACE { +namespace sctl { void cdgqf(int nt, int kind, double alpha, double beta, double t[], double wts[]); void cgqf(int nt, int kind, double alpha, double beta, double a, double b, double t[], double wts[]); diff --git a/include/sctl/mat_utils.txx b/sctl/mat_utils.cc similarity index 98% rename from include/sctl/mat_utils.txx rename to sctl/mat_utils.cc index b694606..9f6ad62 100644 --- a/include/sctl/mat_utils.txx +++ b/sctl/mat_utils.cc @@ -1,27 +1,30 @@ -#include SCTL_INCLUDE(matrix.hpp) -#include SCTL_INCLUDE(math_utils.hpp) +#include "sctl/mat_utils.hpp" + +#include +#include +#include +#include +#include +#include +#include #if defined(SCTL_HAVE_CUDA) #include #include #endif +#include "sctl/matrix.hpp" +#include "sctl/math_utils.hpp" + #if defined(SCTL_HAVE_BLAS) -#include SCTL_INCLUDE(blas.h) +#include "sctl/blas.h" #endif #if defined(SCTL_HAVE_LAPACK) -#include SCTL_INCLUDE(lapack.h) +#include "sctl/lapack.h" #endif -#include -#include -#include -#include -#include -#include -#include -namespace SCTL_NAMESPACE { +namespace sctl { namespace mat { template inline void gemm(char TransA, char TransB, int M, int N, int K, ValueType alpha, Iterator A, int lda, Iterator B, int ldb, ValueType beta, Iterator C, int ldc) { @@ -531,4 +534,4 @@ template inline void pinv(Iterator M, int n1, int n } } // end namespace mat -} // end namespace SCTL_NAMESPACE +} // end namespace sctl diff --git a/include/sctl/mat_utils.hpp b/sctl/mat_utils.hpp similarity index 89% rename from include/sctl/mat_utils.hpp rename to sctl/mat_utils.hpp index cd64cd8..dd81197 100644 --- a/include/sctl/mat_utils.hpp +++ b/sctl/mat_utils.hpp @@ -1,9 +1,9 @@ #ifndef _SCTL_MAT_UTILS_ #define _SCTL_MAT_UTILS_ -#include +#include "sctl/common.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { namespace mat { template void gemm(char TransA, char TransB, int M, int N, int K, ValueType alpha, Iterator A, int lda, Iterator B, int ldb, ValueType beta, Iterator C, int ldc); @@ -19,8 +19,6 @@ template void svd(char *JOBU, char *JOBVT, int *M, int *N, Ite template void pinv(Iterator M, int n1, int n2, ValueType eps, Iterator M_); } // end namespace mat -} // end namespace SCTL_NAMESPACE - -#include SCTL_INCLUDE(mat_utils.txx) +} // end namespace sctl #endif //_SCTL_MAT_UTILS_ diff --git a/include/sctl/math_utils.txx b/sctl/math_utils.cc similarity index 87% rename from include/sctl/math_utils.txx rename to sctl/math_utils.cc index d8e3f9f..8ad801f 100644 --- a/include/sctl/math_utils.txx +++ b/sctl/math_utils.cc @@ -6,25 +6,9 @@ #include #include -namespace SCTL_NAMESPACE { +#include "sctl/math_utils.hpp" -template struct GetSigBits { - static constexpr Integer value() { - return ((Real)(pow((Real)0.5)+1) == (Real)1 ? GetSigBits::value() : bits); - } -}; -template struct GetSigBits { - static constexpr Integer value() { - return 0; - } -}; -template inline constexpr Integer significant_bits() { - return GetSigBits::value(); -} - -template inline constexpr Real machine_eps() { - return pow<-GetSigBits::value()-1,Real>(2); -} +namespace sctl { template inline Real atoreal(const char* str) { // Warning: does not do correct rounding const auto get_num = [](const char* str, int& end) { @@ -257,25 +241,6 @@ template static inline Real pow_generic(const Real b, const Real e) } return exp(log(b) * e); } -template static inline constexpr ValueType pow_integer_exp(ValueType b, Long e) { - return (e > 0) ? ((e & 1) ? b : ValueType(1)) * pow_integer_exp(b*b, e>>1) : ValueType(1); -} -template class pow_wrapper { - public: - static Real pow(Real b, ExpType e) { - return (Real)std::pow(b, e); - } -}; -template class pow_wrapper { - public: - static constexpr ValueType pow(ValueType b, Long e) { - return (e > 0) ? pow_integer_exp(b, e) : 1/pow_integer_exp(b, -e); - } -}; - -template inline constexpr ValueType pow(ValueType b) { - return (e > 0) ? pow_integer_exp(b, e) : 1/pow_integer_exp(b, -e); -} template inline std::ostream& ostream_insertion_generic(std::ostream& output, const Real q_) { // int width=output.width(); diff --git a/include/sctl/math_utils.hpp b/sctl/math_utils.hpp similarity index 79% rename from include/sctl/math_utils.hpp rename to sctl/math_utils.hpp index 2a9e508..f85e6d0 100644 --- a/include/sctl/math_utils.hpp +++ b/sctl/math_utils.hpp @@ -1,16 +1,58 @@ #ifndef _SCTL_MATH_UTILS_ #define _SCTL_MATH_UTILS_ -#include - #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" + +namespace sctl { + + +template static inline constexpr ValueType pow_integer_exp(ValueType b, Long e) { + return (e > 0) ? ((e & 1) ? b : ValueType(1)) * pow_integer_exp(b*b, e>>1) : ValueType(1); +} +template class pow_wrapper { + public: + static Real pow(Real b, ExpType e) { + return (Real)std::pow(b, e); + } +}; +template class pow_wrapper { + public: + static constexpr ValueType pow(ValueType b, Long e) { + return (e > 0) ? pow_integer_exp(b, e) : 1/pow_integer_exp(b, -e); + } +}; + +template inline constexpr ValueType pow(ValueType b) { + return (e > 0) ? pow_integer_exp(b, e) : 1/pow_integer_exp(b, -e); +} + + +template struct GetSigBits { + static constexpr Integer value() { + return ((Real)( pow((Real)0.5) + 1 ) == (Real)1 ? GetSigBits::value() : bits); + } +}; + +template struct GetSigBits { + static constexpr Integer value() { + return 0; + } +}; + +template inline constexpr Integer significant_bits() { + return GetSigBits::value(); +} + +template inline constexpr Real machine_eps() { + return pow<-GetSigBits::value()-1,Real>(2); +} + + -template inline constexpr Integer significant_bits(); -template inline constexpr Real machine_eps(); template Real atoreal(const char* str); @@ -38,7 +80,6 @@ template inline Real log(const Real a) { return (Real)std::log(a); template inline Real pow(const Real b, const ExpType e); -template inline constexpr ValueType pow(ValueType b); #ifdef SCTL_QUAD_T @@ -113,6 +154,4 @@ inline std::istream& operator>>(std::istream& inputstream, QuadReal& x); } // end namespace -#include SCTL_INCLUDE(math_utils.txx) - #endif //_SCTL_MATH_UTILS_HPP_ diff --git a/include/sctl/matrix.txx b/sctl/matrix.cc similarity index 99% rename from include/sctl/matrix.txx rename to sctl/matrix.cc index 3a5a9bc..4dd3adc 100644 --- a/include/sctl/matrix.txx +++ b/sctl/matrix.cc @@ -1,3 +1,5 @@ +#include "sctl/matrix.hpp" + #include #include #include @@ -5,12 +7,12 @@ #include #include -#include SCTL_INCLUDE(math_utils.hpp) -#include SCTL_INCLUDE(mat_utils.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) -#include SCTL_INCLUDE(profile.hpp) +#include "sctl/math_utils.hpp" +#include "sctl/mat_utils.hpp" +#include "sctl/mem_mgr.hpp" +#include "sctl/profile.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { template std::ostream& operator<<(std::ostream& output, const Matrix& M) { std::ios::fmtflags f(std::cout.flags()); diff --git a/include/sctl/matrix.hpp b/sctl/matrix.hpp similarity index 96% rename from include/sctl/matrix.hpp rename to sctl/matrix.hpp index fc92583..baa9ada 100644 --- a/include/sctl/matrix.hpp +++ b/sctl/matrix.hpp @@ -4,11 +4,11 @@ #include #include -#include -#include SCTL_INCLUDE(vector.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) +#include "sctl/common.hpp" +#include "sctl/vector.hpp" +#include "sctl/mem_mgr.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { template class Vector; template class Permutation; @@ -176,6 +176,4 @@ template std::ostream& operator<<(std::ostream& output, const } // end namespace -#include SCTL_INCLUDE(matrix.txx) - #endif //_SCTL_MATRIX_HPP_ diff --git a/include/sctl/mem_mgr.txx b/sctl/mem_mgr.cc similarity index 99% rename from include/sctl/mem_mgr.txx rename to sctl/mem_mgr.cc index 4af868c..5d0c96f 100644 --- a/include/sctl/mem_mgr.txx +++ b/sctl/mem_mgr.cc @@ -1,3 +1,5 @@ +#include "sctl/mem_mgr.hpp" + #include #include #include @@ -5,9 +7,9 @@ #include #include -#include SCTL_INCLUDE(profile.hpp) +#include "sctl/profile.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { #ifdef SCTL_MEMDEBUG template inline ConstIterator::ConstIterator(const ValueType* base_, difference_type len_, bool dynamic_alloc) { diff --git a/include/sctl/mem_mgr.hpp b/sctl/mem_mgr.hpp similarity index 99% rename from include/sctl/mem_mgr.hpp rename to sctl/mem_mgr.hpp index 4750de0..3bdcc6a 100644 --- a/include/sctl/mem_mgr.hpp +++ b/sctl/mem_mgr.hpp @@ -1,10 +1,9 @@ -// TODO: Implement fast stack allocation. #ifndef _SCTL_MEM_MGR_HPP_ #define _SCTL_MEM_MGR_HPP_ -//#include +// TODO: Implement fast stack allocation. -#include +//#include #include #include @@ -16,7 +15,9 @@ #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" + +namespace sctl { class MemoryManager; @@ -437,8 +438,6 @@ template Iterator memcopy(Iterator desti template Iterator memset(Iterator ptr, int value, Long num); -} // end namespace SCTL_NAMESPACE - -#include SCTL_INCLUDE(mem_mgr.txx) +} // end namespace sctl #endif //_SCTL_MEM_MGR_HPP_ diff --git a/include/sctl/morton.hpp b/sctl/morton.hpp similarity index 98% rename from include/sctl/morton.hpp rename to sctl/morton.hpp index d443a28..0dab917 100644 --- a/include/sctl/morton.hpp +++ b/sctl/morton.hpp @@ -1,15 +1,16 @@ #ifndef _SCTL_MORTON_ #define _SCTL_MORTON_ -#include -#include SCTL_INCLUDE(math_utils.hpp) #include +#include "sctl/common.hpp" +#include "sctl/math_utils.hpp" + #ifndef SCTL_MAX_DEPTH #define SCTL_MAX_DEPTH 15 #endif -namespace SCTL_NAMESPACE { +namespace sctl { template class Vector; diff --git a/include/sctl/ode-solver.txx b/sctl/ode-solver.cc similarity index 96% rename from include/sctl/ode-solver.txx rename to sctl/ode-solver.cc index 7463afd..aa35d36 100644 --- a/include/sctl/ode-solver.txx +++ b/sctl/ode-solver.cc @@ -1,13 +1,16 @@ -#include SCTL_INCLUDE(lagrange-interp.hpp) +#include "sctl/ode-solver.hpp" -namespace SCTL_NAMESPACE { +#include "sctl/lagrange-interp.hpp" +#include "sctl/quadrule.hpp" + +namespace sctl { template SDC::SDC(const Integer Order_, const Comm& comm_) : Order(Order_), comm(comm_) { - #ifdef SCTL_QUAD_T - using ValueType = QuadReal; - #else - using ValueType = long double; - #endif + // #ifdef SCTL_QUAD_T + // using ValueType = QuadReal; + // #else + // using ValueType = long double; + // #endif auto second_kind_cheb_nds = [](const Integer Order) { Vector x_cheb(Order); diff --git a/include/sctl/ode-solver.hpp b/sctl/ode-solver.hpp similarity index 94% rename from include/sctl/ode-solver.hpp rename to sctl/ode-solver.hpp index 7757456..f2b0dbd 100644 --- a/include/sctl/ode-solver.hpp +++ b/sctl/ode-solver.hpp @@ -1,15 +1,14 @@ #ifndef _SCTL_ODE_SOLVER_ #define _SCTL_ODE_SOLVER_ -#include -#include SCTL_INCLUDE(math_utils.hpp) - #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/math_utils.hpp" +#include "sctl/comm.hpp" +#include "sctl/matrix.hpp" -template class Vector; -template class Matrix; +namespace sctl { template class SDC { public: @@ -115,6 +114,4 @@ template class SDC { } -#include SCTL_INCLUDE(ode-solver.txx) - #endif //_SCTL_ODE_SOLVER_ diff --git a/include/sctl/ompUtils.txx b/sctl/ompUtils.cc similarity index 98% rename from include/sctl/ompUtils.txx rename to sctl/ompUtils.cc index f18fc75..87f7a21 100644 --- a/include/sctl/ompUtils.txx +++ b/sctl/ompUtils.cc @@ -1,10 +1,13 @@ +#include "sctl/ompUtils.hpp" + #include #include #include -#include SCTL_INCLUDE(vector.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) -namespace SCTL_NAMESPACE { +#include "sctl/vector.hpp" +#include "sctl/mem_mgr.hpp" + +namespace sctl { template inline void omp_par::merge(ConstIter A_, ConstIter A_last, ConstIter B_, ConstIter B_last, Iter C_, Int p, StrictWeakOrdering comp) { typedef typename std::iterator_traits::difference_type _DiffType; diff --git a/include/sctl/ompUtils.hpp b/sctl/ompUtils.hpp similarity index 85% rename from include/sctl/ompUtils.hpp rename to sctl/ompUtils.hpp index 055a90c..00c47ca 100644 --- a/include/sctl/ompUtils.hpp +++ b/sctl/ompUtils.hpp @@ -1,11 +1,11 @@ #ifndef _SCTL_OMP_UTILS_H_ #define _SCTL_OMP_UTILS_H_ -#include - #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" + +namespace sctl { namespace omp_par { template void merge(ConstIter A_, ConstIter A_last, ConstIter B_, ConstIter B_last, Iter C_, Int p, StrictWeakOrdering comp); @@ -19,8 +19,6 @@ template typename std::iterator_traits:: template void scan(ConstIter A, Iter B, Int cnt); } // end namespace omp_par -} // end namespace SCTL_NAMESPACE - -#include SCTL_INCLUDE(ompUtils.txx) +} // end namespace sctl #endif //_SCTL_OMP_UTILS_H_ diff --git a/include/sctl/parallel_solver.hpp b/sctl/parallel_solver.hpp similarity index 98% rename from include/sctl/parallel_solver.hpp rename to sctl/parallel_solver.hpp index 205e9a2..d7a12ab 100644 --- a/include/sctl/parallel_solver.hpp +++ b/sctl/parallel_solver.hpp @@ -1,14 +1,14 @@ #ifndef _SCTL_PARALLEL_SOLVER_HPP_ #define _SCTL_PARALLEL_SOLVER_HPP_ -#include -#include SCTL_INCLUDE(comm.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) -#include SCTL_INCLUDE(math_utils.hpp) - #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/comm.hpp" +#include "sctl/mem_mgr.hpp" +#include "sctl/math_utils.hpp" + +namespace sctl { template class Vector; template class Matrix; @@ -60,7 +60,7 @@ template class ParallelSolver { } // end namespace -namespace SCTL_NAMESPACE { +namespace sctl { template static Real inner_prod(const Vector& x, const Vector& y, const Comm& comm) { Real x_dot_y = 0; @@ -205,7 +205,7 @@ template inline void ParallelSolver::operator()(Vector* #include -namespace SCTL_NAMESPACE { +namespace sctl { template int ParallelSolverMatVec(Mat M_, ::Vec x_, ::Vec Mx_) { PetscErrorCode ierr; diff --git a/include/sctl/profile.txx b/sctl/profile.cc similarity index 99% rename from include/sctl/profile.txx rename to sctl/profile.cc index 211be25..81f97a1 100644 --- a/include/sctl/profile.txx +++ b/sctl/profile.cc @@ -1,4 +1,4 @@ -#include SCTL_INCLUDE(comm.hpp) +#include "sctl/profile.hpp" #include #include @@ -7,7 +7,9 @@ #include #include -namespace SCTL_NAMESPACE { +#include "sctl/comm.hpp" + +namespace sctl { #if SCTL_PROFILE >= 0 diff --git a/include/sctl/profile.hpp b/sctl/profile.hpp similarity index 93% rename from include/sctl/profile.hpp rename to sctl/profile.hpp index 44b9c70..3e3bd68 100644 --- a/include/sctl/profile.hpp +++ b/sctl/profile.hpp @@ -1,17 +1,17 @@ #ifndef _SCTL_PROFILE_HPP_ #define _SCTL_PROFILE_HPP_ -#include - #include #include #include +#include "sctl/common.hpp" + #ifndef SCTL_PROFILE #define SCTL_PROFILE -1 #endif -namespace SCTL_NAMESPACE { +namespace sctl { class Comm; @@ -63,6 +63,4 @@ class Profile { } // end namespace -#include SCTL_INCLUDE(profile.txx) - #endif //_SCTL_PROFILE_HPP_ diff --git a/include/sctl/quadrule.hpp b/sctl/quadrule.hpp similarity index 99% rename from include/sctl/quadrule.hpp rename to sctl/quadrule.hpp index 89725f1..2d74fa9 100644 --- a/include/sctl/quadrule.hpp +++ b/sctl/quadrule.hpp @@ -1,14 +1,14 @@ #ifndef _SCTL_QUADRULE_HPP_ #define _SCTL_QUADRULE_HPP_ -#include -#include SCTL_INCLUDE(matrix.hpp) -#include SCTL_INCLUDE(math_utils.hpp) -#include SCTL_INCLUDE(legendre_rule.hpp) - #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/matrix.hpp" +#include "sctl/math_utils.hpp" +#include "sctl/legendre_rule.hpp" + +namespace sctl { template class ChebQuadRule { // p(x) public: diff --git a/sctl/sctl.hpp b/sctl/sctl.hpp new file mode 100644 index 0000000..2e5b1d3 --- /dev/null +++ b/sctl/sctl.hpp @@ -0,0 +1,89 @@ +// Scientific Computing Template Library + +#ifndef _SCTL_HPP_ +#define _SCTL_HPP_ + +#include "sctl/common.hpp" + +// Import PVFMM preprocessor macro definitions +#ifdef SCTL_HAVE_PVFMM +#ifndef SCTL_HAVE_MPI +#define SCTL_HAVE_MPI +#endif +#include "pvfmm_config.h" +#if defined(PVFMM_QUAD_T) && !defined(SCTL_QUAD_T) +#define SCTL_QUAD_T PVFMM_QUAD_T +#endif +#endif + +// Math utilities +#include "sctl/math_utils.hpp" + +// FMM wrapper +#include "sctl/fmm-wrapper.hpp" + +// Boundary Integrals +#include "sctl/boundary_integral.hpp" +#include "sctl/slender_element.hpp" +#include "sctl/quadrule.hpp" +#include "sctl/lagrange-interp.hpp" + +// ODE solver +#include "sctl/ode-solver.hpp" + +// Tensor +#include "sctl/tensor.hpp" + +// Tree +#include "sctl/tree.hpp" +#include "sctl/vtudata.hpp" + +// MPI Wrapper +#include "sctl/comm.hpp" + +// Memory Manager, Iterators +#include "sctl/mem_mgr.hpp" + +// Vector +#include "sctl/vector.hpp" + +// Matrix, Permutation operators +#include "sctl/matrix.hpp" + +// Template vector intrinsics (new) +#include "sctl/vec.hpp" +#include "sctl/vec-test.hpp" + +// OpenMP merge-sort and scan +#include "sctl/ompUtils.hpp" + +// Parallel solver +#include "sctl/parallel_solver.hpp" + +// Chebyshev basis +#include "sctl/cheb_utils.hpp" + +// Morton +#include "sctl/morton.hpp" + +// Spherical Harmonics +#include "sctl/sph_harm.hpp" + +#include "sctl/fft_wrapper.hpp" + +#include "sctl/legendre_rule.hpp" + +// Profiler +#include "sctl/profile.hpp" + +// Print stack trace +#include "sctl/stacktrace.h" + +// Set signal handler +const int sgh = sctl::SetSigHandler(); + +// Boundary quadrature, Kernel functions +#include "sctl/kernel_functions.hpp" +#include "sctl/boundary_quadrature.hpp" + +#endif //_SCTL_HPP_ diff --git a/include/sctl/slender_element.txx b/sctl/slender_element.cc similarity index 99% rename from include/sctl/slender_element.txx rename to sctl/slender_element.cc index 80e8d37..ce09263 100644 --- a/include/sctl/slender_element.txx +++ b/sctl/slender_element.cc @@ -1,16 +1,18 @@ -#include SCTL_INCLUDE(kernel_functions.hpp) -#include SCTL_INCLUDE(tensor.hpp) -#include SCTL_INCLUDE(quadrule.hpp) -#include SCTL_INCLUDE(ompUtils.hpp) -#include SCTL_INCLUDE(profile.hpp) -#include SCTL_INCLUDE(legendre_rule.hpp) -#include SCTL_INCLUDE(fft_wrapper.hpp) -#include SCTL_INCLUDE(vtudata.hpp) -#include SCTL_INCLUDE(lagrange-interp.hpp) +#include "sctl/slender_element.hpp" #include -namespace SCTL_NAMESPACE { +#include "sctl/kernel_functions.hpp" +#include "sctl/tensor.hpp" +#include "sctl/quadrule.hpp" +#include "sctl/ompUtils.hpp" +#include "sctl/profile.hpp" +#include "sctl/legendre_rule.hpp" +#include "sctl/fft_wrapper.hpp" +#include "sctl/vtudata.hpp" +#include "sctl/lagrange-interp.hpp" + +namespace sctl { template template void ToroidalGreensFn::Setup(const Kernel& ker, Real R0) { #ifdef SCTL_QUAD_T diff --git a/include/sctl/slender_element.hpp b/sctl/slender_element.hpp similarity index 97% rename from include/sctl/slender_element.hpp rename to sctl/slender_element.hpp index 3798a3c..2d8c193 100644 --- a/include/sctl/slender_element.hpp +++ b/sctl/slender_element.hpp @@ -1,11 +1,14 @@ #ifndef _SCTL_SLENDER_ELEMENT_HPP_ #define _SCTL_SLENDER_ELEMENT_HPP_ -#include -#include SCTL_INCLUDE(mem_mgr.hpp) -#include SCTL_INCLUDE(vector.hpp) +#include "sctl/common.hpp" -namespace SCTL_NAMESPACE { +#include "sctl/comm.hpp" +#include "sctl/mem_mgr.hpp" +#include "sctl/vector.hpp" +#include "sctl/boundary_integral.hpp" + +namespace sctl { class Comm; struct VTUData; @@ -218,6 +221,4 @@ namespace SCTL_NAMESPACE { } -#include SCTL_INCLUDE(slender_element.txx) - #endif //_SCTL_SLENDER_ELEMENT_HPP_ diff --git a/include/sctl/sph_harm.txx b/sctl/sph_harm.cc similarity index 99% rename from include/sctl/sph_harm.txx rename to sctl/sph_harm.cc index 1467f9a..0debf4f 100644 --- a/include/sctl/sph_harm.txx +++ b/sctl/sph_harm.cc @@ -1,11 +1,14 @@ -#include SCTL_INCLUDE(fft_wrapper.hpp) -#include SCTL_INCLUDE(legendre_rule.hpp) +#include "sctl/sph_harm.hpp" #include +#include "sctl/profile.hpp" +#include "sctl/fft_wrapper.hpp" +#include "sctl/legendre_rule.hpp" + // TODO: Replace work vectors with dynamic-arrays -namespace SCTL_NAMESPACE { +namespace sctl { template void SphericalHarmonics::Grid2SHC(const Vector& X, Long Nt, Long Np, Long p1, Vector& S, SHCArrange arrange){ Long N = X.Dim() / (Np*Nt); diff --git a/include/sctl/sph_harm.hpp b/sctl/sph_harm.hpp similarity index 99% rename from include/sctl/sph_harm.hpp rename to sctl/sph_harm.hpp index df7ae49..633c6ec 100644 --- a/include/sctl/sph_harm.hpp +++ b/sctl/sph_harm.hpp @@ -3,13 +3,14 @@ #define SCTL_SHMAXDEG 1024 -#include -#include SCTL_INCLUDE(math_utils.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) - #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/comm.hpp" +#include "sctl/math_utils.hpp" +#include "sctl/mem_mgr.hpp" + +namespace sctl { class Comm; template class Vector; @@ -515,7 +516,5 @@ template class SphericalHarmonics{ } // end namespace -#include SCTL_INCLUDE(sph_harm.txx) - #endif // _SCTL_SPH_HARM_HPP_ diff --git a/include/sctl/sse2neon.h b/sctl/sse2neon.h similarity index 100% rename from include/sctl/sse2neon.h rename to sctl/sse2neon.h diff --git a/include/sctl/stacktrace.h b/sctl/stacktrace.h similarity index 98% rename from include/sctl/stacktrace.h rename to sctl/stacktrace.h index 1abe250..1ae2a72 100644 --- a/include/sctl/stacktrace.h +++ b/sctl/stacktrace.h @@ -1,8 +1,6 @@ #ifndef _SCTL_STACKTRACE_H_ #define _SCTL_STACKTRACE_H_ -#include - #include #include #include @@ -13,7 +11,9 @@ #include #endif -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" + +namespace sctl { inline void print_stacktrace(FILE* out = stderr, int skip = 1) { // Get addresses diff --git a/include/sctl/tensor.hpp b/sctl/tensor.hpp similarity index 98% rename from include/sctl/tensor.hpp rename to sctl/tensor.hpp index 1a5b971..637e451 100644 --- a/include/sctl/tensor.hpp +++ b/sctl/tensor.hpp @@ -1,14 +1,14 @@ #ifndef _SCTL_TENSOR_HPP_ #define _SCTL_TENSOR_HPP_ -#include -#include SCTL_INCLUDE(mem_mgr.hpp) -#include SCTL_INCLUDE(math_utils.hpp) - #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/mem_mgr.hpp" +#include "sctl/math_utils.hpp" + +namespace sctl { template class Tensor { diff --git a/include/sctl/tree.txx b/sctl/tree.cc similarity index 99% rename from include/sctl/tree.txx rename to sctl/tree.cc index 240f697..ebf462b 100644 --- a/include/sctl/tree.txx +++ b/sctl/tree.cc @@ -1,6 +1,8 @@ +#include "sctl/tree.hpp" + #include -namespace SCTL_NAMESPACE { +namespace sctl { template constexpr Integer Tree::Dim() { return DIM; diff --git a/include/sctl/tree.hpp b/sctl/tree.hpp similarity index 95% rename from include/sctl/tree.hpp rename to sctl/tree.hpp index 1282c29..57c64b9 100644 --- a/include/sctl/tree.hpp +++ b/sctl/tree.hpp @@ -1,17 +1,17 @@ #ifndef _SCTL_TREE_ #define _SCTL_TREE_ -#include -#include SCTL_INCLUDE(comm.hpp) -#include SCTL_INCLUDE(morton.hpp) -#include SCTL_INCLUDE(vtudata.hpp) -#include SCTL_INCLUDE(ompUtils.hpp) - #include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/comm.hpp" +#include "sctl/morton.hpp" +#include "sctl/vtudata.hpp" +#include "sctl/ompUtils.hpp" + +namespace sctl { template class Tree { public: @@ -163,6 +163,4 @@ template > class PtTree : pu } -#include SCTL_INCLUDE(tree.txx) - #endif //_SCTL_TREE_ diff --git a/include/sctl/vec-test.hpp b/sctl/vec-test.hpp similarity index 99% rename from include/sctl/vec-test.hpp rename to sctl/vec-test.hpp index fc3bc85..aee010a 100644 --- a/include/sctl/vec-test.hpp +++ b/sctl/vec-test.hpp @@ -1,15 +1,15 @@ #ifndef _SCTL_VEC_TEST_HPP_ #define _SCTL_VEC_TEST_HPP_ -#include -#include SCTL_INCLUDE(vec.hpp) -#include SCTL_INCLUDE(vector.hpp) - #include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/vec.hpp" +#include "sctl/vector.hpp" + +namespace sctl { // Verify Vec class template class VecTest { diff --git a/include/sctl/vec.hpp b/sctl/vec.hpp similarity index 99% rename from include/sctl/vec.hpp rename to sctl/vec.hpp index bff5754..c7e4966 100644 --- a/include/sctl/vec.hpp +++ b/sctl/vec.hpp @@ -1,14 +1,14 @@ #ifndef _SCTL_VEC_WRAPPER_HPP_ #define _SCTL_VEC_WRAPPER_HPP_ -#include -#include SCTL_INCLUDE(intrin-wrapper.hpp) - #include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/intrin-wrapper.hpp" + +namespace sctl { #if defined(__AVX512__) || defined(__AVX512F__) static_assert(SCTL_ALIGN_BYTES >= 64, "Insufficient memory alignment for SIMD vector types"); diff --git a/include/sctl/vector.txx b/sctl/vector.cc similarity index 99% rename from include/sctl/vector.txx rename to sctl/vector.cc index a80e6cc..ef4bef3 100644 --- a/include/sctl/vector.txx +++ b/sctl/vector.cc @@ -1,11 +1,13 @@ +#include "sctl/vector.hpp" + #include #include #include -#include SCTL_INCLUDE(mem_mgr.hpp) -#include SCTL_INCLUDE(profile.hpp) +#include "sctl/mem_mgr.hpp" +#include "sctl/profile.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { template void Vector::Init(Long dim_, Iterator data_, bool own_data_) { dim = dim_; diff --git a/include/sctl/vector.hpp b/sctl/vector.hpp similarity index 97% rename from include/sctl/vector.hpp rename to sctl/vector.hpp index 8044f43..bde8f0e 100644 --- a/include/sctl/vector.hpp +++ b/sctl/vector.hpp @@ -1,14 +1,14 @@ #ifndef _SCTL_VECTOR_HPP_ #define _SCTL_VECTOR_HPP_ -#include - #include #include #include #include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" + +namespace sctl { template Iterator NullIterator(); @@ -129,6 +129,4 @@ template std::ostream& operator<<(std::ostream& output, const } // end namespace -#include SCTL_INCLUDE(vector.txx) - #endif //_SCTL_VECTOR_HPP_ diff --git a/include/sctl/vtudata.txx b/sctl/vtudata.cc similarity index 98% rename from include/sctl/vtudata.txx rename to sctl/vtudata.cc index 30c950d..1c4b119 100644 --- a/include/sctl/vtudata.txx +++ b/sctl/vtudata.cc @@ -1,8 +1,12 @@ +#include "sctl/vtudata.hpp" + #include +#include +#include -#include SCTL_INCLUDE(math_utils.hpp) +#include "sctl/math_utils.hpp" -namespace SCTL_NAMESPACE { +namespace sctl { inline void VTUData::WriteVTK(const std::string& fname, const Comm& comm = Comm::Self()) const { typedef typename VTUData::VTKReal VTKReal; diff --git a/include/sctl/vtudata.hpp b/sctl/vtudata.hpp similarity index 81% rename from include/sctl/vtudata.hpp rename to sctl/vtudata.hpp index edd49f3..5e8e040 100644 --- a/include/sctl/vtudata.hpp +++ b/sctl/vtudata.hpp @@ -1,12 +1,14 @@ #ifndef _SCTL_VTUDATA_ #define _SCTL_VTUDATA_ -#include -#include SCTL_INCLUDE(comm.hpp) -#include SCTL_INCLUDE(vector.hpp) -#include SCTL_INCLUDE(mem_mgr.hpp) +#include -namespace SCTL_NAMESPACE { +#include "sctl/common.hpp" +#include "sctl/comm.hpp" +#include "sctl/vector.hpp" +#include "sctl/mem_mgr.hpp" + +namespace sctl { class Comm; template class Vector; @@ -35,6 +37,4 @@ struct VTUData { } -#include SCTL_INCLUDE(vtudata.txx) - #endif //_SCTL_VTUDATA_ diff --git a/tests/BUILD.bazel b/tests/BUILD.bazel new file mode 100644 index 0000000..4728ccf --- /dev/null +++ b/tests/BUILD.bazel @@ -0,0 +1,230 @@ +cc_test( + name = "double-layer-convergence", + srcs = ["double-layer-convergence.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "example1", + srcs = ["example1.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "force-free-fields-example", + srcs = ["force-free-fields-example.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "quadrature-example", + srcs = ["quadrature-example.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "table1", + srcs = ["table1.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "table3", + srcs = ["table3.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "table4", + srcs = ["table4.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "table5", + srcs = ["table5.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "table6", + srcs = ["table6.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "table7", + srcs = ["table7.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) + +cc_test( + name = "virtual-casing-principle", + srcs = ["virtual-casing-principle.cpp"], + deps = [ + "//biest:biest", + ], + copts = [ + "-DSCTL_GLOBAL_MEM_BUFF=0", + "-DSCTL_QUAD_T=__float128", + "-DSCTL_DOUBLE", + "-DSCTL_HAVE_BLAS", + "-DSCTL_HAVE_LAPACK", + "-DSCTL_HAVE_FFTW", + ], + linkopts = [ + "-lblas", + "-llapack", + "-lfftw3", + ], +) diff --git a/src/double-layer-convergence.cpp b/tests/double-layer-convergence.cpp similarity index 100% rename from src/double-layer-convergence.cpp rename to tests/double-layer-convergence.cpp diff --git a/src/example1.cpp b/tests/example1.cpp similarity index 100% rename from src/example1.cpp rename to tests/example1.cpp diff --git a/src/force-free-fields-example.cpp b/tests/force-free-fields-example.cpp similarity index 100% rename from src/force-free-fields-example.cpp rename to tests/force-free-fields-example.cpp diff --git a/src/quadrature-example.cpp b/tests/quadrature-example.cpp similarity index 100% rename from src/quadrature-example.cpp rename to tests/quadrature-example.cpp diff --git a/src/table1.cpp b/tests/table1.cpp similarity index 100% rename from src/table1.cpp rename to tests/table1.cpp diff --git a/src/table3.cpp b/tests/table3.cpp similarity index 100% rename from src/table3.cpp rename to tests/table3.cpp diff --git a/src/table4.cpp b/tests/table4.cpp similarity index 100% rename from src/table4.cpp rename to tests/table4.cpp diff --git a/src/table5.cpp b/tests/table5.cpp similarity index 100% rename from src/table5.cpp rename to tests/table5.cpp diff --git a/src/table6.cpp b/tests/table6.cpp similarity index 100% rename from src/table6.cpp rename to tests/table6.cpp diff --git a/src/table7.cpp b/tests/table7.cpp similarity index 100% rename from src/table7.cpp rename to tests/table7.cpp diff --git a/src/virtual-casing-principle.cpp b/tests/virtual-casing-principle.cpp similarity index 100% rename from src/virtual-casing-principle.cpp rename to tests/virtual-casing-principle.cpp