From d63678dfe1cc045a498d7a645bc2ba8ede7e8fe5 Mon Sep 17 00:00:00 2001 From: Alberto Parravicini Date: Thu, 23 Sep 2021 15:51:53 +0200 Subject: [PATCH] Grcuda 61 cleanup for release 1 (#19) * adding changelog, removed unused thread manager * fixed install.sh, now using env variables to retrieve the absolute path to grcuda.jar * added curl to install script * added license to demo * removed unused cuda code; added license to benchmarks * added license to tests * added license to functions and libraries * fixed removal of thread manager breaking build * added more updated licenses * added license to runtime files * Updated changelog * fixed typo * added grcuda-data info to readme * udpated tracking of grcuda-data * temporarily removed submodule grcuda-data * readded grcuda-data submodule * tracking master? * updated grcuda-data tracking * Added the possibility to send execution times to the frontend * Display execution times in race mode * clarified streamattach in changelog Co-authored-by: Guido Walter Di Donato Co-authored-by: Francesco Sgherzi --- .gitmodules | 2 +- CHANGELOG.md | 63 +++++ LICENSE | 10 +- README.md | 12 +- .../array_copy_performance_test.js | 29 +++ .../cuda/image_pipeline.cu | 29 +++ .../cuda/image_pipeline.cuh | 29 +++ demos/image_pipeline_local/cuda/main.cpp | 29 +++ .../cuda/opencv_interface.cpp | 28 ++ .../cuda/opencv_interface.hpp | 29 +++ demos/image_pipeline_local/cuda/options.hpp | 29 +++ demos/image_pipeline_local/cuda/utils.hpp | 29 +++ demos/image_pipeline_local/cuda_kernels.js | 29 +++ demos/image_pipeline_local/image_pipeline.js | 29 +++ demos/image_pipeline_local/image_pipeline.py | 29 +++ demos/image_pipeline_web/backend/package.json | 4 +- .../backend/src/CudaKernels.ts | 29 +++ .../backend/src/GrCUDAProxy.ts | 55 +++- demos/image_pipeline_web/backend/src/index.ts | 29 +++ .../image_pipeline_web/backend/src/options.ts | 31 ++- demos/image_pipeline_web/backend/src/utils.ts | 30 ++- demos/image_pipeline_web/frontend/index.html | 2 +- demos/image_pipeline_web/frontend/js/index.js | 33 ++- .../frontend/js/templates.js | 29 +++ grcuda-data | 2 +- install.sh | 2 +- mx.grcuda/suite.py | 11 +- oci_setup/oci_connect.sh | 29 +++ oci_setup/oci_setup_instance.py | 30 ++- oci_setup/oci_terminate_instance.sh | 29 +++ oci_setup/setup_machine_from_scratch.sh | 32 ++- .../nvidia/grcuda/test/BindKernelTest.java | 7 + .../src/com/nvidia/grcuda/test/BindTest.java | 7 + .../nvidia/grcuda/test/BuildKernelTest.java | 7 + .../com/nvidia/grcuda/test/CUDAEventTest.java | 30 +++ .../com/nvidia/grcuda/test/DeviceTest.java | 7 + .../com/nvidia/grcuda/test/ManglingTest.java | 7 + .../com/nvidia/grcuda/test/ParserTest.java | 7 + .../grcuda/test/cudalibraries/CUBLASTest.java | 7 + .../cudalibraries/CUBLASWithScheduleTest.java | 7 + .../grcuda/test/cudalibraries/CUMLTest.java | 30 +++ .../DeviceArrayCopyFunctionTest.java | 7 + .../test/functions/DeviceArrayFreeTest.java | 7 + .../test/functions/map/MapFunctionTest.java | 6 +- .../runtime/ComplexExecutionDAGMockTest.java | 30 +++ .../test/runtime/ComputationArgumentTest.java | 30 +++ .../grcuda/test/runtime/CreateStreamTest.java | 30 +++ .../test/runtime/ExecutionDAGMockTest.java | 30 +++ .../grcuda/test/runtime/StreamAttachTest.java | 30 +++ .../test/runtime/array/DeviceArrayTest.java | 7 + .../test/runtime/array/MultiDimArrayTest.java | 7 + .../GrCUDAExecutionContextTest.java | 30 +++ ...ecutionContextWithConstDependencyTest.java | 30 +++ .../WithConstDependencyComputationTest.java | 30 +++ .../stream/GrCUDAStreamManagerMockTest.java | 30 +++ .../test/util/GrCUDATestOptionsStruct.java | 30 +++ .../grcuda/test/util/GrCUDATestUtil.java | 30 +++ .../grcuda/test/util/TestLogHandler.java | 30 +++ .../grcuda/test/util/mock/ArgumentMock.java | 30 +++ .../util/mock/GrCUDAExecutionContextMock.java | 43 +++- .../GrCUDAExecutionContextMockBuilder.java | 30 +++ .../util/mock/GrCUDAStreamManagerMock.java | 30 +++ .../util/mock/GrCUDAThreadManagerMock.java | 16 -- .../test/util/mock/KernelExecutionMock.java | 30 +++ .../test/util/mock/SyncExecutionMock.java | 30 +++ .../com.nvidia.grcuda/.checkstyle_checks.xml | 55 ++-- .../src/com/nvidia/grcuda/Binding.java | 7 + .../src/com/nvidia/grcuda/CUDAEvent.java | 30 +++ .../com/nvidia/grcuda/FunctionBinding.java | 7 + .../src/com/nvidia/grcuda/GPUPointer.java | 9 +- .../src/com/nvidia/grcuda/GrCUDAContext.java | 7 + .../com/nvidia/grcuda/GrCUDAException.java | 9 +- .../grcuda/GrCUDAInternalException.java | 7 + .../src/com/nvidia/grcuda/GrCUDALanguage.java | 9 +- .../src/com/nvidia/grcuda/GrCUDAOptions.java | 7 + .../nvidia/grcuda/GrCUDAThreadManager.java | 87 ------- .../src/com/nvidia/grcuda/KernelBinding.java | 7 + .../src/com/nvidia/grcuda/MemberSet.java | 30 +++ .../src/com/nvidia/grcuda/Namespace.java | 7 + .../src/com/nvidia/grcuda/NoneValue.java | 7 + .../src/com/nvidia/grcuda/Type.java | 7 + .../src/com/nvidia/grcuda/TypeException.java | 7 + .../cudalibraries/CUDALibraryFunction.java | 30 +++ .../cudalibraries/cublas/CUBLASRegistry.java | 9 +- .../cudalibraries/cuml/CUMLRegistry.java | 7 + .../tensorrt/TensorRTRegistry.java | 7 + .../grcuda/functions/BindAllFunction.java | 7 + .../nvidia/grcuda/functions/BindFunction.java | 7 + .../grcuda/functions/BindKernelFunction.java | 7 + .../grcuda/functions/BuildKernelFunction.java | 7 + .../nvidia/grcuda/functions/CUDAFunction.java | 7 + .../functions/DeviceArrayCopyFunction.java | 7 + .../grcuda/functions/DeviceArrayFunction.java | 7 + .../grcuda/functions/ExternalFunction.java | 7 + .../functions/ExternalFunctionFactory.java | 7 + .../com/nvidia/grcuda/functions/Function.java | 7 + .../grcuda/functions/GetDeviceFunction.java | 7 + .../grcuda/functions/GetDevicesFunction.java | 7 + .../nvidia/grcuda/functions/HostFunction.java | 7 + .../functions/MapDeviceArrayFunction.java | 7 + .../functions/TypedDeviceArrayFunction.java | 7 + .../TypedMapDeviceArrayFunction.java | 7 + .../grcuda/functions/map/ArgumentSet.java | 7 + .../grcuda/functions/map/MapArgObject.java | 7 + .../grcuda/functions/map/MapFunction.java | 7 + .../grcuda/functions/map/MappedFunction.java | 7 + .../grcuda/functions/map/ShredFunction.java | 7 + .../grcuda/functions/map/ShreddedObject.java | 7 + .../nvidia/grcuda/nodes/ArithmeticNode.java | 7 + .../com/nvidia/grcuda/nodes/ArrayNode.java | 7 + .../com/nvidia/grcuda/nodes/BinaryNode.java | 8 +- .../src/com/nvidia/grcuda/nodes/CallNode.java | 7 + .../nvidia/grcuda/nodes/ExpressionNode.java | 7 + .../nvidia/grcuda/nodes/GrCUDARootNode.java | 7 + .../nvidia/grcuda/nodes/IdentifierNode.java | 7 + .../nvidia/grcuda/nodes/IntegerLiteral.java | 7 + .../grcuda/nodes/RootNamespaceNode.java | 7 + .../nvidia/grcuda/nodes/StringLiteral.java | 7 + .../grcuda/parser/GrCUDAParserException.java | 7 + .../grcuda/parser/NIDLParserException.java | 7 + .../com/nvidia/grcuda/parser/NodeFactory.java | 7 + .../com/nvidia/grcuda/parser/ParserAntlr.java | 7 + .../com/nvidia/grcuda/parser/antlr/GrCUDA.g4 | 8 + .../com/nvidia/grcuda/parser/antlr/NIDL.g4 | 7 + .../nvidia/grcuda/runtime/CUDARuntime.java | 7 + .../grcuda/runtime/ConfiguredKernel.java | 7 + .../src/com/nvidia/grcuda/runtime/Device.java | 7 + .../com/nvidia/grcuda/runtime/DeviceList.java | 7 + .../runtime/DriverAPIErrorMessages.java | 7 + .../grcuda/runtime/GPUDeviceProperties.java | 7 + .../src/com/nvidia/grcuda/runtime/Kernel.java | 7 + .../grcuda/runtime/KernelArguments.java | 30 +++ .../nvidia/grcuda/runtime/KernelConfig.java | 7 + .../grcuda/runtime/KernelConfigBuilder.java | 30 +++ .../com/nvidia/grcuda/runtime/LazyKernel.java | 7 + .../runtime/LittleEndianNativeArrayView.java | 7 + .../nvidia/grcuda/runtime/NVRTCException.java | 7 + .../grcuda/runtime/NVRuntimeCompiler.java | 7 + .../nvidia/grcuda/runtime/OffheapMemory.java | 7 + .../nvidia/grcuda/runtime/UnsafeHelper.java | 7 + .../grcuda/runtime/array/AbstractArray.java | 30 +++ .../grcuda/runtime/array/DeviceArray.java | 9 +- .../runtime/array/MultiDimDeviceArray.java | 7 + .../array/MultiDimDeviceArrayView.java | 7 + .../computation/CUDALibraryExecution.java | 30 +++ .../computation/ComputationArgument.java | 7 + .../ComputationArgumentWithValue.java | 30 +++ .../GrCUDAComputationalElement.java | 30 +++ .../computation/InitializeDependencyList.java | 30 +++ .../runtime/computation/KernelExecution.java | 30 +++ .../ArrayAccessExecution.java | 30 +++ .../ArrayAccessExecutionInitializer.java | 30 +++ .../ArrayCopyFunctionExecution.java | 30 +++ .../ArrayCopyFunctionExecutionDefault.java | 30 +++ ...ArrayCopyFunctionExecutionInitializer.java | 30 +++ .../ArrayCopyFunctionExecutionMemcpy.java | 30 +++ .../DeviceArrayCopyException.java | 30 +++ .../DeviceArrayReadExecution.java | 30 +++ .../DeviceArrayWriteExecution.java | 30 +++ .../MultiDimDeviceArrayViewReadExecution.java | 30 +++ ...MultiDimDeviceArrayViewWriteExecution.java | 30 +++ .../DefaultDependencyComputation.java | 30 +++ .../DefaultDependencyComputationBuilder.java | 30 +++ .../dependency/DependencyComputation.java | 30 +++ .../DependencyComputationBuilder.java | 30 +++ .../dependency/DependencyPolicyEnum.java | 30 +++ .../WithConstDependencyComputation.java | 30 +++ ...WithConstDependencyComputationBuilder.java | 30 +++ .../prefetch/AbstractArrayPrefetcher.java | 30 +++ .../prefetch/DefaultArrayPrefetcher.java | 30 +++ .../prefetch/NoneArrayPrefetcher.java | 30 +++ .../computation/prefetch/PrefetcherEnum.java | 30 +++ .../prefetch/SyncArrayPrefetcher.java | 30 +++ .../PostPascalStreamAttachPolicy.java | 30 +++ .../PrePascalStreamAttachPolicy.java | 30 +++ .../StreamAttachArchitecturePolicy.java | 30 +++ .../AbstractGrCUDAExecutionContext.java | 30 +++ .../executioncontext/ExecutionDAG.java | 30 +++ .../executioncontext/ExecutionPolicyEnum.java | 30 +++ .../GrCUDAExecutionContext.java | 41 ++- .../executioncontext/KeepDependency.java | 30 +++ .../SyncGrCUDAExecutionContext.java | 30 +++ .../grcuda/runtime/stream/CUDAStream.java | 30 +++ .../grcuda/runtime/stream/DefaultStream.java | 30 +++ .../runtime/stream/GrCUDAStreamManager.java | 30 +++ .../runtime/stream/RetrieveNewStream.java | 30 +++ .../stream/RetrieveNewStreamPolicyEnum.java | 30 +++ .../runtime/stream/RetrieveParentStream.java | 30 +++ .../RetrieveParentStreamPolicyEnum.java | 30 +++ projects/resources/cuda/Makefile | 29 +++ projects/resources/cuda/b1.cu | 29 +++ projects/resources/cuda/b1.cuh | 29 +++ projects/resources/cuda/b10.cu | 29 +++ projects/resources/cuda/b10.cuh | 29 +++ projects/resources/cuda/b5.cu | 29 +++ projects/resources/cuda/b5.cuh | 29 +++ projects/resources/cuda/b6.cu | 29 +++ projects/resources/cuda/b6.cuh | 29 +++ projects/resources/cuda/b7.cu | 29 +++ projects/resources/cuda/b7.cuh | 29 +++ projects/resources/cuda/b8.cu | 29 +++ projects/resources/cuda/b8.cuh | 29 +++ projects/resources/cuda/benchmark.cu | 29 +++ projects/resources/cuda/benchmark.cuh | 29 +++ projects/resources/cuda/main.cu | 29 +++ projects/resources/cuda/old/b10.cuh | 124 --------- projects/resources/cuda/old/b10_default.cu | 195 -------------- projects/resources/cuda/old/b10_sync.cu | 180 ------------- projects/resources/cuda/old/b1_default.cu | 134 ---------- projects/resources/cuda/old/b1_sync.cu | 113 -------- projects/resources/cuda/old/b5.cuh | 91 ------- projects/resources/cuda/old/b5_default.cu | 149 ----------- projects/resources/cuda/old/b5_sync.cu | 127 --------- projects/resources/cuda/old/b6.cuh | 140 ---------- projects/resources/cuda/old/b6_default.cu | 188 -------------- projects/resources/cuda/old/b6_sync.cu | 180 ------------- projects/resources/cuda/old/b7.cuh | 154 ----------- projects/resources/cuda/old/b7_default.cu | 243 ------------------ projects/resources/cuda/old/b7_sync.cu | 219 ---------------- projects/resources/cuda/old/b8.cuh | 160 ------------ projects/resources/cuda/old/b8_default.cu | 221 ---------------- projects/resources/cuda/old/b8_sync.cu | 189 -------------- projects/resources/cuda/old/b9.cuh | 16 -- projects/resources/cuda/old/options.hpp | 152 ----------- projects/resources/cuda/old/utils.hpp | 134 ---------- projects/resources/cuda/options.hpp | 29 +++ .../cuda/other/b1_default_nomanaged.cu | 29 +++ .../resources/cuda/other/b1_sync_nomanaged.cu | 29 +++ projects/resources/cuda/other/b4_default.cu | 29 +++ projects/resources/cuda/other/b4_sync.cu | 29 +++ .../cuda/other/b5_default_nomanaged.cu | 29 +++ .../resources/cuda/other/b5_sync_nomanaged.cu | 29 +++ projects/resources/cuda/other/b9_default.cu | 29 +++ projects/resources/cuda/other/b9_sync.cu | 29 +++ projects/resources/cuda/utils.hpp | 29 +++ .../python/benchmark/bench/bench_1.py | 29 +++ .../python/benchmark/bench/bench_10.py | 29 +++ .../python/benchmark/bench/bench_2.py | 29 +++ .../python/benchmark/bench/bench_3.py | 29 +++ .../python/benchmark/bench/bench_4.py | 29 +++ .../python/benchmark/bench/bench_5.py | 29 +++ .../python/benchmark/bench/bench_6.py | 29 +++ .../python/benchmark/bench/bench_7.py | 29 +++ .../python/benchmark/bench/bench_8.py | 29 +++ .../python/benchmark/bench/bench_9.py | 29 +++ .../resources/python/benchmark/benchmark.py | 29 +++ .../python/benchmark/benchmark_main.py | 29 +++ .../benchmark/benchmark_nvprof_wrapper.py | 29 +++ .../python/benchmark/benchmark_result.py | 29 +++ .../python/benchmark/benchmark_wrapper.py | 29 +++ .../python/benchmark/generate_graphs.py | 29 +++ .../resources/python/examples/pipeline_1.py | 29 +++ .../resources/python/examples/pipeline_2.py | 29 +++ .../resources/python/examples/pipeline_3.py | 29 +++ projects/resources/python/other/images.py | 29 +++ .../resources/python/other/train_ensemble.py | 29 +++ .../compute_transfer_computation_overlap.py | 29 +++ .../resources/python/plotting/load_data.py | 29 +++ .../python/plotting/plot_memory_throughput.py | 29 +++ .../plotting/plot_memory_throughput_turing.py | 29 +++ .../python/plotting/plot_speedup_baseline.py | 29 +++ .../plotting/plot_speedup_grcuda_cuda.py | 29 +++ .../plotting/plot_theoretical_performance.py | 29 +++ .../plot_transfer_computation_overlap.py | 29 +++ .../resources/python/plotting/plot_utils.py | 29 +++ 265 files changed, 5117 insertions(+), 3286 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAThreadManagerMock.java delete mode 100644 projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAThreadManager.java delete mode 100644 projects/resources/cuda/old/b10.cuh delete mode 100644 projects/resources/cuda/old/b10_default.cu delete mode 100644 projects/resources/cuda/old/b10_sync.cu delete mode 100644 projects/resources/cuda/old/b1_default.cu delete mode 100644 projects/resources/cuda/old/b1_sync.cu delete mode 100644 projects/resources/cuda/old/b5.cuh delete mode 100644 projects/resources/cuda/old/b5_default.cu delete mode 100644 projects/resources/cuda/old/b5_sync.cu delete mode 100644 projects/resources/cuda/old/b6.cuh delete mode 100644 projects/resources/cuda/old/b6_default.cu delete mode 100644 projects/resources/cuda/old/b6_sync.cu delete mode 100644 projects/resources/cuda/old/b7.cuh delete mode 100644 projects/resources/cuda/old/b7_default.cu delete mode 100644 projects/resources/cuda/old/b7_sync.cu delete mode 100644 projects/resources/cuda/old/b8.cuh delete mode 100644 projects/resources/cuda/old/b8_default.cu delete mode 100644 projects/resources/cuda/old/b8_sync.cu delete mode 100644 projects/resources/cuda/old/b9.cuh delete mode 100644 projects/resources/cuda/old/options.hpp delete mode 100644 projects/resources/cuda/old/utils.hpp diff --git a/.gitmodules b/.gitmodules index 3ff476ae..2ce1f982 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "grcuda-data"] path = grcuda-data - url = https://github.com/AlbertoParravicini/grcuda-data.git + url = https://github.com/AlbertoParravicini/grcuda-data.git branch = master diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..494b7f92 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,63 @@ +# 2021-09-30, Release 1 + +## API Changes + +* Added option to specify arguments in NFI kernel signatures as `const` + * The effect is the same as marking them as `in` in the NIDL syntax + * It is not strictly required to have the corresponding arguments in the CUDA kernel marked as `const`, although that's recommended + * Marking arguments as `const` or `in` enables the async scheduler to overlap kernels that use the same read-only arguments + +## New asynchronous scheduler + +* Added a new asynchronous scheduler for GrCUDA, enable it with `--experimental-options --grcuda.ExecutionPolicy=async` + * With this scheduler, GPU kernels are executed asynchronously. Once they are launched, the host execution resumes immediately + * The computation is synchronized (i.e. the host thread is stalled and waits for the kernel to finish) only once GPU data are accessed by the host thread + * Execution of multiple kernels (operating on different data, e.g. distinct DeviceArrays) is overlapped using different streams + * Data transfer and execution (on different data, e.g. distinct DeviceArrays) is overlapped using different streams + * The scheduler supports different options, see `README.md` for the full list + * It is the scheduler presented in "DAG-based Scheduling with Resource Sharing for Multi-task Applications in a Polyglot GPU Runtime" (IPDPS 2021) + +* Enabled partial support for cuBLAS and cuML in the aync scheduler + * **Known limitation:** functions in these libraries work with the async scheduler, although they still run on the default stream (i.e. they are not asynchronous) + * They do benefit from prefetching +* Set TensorRT support to experimental + * TensorRT is currently not supported on CUDA 11.4, making it impossible to use along a recent version of cuML + * **Known limitation:** due to this incompatibility, TensorRT is currently not available on the async scheduler + +## New features + +* Added generic AbstractArray data structure, which is extended by DeviceArray, MultiDimDeviceArray, MultiDimDeviceArrayView, and provides high-level array interfaces +* Added API for prefetching + * If enabled (and using a GPU with architecture newer or equal than Pascal), it prefetches data to the GPU before executing a kernel, instead of relying on page-faults for data transfer. It can greatly improve performance +* Added API for stream attachment + * Always enabled in GPUs with with architecture older than Pascal, and the async scheduler is active. With the sync scheduler, it can be manually enabled + * It restricts the visibility of GPU data to the specified stream + * In architectures newer or equal than Pascal it can provide a small performance benefit +* Added `copyTo/copyFrom` functions on generic arrays (Truffle interoperable objects that expose the array API) + * Internally, the copy is implemented as a for loop, instead of using CUDA's `memcpy` + * It is still faster than copying using loops in the host languages, in many cases, and especially if host code is not JIT-ted + * It is also used for copying data to/from DeviceArrays with column-major layout, as `memcpy` cannot copy non-contiguous data + +## Demos, benchmarks and code samples + +* Added demo used at SeptembeRSE 2021 (`demos/image_pipeline_local` and `demos/image_pipeline_web`) + * It shows an image processing pipeline that applies a retro look to images. We have a local version and a web version that displays results a in web page +* Added benchmark suite written in Graalpython, used in "DAG-based Scheduling with Resource Sharing for Multi-task Applications in a Polyglot GPU Runtime" (IPDPS 2021) + * It is a collection of complex multi-kernel benchmarks meant to show the benefits of asynchronous scheduling. + +## Miscellaneosus + +* Added dependency to `grcuda-data` submodule, used to store data, results and plots used in publications and demos. +* Updated name "grCUDA" to "GrCUDA". It looks better, doesn't it? +* Added support for Java 11 along with Java 8 +* Added option to specify the location of cuBLAS and cuML with environment variables (`LIBCUBLAS_DIR` and `LIBCUML_DIR`) +* Refactored package hierarchy to reflect changes to current GrCUDA (e.g. `gpu -> runtime`) +* Added basic support for TruffleLogger +* Removed a number of existing deprecation warnings +* Added around 800 unit tests, with support for extensive parametrized testing and GPU mocking +* Updated documentation + * Bumped GraalVM version to 21.2 + * Added scripts to setup a new machine from scratch (e.g. on OCI), plus other OCI-specific utility scripts (see `oci_setup/`) + * Added documentation to setup IntelliJ Idea for GrCUDA development + * Added documentation about Python benchmark suite + * Added documentation on asynchronous scheduler options \ No newline at end of file diff --git a/LICENSE b/LICENSE index 7738aaf1..a19a3e92 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,6 @@ -Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. +Copyright (c) 2019, 2020, NVIDIA CORPORATION. All rights reserved. +Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -11,6 +13,12 @@ are met: * Neither the name of NVIDIA CORPORATION nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + * Neither the name of NECSTLab nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + * Neither the name of Politecnico di Milano nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/README.md b/README.md index 05a9c1a2..996ba238 100644 --- a/README.md +++ b/README.md @@ -282,12 +282,15 @@ graalpython -m ginstall install numpy; 4. **Run GrCUDA Unit tests** using -```bash +``` mx unittest com.nvidia # To run a specific test, you can use mx unittest com.nvidia.grcuda.test.BuildKernelTest#testBuildKernelwithNFILegacytSignature ``` +5. **Setup the grcuda-data sumbodule** +The `grcuda-data` repository is used as a `git` submodule to store data, results, and plots for demos, benchmarks, and publications. You will need this submodule to run the full benchmark suite, and some of the demos. To setup the submodule, follow this [`README`](https://github.com/AlbertoParravicini/grcuda-data/tree/master). + ### Setup your IDE To develop GrCUDA, you will greatly benefit from having an IDE that allows jumping between symbols and debugging individual tests. @@ -296,6 +299,7 @@ Here, we explain how to setup IntelliJ Idea. 1. `mx ideinit` from `$GRCUDA_HOME`, to setup the IDE 2. Open Idea and select *"open project"*, then open GrCUDA 3. See this [guide](https://github.com/graalvm/mx/blob/master/docs/IDE.md) to configure the syntax checker + * `File -> Settings -> Plugins -> Marketplace -> Search "Eclipse Code Formatter" and install it` 4. In IntelliJ Idea, install the Python plugin with `Settings -> Plugin -> Search "Python"`, then do `Project Structure -> SDKs -> Create a new Python 3.8 Virtual Environment`, it is used by `mx` 5. Select the right JVM. It should select automatically your `$JAVA_HOME`. Othewise, `Project Structures -> Modules -> Set the Module SDK (under Dependencies)` of `mx` and submodules to your Java SDK (e.g. `11`). You can pick either the `labsjdk` or `graalvm`. * This is also given by the `configure` option if you try to build the project in IntelliJ Idea before setting these options. Set your project Java SDK (e.g. `11`) for those missing modules @@ -304,16 +308,18 @@ Here, we explain how to setup IntelliJ Idea. a. For those packages (look at the log to find them), manually specify a more recent SDK (e.g. `11`) as you did in step above. If you get errors of missing symbols, follow IntelliJ's hints and export the requested packages - b. Remove the exports. `File -> Settings -> Build ... -> Java Compiler`, then remove all the `--export` flags. + b. Remove the exports. `File -> Settings -> Build ... -> Compiler -> Java Compiler`, then remove all the `--export` flags. 7. To run tests: a. Go to `Run (top bar) -> Edit Configurations -> Edit configuration templates -> Junit` b. (Not always necessary) By default, Idea should use your `env`. If not, make sure to have the same. Update the `PATH` variable so that it can find `nvcc`, and export `$GRAAL_HOME`. See `setup_machine_from_scratch.sh` to find all the environment variables. - c. Modify the template Junit test configuration adding `-Djava.library.path="$GRAAL_HOME/lib` (in Java 11) to the VM options to find `trufflenfi` + c. Modify the template Junit test configuration adding `-Djava.library.path="$GRAAL_HOME/lib"` (in Java 11) to the VM options to find `trufflenfi` d. In IntelliJ Idea, `Run -> Edit Configurations`. Create a new JUnit configuration set to `All in package` with `com.nvidia.grcuda` as module and `com.nvidia.grcuda.test` selected below. Add `-Djava.library.path="$GRAAL_HOME/lib"` (or your version of GraalVM) if it's not already in VM options. Specify the SDK by setting the GraalVM JRE in e.g. `$GRAAL_HOME`, if not specified already. + + e. If you change something in GrCUDA, rebuild it with `./install.sh` before running tests. That's because tests that use the GPU load the `.jar` in `$GRAAL_HOME`, which is updated by `./install.sh` ## Execute performance tests using Graalpython diff --git a/demos/image_pipeline_local/array_copy_performance_test.js b/demos/image_pipeline_local/array_copy_performance_test.js index 41cbedbb..bcec4c5e 100644 --- a/demos/image_pipeline_local/array_copy_performance_test.js +++ b/demos/image_pipeline_local/array_copy_performance_test.js @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + const System = Java.type("java.lang.System"); const cu = Polyglot.eval('grcuda', 'CU') const { assert } = require("console"); diff --git a/demos/image_pipeline_local/cuda/image_pipeline.cu b/demos/image_pipeline_local/cuda/image_pipeline.cu index 3cb839ef..10b86e02 100644 --- a/demos/image_pipeline_local/cuda/image_pipeline.cu +++ b/demos/image_pipeline_local/cuda/image_pipeline.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "image_pipeline.cuh" ////////////////////////////// diff --git a/demos/image_pipeline_local/cuda/image_pipeline.cuh b/demos/image_pipeline_local/cuda/image_pipeline.cuh index 8f85a301..519a8c2a 100644 --- a/demos/image_pipeline_local/cuda/image_pipeline.cuh +++ b/demos/image_pipeline_local/cuda/image_pipeline.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include #include diff --git a/demos/image_pipeline_local/cuda/main.cpp b/demos/image_pipeline_local/cuda/main.cpp index 8ba5fc6c..25910b34 100644 --- a/demos/image_pipeline_local/cuda/main.cpp +++ b/demos/image_pipeline_local/cuda/main.cpp @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include // For time() diff --git a/demos/image_pipeline_local/cuda/opencv_interface.cpp b/demos/image_pipeline_local/cuda/opencv_interface.cpp index 2a518d2d..613472f6 100644 --- a/demos/image_pipeline_local/cuda/opencv_interface.cpp +++ b/demos/image_pipeline_local/cuda/opencv_interface.cpp @@ -1,3 +1,31 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "opencv_interface.hpp" diff --git a/demos/image_pipeline_local/cuda/opencv_interface.hpp b/demos/image_pipeline_local/cuda/opencv_interface.hpp index 492d7f8c..17b36097 100644 --- a/demos/image_pipeline_local/cuda/opencv_interface.hpp +++ b/demos/image_pipeline_local/cuda/opencv_interface.hpp @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include #include diff --git a/demos/image_pipeline_local/cuda/options.hpp b/demos/image_pipeline_local/cuda/options.hpp index 76c7fa4d..3cc9a054 100644 --- a/demos/image_pipeline_local/cuda/options.hpp +++ b/demos/image_pipeline_local/cuda/options.hpp @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include diff --git a/demos/image_pipeline_local/cuda/utils.hpp b/demos/image_pipeline_local/cuda/utils.hpp index e0f1684e..225e41f7 100644 --- a/demos/image_pipeline_local/cuda/utils.hpp +++ b/demos/image_pipeline_local/cuda/utils.hpp @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include diff --git a/demos/image_pipeline_local/cuda_kernels.js b/demos/image_pipeline_local/cuda_kernels.js index 03d905f6..cdbac178 100644 --- a/demos/image_pipeline_local/cuda_kernels.js +++ b/demos/image_pipeline_local/cuda_kernels.js @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + GAUSSIAN_BLUR = ` extern "C" __global__ void gaussian_blur(const int *image, float *result, int rows, int cols, const float* kernel, int diameter) { extern __shared__ float kernel_local[]; diff --git a/demos/image_pipeline_local/image_pipeline.js b/demos/image_pipeline_local/image_pipeline.js index b44bc830..916068c6 100644 --- a/demos/image_pipeline_local/image_pipeline.js +++ b/demos/image_pipeline_local/image_pipeline.js @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + // Use Java System to measure time; const System = Java.type("java.lang.System"); // Load OpenCV; diff --git a/demos/image_pipeline_local/image_pipeline.py b/demos/image_pipeline_local/image_pipeline.py index 222ec395..1a67cbe5 100755 --- a/demos/image_pipeline_local/image_pipeline.py +++ b/demos/image_pipeline_local/image_pipeline.py @@ -1,3 +1,32 @@ +# Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # -*- coding: utf-8 -*- """ Created on Tue Jul 20 08:39:27 2021 diff --git a/demos/image_pipeline_web/backend/package.json b/demos/image_pipeline_web/backend/package.json index ca4c1eba..fa4dc130 100644 --- a/demos/image_pipeline_web/backend/package.json +++ b/demos/image_pipeline_web/backend/package.json @@ -8,8 +8,8 @@ "scripts": { "build": "tsc", "start": "tsc & node .", - "dev": "tsc -w & nodemon --polyglot --jvm --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.ExecutionPolicy=default dist/index.js 8080", - "runall": "node --polyglot --jvm --grcuda.EnableMultiGPU --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.ExecutionPolicy=sync dist/index.js 8080 2 & node --polyglot --jvm --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.EnableMultiGPU --grcuda.ExecutionPolicy=default --grcuda.ForceStreamAttach --grcuda.RetrieveNewStreamPolicy=always-new --grcuda.DependencyPolicy=with-const --grcuda.RetrieveParentStreamPolicy=disjoint --grcuda.InputPrefetch dist/index.js 8083 0 & node --polyglot --jvm --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.EnableMultiGPU --grcuda.ExecutionPolicy=default dist/index.js 8082 3" + "dev": "tsc -w & nodemon --polyglot --jvm --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.ExecutionPolicy=async dist/index.js 8080", + "runall": "node --polyglot --jvm --grcuda.EnableMultiGPU --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.ExecutionPolicy=sync dist/index.js 8080 2 & node --polyglot --jvm --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.EnableMultiGPU --grcuda.ExecutionPolicy=async --grcuda.ForceStreamAttach --grcuda.RetrieveNewStreamPolicy=always-new --grcuda.DependencyPolicy=with-const --grcuda.RetrieveParentStreamPolicy=disjoint --grcuda.InputPrefetch dist/index.js 8083 0 & node --polyglot --jvm --vm.Dtruffle.class.path.append=$GRAAL_HOME/languages/grcuda/grcuda.jar --experimental-options --grcuda.EnableMultiGPU --grcuda.ExecutionPolicy=sync dist/index.js 8082 3" }, "dependencies": { "express": "^4.17.1", diff --git a/demos/image_pipeline_web/backend/src/CudaKernels.ts b/demos/image_pipeline_web/backend/src/CudaKernels.ts index 5a5a6482..44f08227 100644 --- a/demos/image_pipeline_web/backend/src/CudaKernels.ts +++ b/demos/image_pipeline_web/backend/src/CudaKernels.ts @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + export const GAUSSIAN_BLUR = ` extern "C" __global__ void gaussian_blur(const int *image, float *result, int rows, int cols, const float* kernel, int diameter) { extern __shared__ float kernel_local[]; diff --git a/demos/image_pipeline_web/backend/src/GrCUDAProxy.ts b/demos/image_pipeline_web/backend/src/GrCUDAProxy.ts index f2574e54..4cc0787e 100644 --- a/demos/image_pipeline_web/backend/src/GrCUDAProxy.ts +++ b/demos/image_pipeline_web/backend/src/GrCUDAProxy.ts @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import WebSocket from 'ws' import { _sleep, @@ -156,7 +185,7 @@ export class GrCUDAProxy { const lut = cu.DeviceArray("int", CDEPTH); - // Initialize the right LUT; + // Load the right LUT; copyFrom(LUT[channel], lut); // Fill the image data; const s1 = System.nanoTime(); @@ -208,7 +237,6 @@ export class GrCUDAProxy { if (debug) console.log("--cuda time=" + _intervalToMs(start, end) + " ms"); const s2 = System.nanoTime(); img.set(image3); - //image3.copyTo(img, size * size); const e2 = System.nanoTime(); if (debug) console.log("--device array to image=" + _intervalToMs(s2, e2) + " ms"); @@ -266,8 +294,9 @@ export class GrCUDAProxy { } const endComputeAllImages = System.nanoTime() - - console.log(`[${this.computationType}] Whole computation took ${_intervalToMs(beginComputeAllImages, endComputeAllImages)}`) + const executionTime = _intervalToMs(beginComputeAllImages, endComputeAllImages) + this.communicateExecTime(executionTime, computationType) + console.log(`[${this.computationType}] Whole computation took ${executionTime}`) } /* @@ -307,8 +336,20 @@ export class GrCUDAProxy { const endComputeAllImages = System.nanoTime() this.communicateAll(MAX_PHOTOS, computationType) + const executionTime = _intervalToMs(beginComputeAllImages, endComputeAllImages) + this.communicateExecTime(executionTime, computationType) + + console.log(`[${this.computationType}] Whole computation took ${executionTime}`) + } + + private async communicateExecTime(executionTime: number, computationType: string) { + + this.ws.send(JSON.stringify({ + type: "time", + data: executionTime, + computationType + })) - console.log(`[${this.computationType}] Whole computation took ${_intervalToMs(beginComputeAllImages, endComputeAllImages)}`) } /* Mock the computation of the kernels @@ -337,10 +378,6 @@ export class GrCUDAProxy { } private communicateProgress(data: number, computationType: string) { - const { - MAX_PHOTOS - } = CONFIG_OPTIONS - this.ws.send(JSON.stringify({ type: "progress", data: data, diff --git a/demos/image_pipeline_web/backend/src/index.ts b/demos/image_pipeline_web/backend/src/index.ts index 1b0b638c..06751bd0 100644 --- a/demos/image_pipeline_web/backend/src/index.ts +++ b/demos/image_pipeline_web/backend/src/index.ts @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import express from 'express' import WebSocket from 'ws' import http from 'http' diff --git a/demos/image_pipeline_web/backend/src/options.ts b/demos/image_pipeline_web/backend/src/options.ts index ab6e57d8..968f709b 100644 --- a/demos/image_pipeline_web/backend/src/options.ts +++ b/demos/image_pipeline_web/backend/src/options.ts @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + export const MOCK_OPTIONS = { DELAY: 10, //ms DELAY_JITTER_SYNC: 30, //ms @@ -6,7 +35,7 @@ export const MOCK_OPTIONS = { } export const CONFIG_OPTIONS = { - MAX_PHOTOS: 60, + MAX_PHOTOS: 30, SEND_BATCH_SIZE: 1 } diff --git a/demos/image_pipeline_web/backend/src/utils.ts b/demos/image_pipeline_web/backend/src/utils.ts index f62a8679..a0178d6d 100644 --- a/demos/image_pipeline_web/backend/src/utils.ts +++ b/demos/image_pipeline_web/backend/src/utils.ts @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import cv from "opencv4nodejs" import fs from "fs" @@ -14,7 +43,6 @@ import { } from "./options" - export const _sleep = (ms: number) => { return new Promise((resolve) => { setTimeout(resolve, ms); diff --git a/demos/image_pipeline_web/frontend/index.html b/demos/image_pipeline_web/frontend/index.html index 2f0e4cd0..fe9b9d4d 100644 --- a/demos/image_pipeline_web/frontend/index.html +++ b/demos/image_pipeline_web/frontend/index.html @@ -5,7 +5,7 @@ - SeptemberRSE Demo - GrCUDA + GrCUDA@SeptemberRSE diff --git a/demos/image_pipeline_web/frontend/js/index.js b/demos/image_pipeline_web/frontend/js/index.js index 0bdf5174..8f53737f 100644 --- a/demos/image_pipeline_web/frontend/js/index.js +++ b/demos/image_pipeline_web/frontend/js/index.js @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + const websockets = { "sync": new WebSocket("ws://localhost:8080"), "async": new WebSocket("ws://localhost:8083"), @@ -83,7 +112,7 @@ for(const wsKey of Object.keys(websockets)) { processImageMessage(evt) } - if (data.type === "executionTime"){ + if (data.type === "time"){ processExecutionTimeMessage(evt) } }) @@ -176,7 +205,7 @@ const processExecutionTimeMessage = (evt) => { console.log(`${computationType} took: ${executionTime / 1000}s`) const formattedExecutionTime = executionTime / 1000 document.getElementById(`${labelMap[computationType]}-execution-time`).innerHTML = ` - Took ${formattedExecutionTime.toFixed(2)}s + took ${formattedExecutionTime.toFixed(2)}s ` } diff --git a/demos/image_pipeline_web/frontend/js/templates.js b/demos/image_pipeline_web/frontend/js/templates.js index 7667451a..8dd2fa00 100644 --- a/demos/image_pipeline_web/frontend/js/templates.js +++ b/demos/image_pipeline_web/frontend/js/templates.js @@ -1,3 +1,32 @@ +// Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + window.getHeader = (computationMode) => `

Computation Mode: ${computationMode}

` diff --git a/grcuda-data b/grcuda-data index b8081260..79045421 160000 --- a/grcuda-data +++ b/grcuda-data @@ -1 +1 @@ -Subproject commit b80812609e829930a2bfc894ee0e22b99f6a1297 +Subproject commit 790454218041b684a0c25d0e560bcb42618de7bb diff --git a/install.sh b/install.sh index 9f8622bb..16cdcd28 100755 --- a/install.sh +++ b/install.sh @@ -4,4 +4,4 @@ mx build; # Install for Java 8+; mkdir -p $GRAAL_HOME/jre/languages/grcuda; -cp mxbuild/dists/jdk1.8/grcuda.jar $GRAAL_HOME/languages/grcuda/.; +cp $GRCUDA_HOME/mxbuild/dists/jdk1.8/grcuda.jar $GRAAL_HOME/languages/grcuda/.; diff --git a/mx.grcuda/suite.py b/mx.grcuda/suite.py index b92d04e6..de661f2a 100644 --- a/mx.grcuda/suite.py +++ b/mx.grcuda/suite.py @@ -1,5 +1,5 @@ -# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. -# +# Copyright (c) 2021, NECSTLab, Politecnico di Milano. All rights reserved. + # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: @@ -8,10 +8,13 @@ # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# * Neither the name of NVIDIA CORPORATION nor the names of its +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. -# + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR diff --git a/oci_setup/oci_connect.sh b/oci_setup/oci_connect.sh index 022441ac..11f0055f 100755 --- a/oci_setup/oci_connect.sh +++ b/oci_setup/oci_connect.sh @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/bin/bash # Script used to connect to OCI instances. diff --git a/oci_setup/oci_setup_instance.py b/oci_setup/oci_setup_instance.py index 449a4d63..ae7c4461 100644 --- a/oci_setup/oci_setup_instance.py +++ b/oci_setup/oci_setup_instance.py @@ -1,4 +1,32 @@ - +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/oci_setup/oci_terminate_instance.sh b/oci_setup/oci_terminate_instance.sh index d709c1e9..ee81be56 100755 --- a/oci_setup/oci_terminate_instance.sh +++ b/oci_setup/oci_terminate_instance.sh @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/bin/bash # This script must be executed from the OCI console to terminate a running instance, diff --git a/oci_setup/setup_machine_from_scratch.sh b/oci_setup/setup_machine_from_scratch.sh index 6c7c7061..91f40170 100755 --- a/oci_setup/setup_machine_from_scratch.sh +++ b/oci_setup/setup_machine_from_scratch.sh @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/bin/bash # You can use this script to setup a clean machine with Ubuntu 20.04 to use GrCUDA. @@ -16,7 +45,8 @@ sudo apt upgrade -y sudo apt install build-essential -y sudo apt install lib32z1-dev -y sudo apt install unzip -y -sudo apt-get install -y python-ctypes +sudo apt install -y python-ctypes +sudo apt install -y curl # clone repositories (GraalVM, MX, GrCUDA). # We use the freely available GraalVM CE. diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindKernelTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindKernelTest.java index 1317e02c..a92db996 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindKernelTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindKernelTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindTest.java index 4c0e87b9..8a1a0987 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BindTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BuildKernelTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BuildKernelTest.java index ff278d01..73700ea3 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BuildKernelTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/BuildKernelTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/CUDAEventTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/CUDAEventTest.java index afe37832..61fa0fa3 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/CUDAEventTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/CUDAEventTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test; import com.nvidia.grcuda.test.util.GrCUDATestUtil; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/DeviceTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/DeviceTest.java index f6508809..0b7b82e6 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/DeviceTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/DeviceTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ManglingTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ManglingTest.java index c290f3e0..d7e947f6 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ManglingTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ManglingTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ParserTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ParserTest.java index c378cfda..9dab41d1 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ParserTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/ParserTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASTest.java index 325faecd..7ff1d2cd 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASWithScheduleTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASWithScheduleTest.java index edc33599..13581638 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASWithScheduleTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUBLASWithScheduleTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUMLTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUMLTest.java index 49f2368f..cf8c37c4 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUMLTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/cudalibraries/CUMLTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.cudalibraries; import com.nvidia.grcuda.runtime.executioncontext.ExecutionPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayCopyFunctionTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayCopyFunctionTest.java index d41b90ff..e3ec1bdf 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayCopyFunctionTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayCopyFunctionTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayFreeTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayFreeTest.java index 4597f30a..15ff44d7 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayFreeTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/DeviceArrayFreeTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/map/MapFunctionTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/map/MapFunctionTest.java index 5154e48e..b76f6a51 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/map/MapFunctionTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/functions/map/MapFunctionTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -9,7 +10,10 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of NVIDIA CORPORATION nor the names of its + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComplexExecutionDAGMockTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComplexExecutionDAGMockTest.java index 90e12611..d1f60133 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComplexExecutionDAGMockTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComplexExecutionDAGMockTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComputationArgumentTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComputationArgumentTest.java index 51d3c9fb..1c0f2fca 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComputationArgumentTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ComputationArgumentTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime; import com.nvidia.grcuda.runtime.computation.ComputationArgument; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/CreateStreamTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/CreateStreamTest.java index d37a4de0..38a9fef7 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/CreateStreamTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/CreateStreamTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime; import com.nvidia.grcuda.test.util.GrCUDATestUtil; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ExecutionDAGMockTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ExecutionDAGMockTest.java index e0e11ae1..15927049 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ExecutionDAGMockTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/ExecutionDAGMockTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/StreamAttachTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/StreamAttachTest.java index 2893b1b0..77c6cc09 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/StreamAttachTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/StreamAttachTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime; import com.nvidia.grcuda.test.util.GrCUDATestUtil; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/DeviceArrayTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/DeviceArrayTest.java index 150aac09..5355d5ae 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/DeviceArrayTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/DeviceArrayTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/MultiDimArrayTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/MultiDimArrayTest.java index d2ae1582..cead8aac 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/MultiDimArrayTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/array/MultiDimArrayTest.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextTest.java index a8cebd69..bd332f22 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime.executioncontext; import com.nvidia.grcuda.test.util.GrCUDATestOptionsStruct; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextWithConstDependencyTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextWithConstDependencyTest.java index 463d73d1..3456304b 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextWithConstDependencyTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/GrCUDAExecutionContextWithConstDependencyTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime.executioncontext; import com.nvidia.grcuda.test.util.GrCUDATestOptionsStruct; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/WithConstDependencyComputationTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/WithConstDependencyComputationTest.java index 29d98d63..9589def0 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/WithConstDependencyComputationTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/executioncontext/WithConstDependencyComputationTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime.executioncontext; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/stream/GrCUDAStreamManagerMockTest.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/stream/GrCUDAStreamManagerMockTest.java index 2b3e6b6a..78d923d8 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/stream/GrCUDAStreamManagerMockTest.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/runtime/stream/GrCUDAStreamManagerMockTest.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.runtime.stream; import com.nvidia.grcuda.runtime.executioncontext.ExecutionDAG; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestOptionsStruct.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestOptionsStruct.java index 12d62955..4294a893 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestOptionsStruct.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestOptionsStruct.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestUtil.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestUtil.java index e9b23d9f..e36b1e79 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestUtil.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/GrCUDATestUtil.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/TestLogHandler.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/TestLogHandler.java index c6788669..c5e5fad0 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/TestLogHandler.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/TestLogHandler.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util; import java.util.logging.Handler; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/ArgumentMock.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/ArgumentMock.java index 0da0adbc..93ee1cc5 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/ArgumentMock.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/ArgumentMock.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util.mock; import com.nvidia.grcuda.Type; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMock.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMock.java index 11a598d0..791de55a 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMock.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMock.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util.mock; import com.nvidia.grcuda.runtime.computation.streamattach.StreamAttachArchitecturePolicy; @@ -14,20 +44,17 @@ public class GrCUDAExecutionContextMock extends GrCUDAExecutionContext { public GrCUDAExecutionContextMock() { - super(null, null, - new GrCUDAStreamManagerMock(null), DependencyPolicyEnum.NO_CONST, PrefetcherEnum.NONE); + super(null, new GrCUDAStreamManagerMock(null), DependencyPolicyEnum.NO_CONST, PrefetcherEnum.NONE); } public GrCUDAExecutionContextMock(DependencyPolicyEnum dependencyPolicy) { - super(null, null, - new GrCUDAStreamManagerMock(null), dependencyPolicy, PrefetcherEnum.NONE); + super(null, new GrCUDAStreamManagerMock(null), dependencyPolicy, PrefetcherEnum.NONE); } public GrCUDAExecutionContextMock(DependencyPolicyEnum dependencyPolicy, - RetrieveNewStreamPolicyEnum retrieveStreamPolicy, - RetrieveParentStreamPolicyEnum parentStreamPolicyEnum) { - super(null, null, - new GrCUDAStreamManagerMock(null, retrieveStreamPolicy, parentStreamPolicyEnum), dependencyPolicy, PrefetcherEnum.NONE); + RetrieveNewStreamPolicyEnum retrieveStreamPolicy, + RetrieveParentStreamPolicyEnum parentStreamPolicyEnum) { + super(null, new GrCUDAStreamManagerMock(null, retrieveStreamPolicy, parentStreamPolicyEnum), dependencyPolicy, PrefetcherEnum.NONE); } public StreamAttachArchitecturePolicy getArrayStreamArchitecturePolicy() { diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMockBuilder.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMockBuilder.java index 3b162dc5..354cdce3 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMockBuilder.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAExecutionContextMockBuilder.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util.mock; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAStreamManagerMock.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAStreamManagerMock.java index 54a88ba4..91405e8e 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAStreamManagerMock.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAStreamManagerMock.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util.mock; import com.nvidia.grcuda.runtime.CUDARuntime; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAThreadManagerMock.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAThreadManagerMock.java deleted file mode 100644 index 4a15d69b..00000000 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/GrCUDAThreadManagerMock.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.nvidia.grcuda.test.util.mock; - -import com.nvidia.grcuda.GrCUDAThreadManager; - -public class GrCUDAThreadManagerMock extends GrCUDAThreadManager { - public GrCUDAThreadManagerMock(int numberOfThreads) { - super(null, numberOfThreads); - } - - @Override - protected Thread createJavaThread(Runnable runnable) { - Thread thread = new Thread(runnable); - toJoin.add(thread); - return thread; - } -} diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/KernelExecutionMock.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/KernelExecutionMock.java index 0f531b7b..3592b37e 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/KernelExecutionMock.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/KernelExecutionMock.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util.mock; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/SyncExecutionMock.java b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/SyncExecutionMock.java index a02200e3..870d2929 100644 --- a/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/SyncExecutionMock.java +++ b/projects/com.nvidia.grcuda.test/src/com/nvidia/grcuda/test/util/mock/SyncExecutionMock.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.test.util.mock; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/.checkstyle_checks.xml b/projects/com.nvidia.grcuda/.checkstyle_checks.xml index 55f06911..af15b5a1 100644 --- a/projects/com.nvidia.grcuda/.checkstyle_checks.xml +++ b/projects/com.nvidia.grcuda/.checkstyle_checks.xml @@ -1,31 +1,38 @@ diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Binding.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Binding.java index 790fb6c7..f44c1e6a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Binding.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Binding.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/CUDAEvent.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/CUDAEvent.java index 594285cc..602b7853 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/CUDAEvent.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/CUDAEvent.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda; import com.oracle.truffle.api.interop.InteropLibrary; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/FunctionBinding.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/FunctionBinding.java index f92cd355..f58c6160 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/FunctionBinding.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/FunctionBinding.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GPUPointer.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GPUPointer.java index a86834ba..bbbb62de 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GPUPointer.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GPUPointer.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. - * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAContext.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAContext.java index 513b1029..6e30182c 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAContext.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAContext.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAException.java index 611db0d9..5f74e421 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAException.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAInternalException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAInternalException.java index 4b7af1b3..0ffb0574 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAInternalException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAInternalException.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDALanguage.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDALanguage.java index 063f7866..568f58a3 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDALanguage.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDALanguage.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAOptions.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAOptions.java index a8aa3d06..9fd1483a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAOptions.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAOptions.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAThreadManager.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAThreadManager.java deleted file mode 100644 index 6189742b..00000000 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/GrCUDAThreadManager.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.nvidia.grcuda; - -import java.util.Collection; -import java.util.LinkedList; -import java.util.List; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.Future; -import java.util.concurrent.FutureTask; -import java.util.concurrent.TimeUnit; - -public class GrCUDAThreadManager { - - private final ExecutorService threadPool; - private final GrCUDAContext context; - protected final List toJoin; - - public GrCUDAThreadManager(GrCUDAContext context) { - this(context, context.getNumberOfThreads()); - } - - public GrCUDAThreadManager(GrCUDAContext context, int numberOfThreads) { - this.toJoin = new LinkedList<>(); - this.context = context; - this.threadPool = Executors.newFixedThreadPool(numberOfThreads, this::createJavaThread); - } - - protected Thread createJavaThread(Runnable runnable) { - Thread thread = context.getEnv().createThread(runnable, context.getEnv().getContext()); - toJoin.add(thread); - System.out.println("-- created thread " + thread); - return thread; - } - - public void submitRunnable(Runnable task) { - threadPool.submit(task); - } - - public Future submitCallable(Callable task) { - return threadPool.submit(task); - } - - public void submitTask(FutureTask task) { - threadPool.submit(task); - } - - public List getResults(Collection> futures) { - List results = new LinkedList<>(); - futures.forEach(f -> { - try { - results.add(f.get()); - } catch (InterruptedException | ExecutionException e) { - System.out.println("Failed to get result of future, exception: " + e); - e.printStackTrace(); - } - }); - return results; - } - - public ExecutorService getThreadPool() { - return threadPool; - } - - public void finalizeManager() { - if (threadPool == null) - return; -// System.out.println("closing GrCUDA thread manager..."); - threadPool.shutdown(); - try { - if (!threadPool.awaitTermination(60, TimeUnit.SECONDS)) { - threadPool.shutdownNow(); - } - threadPool.awaitTermination(60, TimeUnit.SECONDS); - - for (Thread t : toJoin) { - t.join(); - } - - } catch (InterruptedException ie) { - threadPool.shutdownNow(); - Thread.currentThread().interrupt(); - } -// System.out.println("closed GrCUDA thread manager"); - } -} \ No newline at end of file diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/KernelBinding.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/KernelBinding.java index 1f83ce72..2ad67c35 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/KernelBinding.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/KernelBinding.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/MemberSet.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/MemberSet.java index 665cf8f5..9b4bdba4 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/MemberSet.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/MemberSet.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda; import com.oracle.truffle.api.CompilerDirectives; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Namespace.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Namespace.java index 74475e7d..009b5a2a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Namespace.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Namespace.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/NoneValue.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/NoneValue.java index c78502f0..7a911023 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/NoneValue.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/NoneValue.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Type.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Type.java index 3ec614fb..9aa500d1 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Type.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/Type.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/TypeException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/TypeException.java index 938e8350..ce3b6b27 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/TypeException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/TypeException.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/CUDALibraryFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/CUDALibraryFunction.java index c88c4f52..46ea1179 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/CUDALibraryFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/CUDALibraryFunction.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.cudalibraries; import com.nvidia.grcuda.runtime.computation.ComputationArgument; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cublas/CUBLASRegistry.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cublas/CUBLASRegistry.java index 6e673270..eab6b606 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cublas/CUBLASRegistry.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cublas/CUBLASRegistry.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -56,7 +63,7 @@ import com.oracle.truffle.api.interop.UnsupportedTypeException; public class CUBLASRegistry { - public static final String DEFAULT_LIBRARY = "libcublas.so"; + public static final String DEFAULT_LIBRARY = (System.getenv("LIBCUBLAS_DIR") != null ? System.getenv("LIBCUBLAS_DIR") : "") + "libcublas.so"; public static final String DEFAULT_LIBRARY_HINT = " (CuBLAS library location can be set via the --grcuda.CuBLASLibrary= option. " + "CuBLAS support can be disabled via --grcuda.CuBLASEnabled=false."; public static final String NAMESPACE = "BLAS"; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cuml/CUMLRegistry.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cuml/CUMLRegistry.java index efa2a4c0..b22a8e18 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cuml/CUMLRegistry.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/cuml/CUMLRegistry.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/tensorrt/TensorRTRegistry.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/tensorrt/TensorRTRegistry.java index 2ae2177c..5d7c6cf3 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/tensorrt/TensorRTRegistry.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/cudalibraries/tensorrt/TensorRTRegistry.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindAllFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindAllFunction.java index cafdd9ff..4c71810d 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindAllFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindAllFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindFunction.java index 5fd29134..1a2232b0 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindKernelFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindKernelFunction.java index d28e2476..b8d29a4b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindKernelFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BindKernelFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BuildKernelFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BuildKernelFunction.java index 4ed8d875..f7f20d80 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BuildKernelFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/BuildKernelFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/CUDAFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/CUDAFunction.java index 2ef0dc3c..01e509a9 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/CUDAFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/CUDAFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayCopyFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayCopyFunction.java index c168789e..be481bc5 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayCopyFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayCopyFunction.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayFunction.java index e04f5507..cd1f4adb 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/DeviceArrayFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunction.java index 282f8be7..2f868ae8 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunctionFactory.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunctionFactory.java index 3c53fb92..f46ba065 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunctionFactory.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/ExternalFunctionFactory.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/Function.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/Function.java index 0bce259c..47240c2d 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/Function.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/Function.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDeviceFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDeviceFunction.java index efe6d49c..47713dd7 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDeviceFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDeviceFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDevicesFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDevicesFunction.java index a50072ef..02161a15 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDevicesFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/GetDevicesFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/HostFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/HostFunction.java index 99e31573..ac88e877 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/HostFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/HostFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/MapDeviceArrayFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/MapDeviceArrayFunction.java index 9ca0d473..0f721849 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/MapDeviceArrayFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/MapDeviceArrayFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedDeviceArrayFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedDeviceArrayFunction.java index 14f33426..7c140648 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedDeviceArrayFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedDeviceArrayFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedMapDeviceArrayFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedMapDeviceArrayFunction.java index 6a8cf874..0cfc56db 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedMapDeviceArrayFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/TypedMapDeviceArrayFunction.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ArgumentSet.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ArgumentSet.java index e453ea82..7c3830cf 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ArgumentSet.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ArgumentSet.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapArgObject.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapArgObject.java index a3605fa4..0dc9b6d9 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapArgObject.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapArgObject.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapFunction.java index 5bdbcbd2..3c4f8bec 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MapFunction.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MappedFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MappedFunction.java index d1f58660..58732f94 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MappedFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/MappedFunction.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShredFunction.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShredFunction.java index 9eb3d291..8265030f 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShredFunction.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShredFunction.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShreddedObject.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShreddedObject.java index a46a3c10..1fae527a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShreddedObject.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/functions/map/ShreddedObject.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArithmeticNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArithmeticNode.java index 3986f6c6..7fde8576 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArithmeticNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArithmeticNode.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArrayNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArrayNode.java index b5edc822..b5bb8916 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArrayNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ArrayNode.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/BinaryNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/BinaryNode.java index 5a32f425..b624fd9d 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/BinaryNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/BinaryNode.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,7 +32,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.nvidia.grcuda.nodes; public abstract class BinaryNode extends ExpressionNode { diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/CallNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/CallNode.java index 29b94392..3c306e5a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/CallNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/CallNode.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ExpressionNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ExpressionNode.java index b5ff75b9..0c44600a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ExpressionNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/ExpressionNode.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/GrCUDARootNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/GrCUDARootNode.java index 2b4816dc..01a8795b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/GrCUDARootNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/GrCUDARootNode.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IdentifierNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IdentifierNode.java index 4a5f397c..36187f2e 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IdentifierNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IdentifierNode.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IntegerLiteral.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IntegerLiteral.java index a57399c0..b22f2b1e 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IntegerLiteral.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/IntegerLiteral.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/RootNamespaceNode.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/RootNamespaceNode.java index fa034924..8b1b0c57 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/RootNamespaceNode.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/RootNamespaceNode.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/StringLiteral.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/StringLiteral.java index 993f4f03..56ef1f14 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/StringLiteral.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/nodes/StringLiteral.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/GrCUDAParserException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/GrCUDAParserException.java index d98aad20..78d835e5 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/GrCUDAParserException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/GrCUDAParserException.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NIDLParserException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NIDLParserException.java index 0aab6f91..f56991d2 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NIDLParserException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NIDLParserException.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NodeFactory.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NodeFactory.java index a79cbe7d..6d2eacba 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NodeFactory.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/NodeFactory.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/ParserAntlr.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/ParserAntlr.java index 08594c29..aeb11fab 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/ParserAntlr.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/ParserAntlr.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/GrCUDA.g4 b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/GrCUDA.g4 index c1c00e91..add3aec2 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/GrCUDA.g4 +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/GrCUDA.g4 @@ -1,5 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/NIDL.g4 b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/NIDL.g4 index 93ed0abc..f7dafa55 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/NIDL.g4 +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/parser/antlr/NIDL.g4 @@ -1,5 +1,6 @@ /* * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/CUDARuntime.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/CUDARuntime.java index 5466e999..00faffd1 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/CUDARuntime.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/CUDARuntime.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/ConfiguredKernel.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/ConfiguredKernel.java index ab5d09d6..af119960 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/ConfiguredKernel.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/ConfiguredKernel.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Device.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Device.java index 0f3b6c53..b7a32bb9 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Device.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Device.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DeviceList.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DeviceList.java index d57c44b9..0db4bba9 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DeviceList.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DeviceList.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DriverAPIErrorMessages.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DriverAPIErrorMessages.java index 2a5e85cd..2ee630b8 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DriverAPIErrorMessages.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/DriverAPIErrorMessages.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/GPUDeviceProperties.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/GPUDeviceProperties.java index 6fe03a59..f1d0af7b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/GPUDeviceProperties.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/GPUDeviceProperties.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Kernel.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Kernel.java index 679cb85c..70fdb393 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Kernel.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/Kernel.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelArguments.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelArguments.java index ca84eab7..d39a1750 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelArguments.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelArguments.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime; import com.nvidia.grcuda.runtime.computation.ComputationArgument; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfig.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfig.java index 8c563355..d0eca94a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfig.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfig.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfigBuilder.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfigBuilder.java index fe7d7575..28fb59ee 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfigBuilder.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/KernelConfigBuilder.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime; import com.nvidia.grcuda.runtime.stream.CUDAStream; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LazyKernel.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LazyKernel.java index 7be7d239..cb2c2a15 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LazyKernel.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LazyKernel.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LittleEndianNativeArrayView.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LittleEndianNativeArrayView.java index 9c26c70a..d316aa81 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LittleEndianNativeArrayView.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/LittleEndianNativeArrayView.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRTCException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRTCException.java index 518e221a..289ab369 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRTCException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRTCException.java @@ -1,5 +1,6 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -12,6 +13,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRuntimeCompiler.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRuntimeCompiler.java index 34f0c7ac..88baf0e3 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRuntimeCompiler.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/NVRuntimeCompiler.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/OffheapMemory.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/OffheapMemory.java index 15919afa..4fd8bd93 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/OffheapMemory.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/OffheapMemory.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/UnsafeHelper.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/UnsafeHelper.java index dd7754cb..9e4be571 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/UnsafeHelper.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/UnsafeHelper.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/AbstractArray.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/AbstractArray.java index fc9d88ef..b06da3be 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/AbstractArray.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/AbstractArray.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.array; import com.nvidia.grcuda.GrCUDAException; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/DeviceArray.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/DeviceArray.java index 21889177..730e3673 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/DeviceArray.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/DeviceArray.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. - * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArray.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArray.java index 4ef0bec8..231cae49 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArray.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArray.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArrayView.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArrayView.java index febbe465..156b3b89 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArrayView.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/array/MultiDimDeviceArrayView.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/CUDALibraryExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/CUDALibraryExecution.java index 458b0d32..ae9cb775 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/CUDALibraryExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/CUDALibraryExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation; import com.nvidia.grcuda.functions.Function; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgument.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgument.java index bf8913db..0f996ce0 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgument.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgument.java @@ -1,6 +1,7 @@ /* * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -13,6 +14,12 @@ * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgumentWithValue.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgumentWithValue.java index 900414e4..f66d70b7 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgumentWithValue.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/ComputationArgumentWithValue.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation; import com.nvidia.grcuda.Type; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/GrCUDAComputationalElement.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/GrCUDAComputationalElement.java index bd2bad25..8964b2bd 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/GrCUDAComputationalElement.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/GrCUDAComputationalElement.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation; import com.nvidia.grcuda.CUDAEvent; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/InitializeDependencyList.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/InitializeDependencyList.java index b430bc6c..e5c96488 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/InitializeDependencyList.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/InitializeDependencyList.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation; import java.util.List; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/KernelExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/KernelExecution.java index a4aedde6..a05843f2 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/KernelExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/KernelExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation; import com.nvidia.grcuda.NoneValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecution.java index 7506758d..2c236375 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.runtime.array.AbstractArray; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecutionInitializer.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecutionInitializer.java index c71b1771..14c359c8 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecutionInitializer.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayAccessExecutionInitializer.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.Type; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecution.java index 73fb61a1..c44dd59a 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.NoneValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionDefault.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionDefault.java index 28065ef1..383f2db9 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionDefault.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionDefault.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.runtime.array.AbstractArray; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionInitializer.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionInitializer.java index 0e4f3bab..25086ee6 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionInitializer.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionInitializer.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.Type; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionMemcpy.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionMemcpy.java index 7b2d98ca..56aa4d81 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionMemcpy.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/ArrayCopyFunctionExecutionMemcpy.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.runtime.array.AbstractArray; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayCopyException.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayCopyException.java index 5c2d95c1..0dd285c6 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayCopyException.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayCopyException.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.oracle.truffle.api.exception.AbstractTruffleException; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayReadExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayReadExecution.java index 48fbf2f1..eff62f5d 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayReadExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayReadExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.runtime.array.DeviceArray; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayWriteExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayWriteExecution.java index a26deb1f..a8f24924 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayWriteExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/DeviceArrayWriteExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.NoneValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewReadExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewReadExecution.java index 90f049da..41925835 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewReadExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewReadExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.runtime.array.MultiDimDeviceArrayView; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewWriteExecution.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewWriteExecution.java index e49b6dcd..90d0e9b3 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewWriteExecution.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/arraycomputation/MultiDimDeviceArrayViewWriteExecution.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.arraycomputation; import com.nvidia.grcuda.NoneValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputation.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputation.java index 581b2cd8..b4a1ede5 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputation.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputation.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputationBuilder.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputationBuilder.java index f0380ba6..49b19915 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputationBuilder.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DefaultDependencyComputationBuilder.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputation.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputation.java index 3efc6c97..d610a780 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputation.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputation.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputationBuilder.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputationBuilder.java index d94bb56e..1b02cce8 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputationBuilder.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyComputationBuilder.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyPolicyEnum.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyPolicyEnum.java index 785f9684..868e133b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyPolicyEnum.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/DependencyPolicyEnum.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; public enum DependencyPolicyEnum { diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputation.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputation.java index 6c3f29bd..2b25ef53 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputation.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputation.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputationBuilder.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputationBuilder.java index 1a2f4ebc..80c74245 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputationBuilder.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/dependency/WithConstDependencyComputationBuilder.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.dependency; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/AbstractArrayPrefetcher.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/AbstractArrayPrefetcher.java index e07da888..e3a5aa28 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/AbstractArrayPrefetcher.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/AbstractArrayPrefetcher.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.prefetch; import com.nvidia.grcuda.runtime.CUDARuntime; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/DefaultArrayPrefetcher.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/DefaultArrayPrefetcher.java index ea8c424d..2b954917 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/DefaultArrayPrefetcher.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/DefaultArrayPrefetcher.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.prefetch; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/NoneArrayPrefetcher.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/NoneArrayPrefetcher.java index 3cc5c443..0aeac116 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/NoneArrayPrefetcher.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/NoneArrayPrefetcher.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.prefetch; import com.nvidia.grcuda.runtime.CUDARuntime; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/PrefetcherEnum.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/PrefetcherEnum.java index dd843d92..d838a44b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/PrefetcherEnum.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/PrefetcherEnum.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.prefetch; public enum PrefetcherEnum { diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/SyncArrayPrefetcher.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/SyncArrayPrefetcher.java index 3a966b8a..b63f8206 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/SyncArrayPrefetcher.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/prefetch/SyncArrayPrefetcher.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.prefetch; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PostPascalStreamAttachPolicy.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PostPascalStreamAttachPolicy.java index d4413edb..9461aed8 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PostPascalStreamAttachPolicy.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PostPascalStreamAttachPolicy.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.streamattach; import com.nvidia.grcuda.runtime.stream.CUDAStream; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PrePascalStreamAttachPolicy.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PrePascalStreamAttachPolicy.java index 49f9dfd3..84fbd760 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PrePascalStreamAttachPolicy.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/PrePascalStreamAttachPolicy.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.streamattach; import com.nvidia.grcuda.runtime.computation.GrCUDAComputationalElement; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/StreamAttachArchitecturePolicy.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/StreamAttachArchitecturePolicy.java index 80e70850..af68b759 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/StreamAttachArchitecturePolicy.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/computation/streamattach/StreamAttachArchitecturePolicy.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.computation.streamattach; import com.nvidia.grcuda.runtime.computation.GrCUDAComputationalElement; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/AbstractGrCUDAExecutionContext.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/AbstractGrCUDAExecutionContext.java index 19a2c3b8..08a5571f 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/AbstractGrCUDAExecutionContext.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/AbstractGrCUDAExecutionContext.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.executioncontext; import com.nvidia.grcuda.Binding; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionDAG.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionDAG.java index c4baf5e7..209e1718 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionDAG.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionDAG.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.executioncontext; import com.nvidia.grcuda.runtime.computation.ComputationArgumentWithValue; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionPolicyEnum.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionPolicyEnum.java index deff0b6b..97b46da9 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionPolicyEnum.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/ExecutionPolicyEnum.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.executioncontext; public enum ExecutionPolicyEnum { diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/GrCUDAExecutionContext.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/GrCUDAExecutionContext.java index a8c800c3..08af2b0b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/GrCUDAExecutionContext.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/GrCUDAExecutionContext.java @@ -1,7 +1,36 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.executioncontext; import com.nvidia.grcuda.GrCUDAContext; -import com.nvidia.grcuda.GrCUDAThreadManager; import com.nvidia.grcuda.runtime.CUDARuntime; import com.nvidia.grcuda.runtime.computation.GrCUDAComputationalElement; import com.nvidia.grcuda.runtime.computation.dependency.DependencyPolicyEnum; @@ -23,19 +52,19 @@ public class GrCUDAExecutionContext extends AbstractGrCUDAExecutionContext { private final GrCUDAStreamManager streamManager; public GrCUDAExecutionContext(GrCUDAContext context, TruffleLanguage.Env env, DependencyPolicyEnum dependencyPolicy, PrefetcherEnum inputPrefetch) { - this(new CUDARuntime(context, env), new GrCUDAThreadManager(context), dependencyPolicy, inputPrefetch); + this(new CUDARuntime(context, env), dependencyPolicy, inputPrefetch); } - public GrCUDAExecutionContext(CUDARuntime cudaRuntime, GrCUDAThreadManager threadManager, DependencyPolicyEnum dependencyPolicy, PrefetcherEnum inputPrefetch) { - this(cudaRuntime, threadManager, new GrCUDAStreamManager(cudaRuntime), dependencyPolicy, inputPrefetch); + public GrCUDAExecutionContext(CUDARuntime cudaRuntime, DependencyPolicyEnum dependencyPolicy, PrefetcherEnum inputPrefetch) { + this(cudaRuntime, new GrCUDAStreamManager(cudaRuntime), dependencyPolicy, inputPrefetch); } - public GrCUDAExecutionContext(CUDARuntime cudaRuntime, GrCUDAThreadManager threadManager, GrCUDAStreamManager streamManager, DependencyPolicyEnum dependencyPolicy) { + public GrCUDAExecutionContext(CUDARuntime cudaRuntime, GrCUDAStreamManager streamManager, DependencyPolicyEnum dependencyPolicy) { super(cudaRuntime, dependencyPolicy, PrefetcherEnum.NONE, ExecutionPolicyEnum.ASYNC); this.streamManager = streamManager; } - public GrCUDAExecutionContext(CUDARuntime cudaRuntime, GrCUDAThreadManager threadManager, GrCUDAStreamManager streamManager, DependencyPolicyEnum dependencyPolicy, PrefetcherEnum inputPrefetch) { + public GrCUDAExecutionContext(CUDARuntime cudaRuntime, GrCUDAStreamManager streamManager, DependencyPolicyEnum dependencyPolicy, PrefetcherEnum inputPrefetch) { super(cudaRuntime, dependencyPolicy, inputPrefetch, ExecutionPolicyEnum.ASYNC); this.streamManager = streamManager; } diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/KeepDependency.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/KeepDependency.java index ad7405f6..50763ba0 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/KeepDependency.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/KeepDependency.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.executioncontext; import java.util.Set; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/SyncGrCUDAExecutionContext.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/SyncGrCUDAExecutionContext.java index 24307271..96d537a1 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/SyncGrCUDAExecutionContext.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/executioncontext/SyncGrCUDAExecutionContext.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.executioncontext; import com.nvidia.grcuda.GrCUDAContext; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/CUDAStream.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/CUDAStream.java index e794d629..24a2fa7f 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/CUDAStream.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/CUDAStream.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; import com.nvidia.grcuda.GPUPointer; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/DefaultStream.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/DefaultStream.java index 43a49ae3..33e7790b 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/DefaultStream.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/DefaultStream.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; public class DefaultStream extends CUDAStream { diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/GrCUDAStreamManager.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/GrCUDAStreamManager.java index 27b761fd..c7a72bdb 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/GrCUDAStreamManager.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/GrCUDAStreamManager.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; import com.nvidia.grcuda.CUDAEvent; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStream.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStream.java index 26872fb9..6142f851 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStream.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStream.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; import java.util.Collection; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStreamPolicyEnum.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStreamPolicyEnum.java index dceda34a..6bc04d9e 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStreamPolicyEnum.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveNewStreamPolicyEnum.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; public enum RetrieveNewStreamPolicyEnum { diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStream.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStream.java index f4145526..dbb0807e 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStream.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStream.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; import com.nvidia.grcuda.runtime.executioncontext.ExecutionDAG; diff --git a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStreamPolicyEnum.java b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStreamPolicyEnum.java index da78474f..3b5a458f 100644 --- a/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStreamPolicyEnum.java +++ b/projects/com.nvidia.grcuda/src/com/nvidia/grcuda/runtime/stream/RetrieveParentStreamPolicyEnum.java @@ -1,3 +1,33 @@ +/* + * Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of NECSTLab nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * * Neither the name of Politecnico di Milano nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ package com.nvidia.grcuda.runtime.stream; public enum RetrieveParentStreamPolicyEnum { diff --git a/projects/resources/cuda/Makefile b/projects/resources/cuda/Makefile index 46f96f4d..4c241e1f 100644 --- a/projects/resources/cuda/Makefile +++ b/projects/resources/cuda/Makefile @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # Use NVCC; CXX=nvcc FLAGS = -std=c++11 -O3 -arch=sm_70 diff --git a/projects/resources/cuda/b1.cu b/projects/resources/cuda/b1.cu index 54980282..23e412f7 100644 --- a/projects/resources/cuda/b1.cu +++ b/projects/resources/cuda/b1.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "b1.cuh" ////////////////////////////// diff --git a/projects/resources/cuda/b1.cuh b/projects/resources/cuda/b1.cuh index ec61203d..a0ab51f1 100644 --- a/projects/resources/cuda/b1.cuh +++ b/projects/resources/cuda/b1.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include "benchmark.cuh" diff --git a/projects/resources/cuda/b10.cu b/projects/resources/cuda/b10.cu index b9f89834..f348553e 100644 --- a/projects/resources/cuda/b10.cu +++ b/projects/resources/cuda/b10.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "b10.cuh" ////////////////////////////// diff --git a/projects/resources/cuda/b10.cuh b/projects/resources/cuda/b10.cuh index 0adc335d..359ac3b3 100644 --- a/projects/resources/cuda/b10.cuh +++ b/projects/resources/cuda/b10.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include "benchmark.cuh" diff --git a/projects/resources/cuda/b5.cu b/projects/resources/cuda/b5.cu index 894f84c7..cb8db294 100644 --- a/projects/resources/cuda/b5.cu +++ b/projects/resources/cuda/b5.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "b5.cuh" ////////////////////////////// diff --git a/projects/resources/cuda/b5.cuh b/projects/resources/cuda/b5.cuh index c7f9aea9..ccfe3b30 100644 --- a/projects/resources/cuda/b5.cuh +++ b/projects/resources/cuda/b5.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include "benchmark.cuh" diff --git a/projects/resources/cuda/b6.cu b/projects/resources/cuda/b6.cu index 29a62446..ac3be5b9 100644 --- a/projects/resources/cuda/b6.cu +++ b/projects/resources/cuda/b6.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "b6.cuh" ////////////////////////////// diff --git a/projects/resources/cuda/b6.cuh b/projects/resources/cuda/b6.cuh index 310c0582..2a5dc90b 100644 --- a/projects/resources/cuda/b6.cuh +++ b/projects/resources/cuda/b6.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include "benchmark.cuh" diff --git a/projects/resources/cuda/b7.cu b/projects/resources/cuda/b7.cu index 511d0a11..4e7ee295 100644 --- a/projects/resources/cuda/b7.cu +++ b/projects/resources/cuda/b7.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "b7.cuh" ////////////////////////////// diff --git a/projects/resources/cuda/b7.cuh b/projects/resources/cuda/b7.cuh index 9d869e03..f4483019 100644 --- a/projects/resources/cuda/b7.cuh +++ b/projects/resources/cuda/b7.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include diff --git a/projects/resources/cuda/b8.cu b/projects/resources/cuda/b8.cu index f36858d9..b24dfca7 100644 --- a/projects/resources/cuda/b8.cu +++ b/projects/resources/cuda/b8.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "b8.cuh" ////////////////////////////// diff --git a/projects/resources/cuda/b8.cuh b/projects/resources/cuda/b8.cuh index 85f59391..beab9ec0 100644 --- a/projects/resources/cuda/b8.cuh +++ b/projects/resources/cuda/b8.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include "benchmark.cuh" diff --git a/projects/resources/cuda/benchmark.cu b/projects/resources/cuda/benchmark.cu index 4c9bfcb3..95823fb5 100644 --- a/projects/resources/cuda/benchmark.cu +++ b/projects/resources/cuda/benchmark.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "benchmark.cuh" namespace chrono = std::chrono; diff --git a/projects/resources/cuda/benchmark.cuh b/projects/resources/cuda/benchmark.cuh index e4928682..e547acfb 100644 --- a/projects/resources/cuda/benchmark.cuh +++ b/projects/resources/cuda/benchmark.cuh @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include #include diff --git a/projects/resources/cuda/main.cu b/projects/resources/cuda/main.cu index 6c8500d1..781e06f5 100644 --- a/projects/resources/cuda/main.cu +++ b/projects/resources/cuda/main.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include // For time() diff --git a/projects/resources/cuda/old/b10.cuh b/projects/resources/cuda/old/b10.cuh deleted file mode 100644 index 6e4683c3..00000000 --- a/projects/resources/cuda/old/b10.cuh +++ /dev/null @@ -1,124 +0,0 @@ -#pragma once - - -#define NUM_THREADS_PER_BLOCK_2D 8 -#define NUM_THREADS_PER_BLOCK 32 -#define WARP_SIZE 32 -#define NUM_BLOCKS 16 - -extern "C" __global__ void conv2d(float *out, float *x, float *kernels, int N, int M, int L, int K, int k_out, int stride) { - extern __shared__ float kernel_local[]; - int radius = K / 2; - - for (int m = 0; m < k_out; m++) { - for (int i = threadIdx.x; i < K; i += blockDim.x) { - for (int j = threadIdx.y; j < K; j += blockDim.y) { - for (int l = 0; l < L; l++) { - kernel_local[l + L * (j + K * (i + K * m))] = kernels[l + L * (j + K * (i + K * m))]; - } - } - } - } - __syncthreads(); - - - for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (int) ceilf((float) N / stride) - radius; i += blockDim.x * gridDim.x) { - int out_index = M * i / stride; - for (int j = blockIdx.y * blockDim.y + threadIdx.y; j < (int) ceilf((float) M / stride) - radius; j += blockDim.y * gridDim.y) { - for (int m = 0; m < k_out; m++) { - // for (int m = blockIdx.z * blockDim.z + threadIdx.z; m < k_out; m += blockDim.z * gridDim.z) { - float res = 0; - int i_f = i * stride + radius; - int j_f = j * stride + radius; - for (int k_i = -radius; k_i <= radius; k_i++) { - for (int k_j = -radius; k_j <= radius; k_j++) { - int kernel_index = (k_j + radius + K * (k_i + radius + K * m)); - for (int l = 0; l < L; l++) { - int ni = i_f + k_i; - int nj = j_f + k_j; - res += kernel_local[l + L * kernel_index] * x[((ni * M) + nj) * L + l]; - } - } - } - // Apply ReLU operator; - out[m + k_out * (j + out_index)] = max(res, 0.0); - } - } - } -} - -extern "C" __global__ void mean_pooling(float *out, float *x, int N, int M, int L, int K, int stride) { - int radius = K / 2; - for (int i = blockIdx.x * blockDim.x + threadIdx.x; i < (int) ceilf((float) N / stride) - radius; i += blockDim.x * gridDim.x) { - int out_index = M * i / stride; - int i_f = i * stride + radius; - for (int j = blockIdx.y * blockDim.y + threadIdx.y; j < (int) ceilf((float) M / stride) - radius; j += blockDim.y * gridDim.y) { - int j_f = j * stride + radius; - for (int l = blockIdx.z * blockDim.z + threadIdx.z; l < L; l += blockDim.z * gridDim.z) { - float res = 0; - for (int k_i = -radius; k_i <= radius; k_i++) { - int ni = i_f + k_i; - for (int k_j = -radius; k_j <= radius; k_j++) { - int nj = j_f + k_j; - res += x[((ni * M) + nj) * L + l]; - } - } - // Apply mean operator; - out[l + L * (j + out_index)] = res / (K * K); - } - } - } -} - -extern "C" __global__ void gap(float *out, float *x, int N, int M, int L) { - extern __shared__ float out_local[]; - for(int i = threadIdx.x; i < L; i += blockDim.x) { - out_local[i] = 0; - } - __syncthreads(); - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { - for(int j = blockIdx.y * blockDim.y + threadIdx.y; j < M; j += blockDim.y * gridDim.y) { - for (int l = 0; l < L; l++) { - atomicAdd(out_local + l, x[l + L * (j + M * i)]); - } - } - } - __syncthreads(); - for(int l = threadIdx.x; l < L; l += blockDim.x) { - atomicAdd(out + l, out_local[l] / (M * N)); - } -} - -__inline__ __device__ float warp_reduce(float val) { - int warp_size = 32; - for (int offset = warp_size / 2; offset > 0; offset /= 2) - val += __shfl_down_sync(0xFFFFFFFF, val, offset); - return val; -} - -extern "C" __global__ void dot_product(const float *x, const float *y, float* z, int N) { - int warp_size = 32; - float sum = float(0); - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { - sum += x[i] * y[i]; - } - sum = warp_reduce(sum); // Obtain the sum of values in the current warp; - if ((threadIdx.x & (warp_size - 1)) == 0) // Same as (threadIdx.x % warp_size) == 0 but faster - atomicAdd(z, sum); // The first thread in the warp updates the output; -} - -extern "C" __global__ void concat(float *z, const float *x, const float *y, int n) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { - z[i] = x[i]; - z[i + n] = y[i]; - } -} - -inline void reset(float *x, float *y, float *x_cpu, float *y_cpu, int N, float *res) { - for (int i = 0; i < N; i++) { - x[i] = x_cpu[i]; - y[i] = y_cpu[i]; - } - *res = 0; -} - diff --git a/projects/resources/cuda/old/b10_default.cu b/projects/resources/cuda/old/b10_default.cu deleted file mode 100644 index fc7f68cc..00000000 --- a/projects/resources/cuda/old/b10_default.cu +++ /dev/null @@ -1,195 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b10.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int K = 3; - int channels = 1; - int stride = 2; - int kn1 = 8; - int kn2 = 16; - int pooling_diameter = 5; - - int block_size_1d = options.block_size_1d; - int block_size_2d = options.block_size_2d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - if (debug) { - std::cout << "running b10 default" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size_1d << std::endl; - std::cout << "block size 2d=" << block_size_2d << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - float *x, *x1, *x2, *x3, *y, *y1, *y2, *y3, *kernel_1, *kernel_2, *kernel_3, *kernel_4, *z, *dense_weights, *res; - float *x11, *y11; - float *x_cpu = (float *) malloc(sizeof(float) * N * N * channels); - float *y_cpu = (float *) malloc(sizeof(float) * N * N * channels); - int x_len = N * N * channels; - int x1_len = (N / stride) * (N / stride) * kn1; - int pooled_len = x1_len / (pooling_diameter * pooling_diameter); - int x2_len = ((N / stride) / pooling_diameter / stride) * ((N / stride) / pooling_diameter / stride) * kn2; - // int x2_len = (N / (stride * stride)) * (N / (stride * stride)) * kn2; - int x3_len = kn2; - err = cudaMallocManaged(&x, sizeof(float) * x_len); - err = cudaMallocManaged(&x1, sizeof(float) * x1_len); - err = cudaMallocManaged(&x2, sizeof(float) * x2_len); - err = cudaMallocManaged(&x3, sizeof(float) * x3_len); - - err = cudaMallocManaged(&y, sizeof(float) * x_len); - err = cudaMallocManaged(&y1, sizeof(float) * x1_len); - err = cudaMallocManaged(&y2, sizeof(float) * x2_len); - err = cudaMallocManaged(&y3, sizeof(float) * x3_len); - - int k1_len = channels * K * K * kn1; - int k2_len = kn1 * K * K * kn2; - err = cudaMallocManaged(&kernel_1, sizeof(float) * k1_len); - err = cudaMallocManaged(&kernel_2, sizeof(float) * k2_len); - err = cudaMallocManaged(&kernel_3, sizeof(float) * k1_len); - err = cudaMallocManaged(&kernel_4, sizeof(float) * k2_len); - - int z_len = 2 * x2_len; - err = cudaMallocManaged(&z, sizeof(float) * z_len); - err = cudaMallocManaged(&dense_weights, sizeof(float) * z_len); - err = cudaMallocManaged(&res, sizeof(float)); - - - err = cudaMallocManaged(&x11, sizeof(float) * pooled_len); - err = cudaMallocManaged(&y11, sizeof(float) * pooled_len); - - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - start = clock_type::now(); - for (int i = 0; i < x_len; i++) { - x_cpu[i] = (float)(rand()) / (float)(RAND_MAX); - y_cpu[i] = (float)(rand()) / (float)(RAND_MAX); - } - for (int i = 0; i < k1_len; i++) { - kernel_1[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - kernel_3[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - } - for (int i = 0; i < k2_len; i++) { - kernel_2[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - kernel_4[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - } - - for (int i = 0; i < z_len; i++) { - dense_weights[i] = (((float)(rand()) / (float)(RAND_MAX)) * 2 - 1) / z_len; - } - - // Create streams; - cudaStream_t s1, s2; - err = cudaStreamCreate(&s1); - err = cudaStreamCreate(&s2); - if (err) std::cout << err << std::endl; - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - cudaStreamAttachMemAsync(s1, x, sizeof(float) * x_len); - cudaStreamAttachMemAsync(s1, x1, 0); - cudaStreamAttachMemAsync(s1, x2, 0); - // cudaStreamAttachMemAsync(s1, x3, 0); - cudaStreamAttachMemAsync(s1, kernel_1, 0); - cudaStreamAttachMemAsync(s1, kernel_2, 0); - cudaStreamAttachMemAsync(s2, y, sizeof(float) * x_len); - cudaStreamAttachMemAsync(s2, y1, 0); - // cudaStreamAttachMemAsync(s2, y2, 0); - // cudaStreamAttachMemAsync(s2, y3, 0); - cudaStreamAttachMemAsync(s2, kernel_3, 0); - cudaStreamAttachMemAsync(s2, kernel_4, 0); - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(x, y, x_cpu, y_cpu, x_len, res); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - dim3 block_size_2d_dim(block_size_2d, block_size_2d); - dim3 grid_size(num_blocks, num_blocks); - dim3 grid_size_2(num_blocks / 2, num_blocks / 2); - - dim3 block_size_3d_dim(block_size_2d / 2, block_size_2d / 2, block_size_2d / 2); - dim3 grid_size_3(num_blocks / 2, num_blocks / 2, num_blocks / 2); - - conv2d<<>>(x1, x, kernel_1, N, N, channels, K, kn1, stride); - conv2d<<>>(y1, y, kernel_3, N, N, channels, K, kn1, stride); - - mean_pooling<<>>(x11, x1, N / stride, N / stride, kn1, pooling_diameter, pooling_diameter); - mean_pooling<<>>(y11, y1, N / stride, N / stride, kn1, pooling_diameter, pooling_diameter); - - conv2d<<>>(x2, x11, kernel_2, N / stride / pooling_diameter, N / stride / pooling_diameter, kn1, K, kn2, stride); - conv2d<<>>(y2, y11, kernel_4, N / stride / pooling_diameter, N / stride / pooling_diameter, kn1, K, kn2, stride); - - // conv2d<<>>(x2, x1, kernel_2, N / stride, N / stride, kn1, K, kn2, stride); - // conv2d<<>>(y2, y1, kernel_4, N / stride, N / stride, kn1, K, kn2, stride); - - // gap<<>>(x3, x2, N / (stride * stride), N / (stride * stride), kn2); - // gap<<>>(y3, y2, N / (stride * stride), N / (stride * stride), kn2); - - cudaEvent_t e1; - cudaEventCreate(&e1); - cudaEventRecord(e1, s2); - cudaStreamWaitEvent(s1, e1, 0); - - concat<<>>(z, x2, y2, x2_len); - - dot_product<<>>(z, dense_weights, res, x2_len); - cudaStreamSynchronize(s1); - cudaStreamSynchronize(s2); - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - tot += tmp; - - if (debug) { - std::cout << " gpu result=" << *res << "; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << *res << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * num_executions) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b10_sync.cu b/projects/resources/cuda/old/b10_sync.cu deleted file mode 100644 index c2974e34..00000000 --- a/projects/resources/cuda/old/b10_sync.cu +++ /dev/null @@ -1,180 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b10.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int K = 3; - int channels = 1; - int stride = 2; - int kn1 = 8; - int kn2 = 16; - int pooling_diameter = 5; - - int block_size_1d = options.block_size_1d; - int block_size_2d = options.block_size_2d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - if (debug) { - std::cout << "running b10 sync" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size_1d << std::endl; - std::cout << "block size 2d=" << block_size_2d << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - float *x, *x1, *x2, *x3, *y, *y1, *y2, *y3, *kernel_1, *kernel_2, *kernel_3, *kernel_4, *z, *dense_weights, *res; - float *x11, *y11; - float *x_cpu = (float *) malloc(sizeof(float) * N * N * channels); - float *y_cpu = (float *) malloc(sizeof(float) * N * N * channels); - int x_len = N * N * channels; - int x1_len = (N / stride) * (N / stride) * kn1; - int pooled_len = x1_len / (pooling_diameter * pooling_diameter); - int x2_len = ((N / stride) / pooling_diameter / stride) * ((N / stride) / pooling_diameter / stride) * kn2; - // int x2_len = (N / (stride * stride)) * (N / (stride * stride)) * kn2; - int x3_len = kn2; - err = cudaMallocManaged(&x, sizeof(float) * x_len); - err = cudaMallocManaged(&x1, sizeof(float) * x1_len); - err = cudaMallocManaged(&x2, sizeof(float) * x2_len); - err = cudaMallocManaged(&x3, sizeof(float) * x3_len); - - err = cudaMallocManaged(&y, sizeof(float) * x_len); - err = cudaMallocManaged(&y1, sizeof(float) * x1_len); - err = cudaMallocManaged(&y2, sizeof(float) * x2_len); - err = cudaMallocManaged(&y3, sizeof(float) * x3_len); - - int k1_len = channels * K * K * kn1; - int k2_len = kn1 * K * K * kn2; - err = cudaMallocManaged(&kernel_1, sizeof(float) * k1_len); - err = cudaMallocManaged(&kernel_2, sizeof(float) * k2_len); - err = cudaMallocManaged(&kernel_3, sizeof(float) * k1_len); - err = cudaMallocManaged(&kernel_4, sizeof(float) * k2_len); - - int z_len = 2 * x2_len; - err = cudaMallocManaged(&z, sizeof(float) * z_len); - err = cudaMallocManaged(&dense_weights, sizeof(float) * z_len); - err = cudaMallocManaged(&res, sizeof(float)); - - - err = cudaMallocManaged(&x11, sizeof(float) * pooled_len); - err = cudaMallocManaged(&y11, sizeof(float) * pooled_len); - - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - start = clock_type::now(); - for (int i = 0; i < x_len; i++) { - x_cpu[i] = (float)(rand()) / (float)(RAND_MAX); - y_cpu[i] = (float)(rand()) / (float)(RAND_MAX); - } - for (int i = 0; i < k1_len; i++) { - kernel_1[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - kernel_3[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - } - for (int i = 0; i < k2_len; i++) { - kernel_2[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - kernel_4[i] = ((float)(rand()) / (float)(RAND_MAX)) * 2 - 1; - } - - for (int i = 0; i < z_len; i++) { - dense_weights[i] = (((float)(rand()) / (float)(RAND_MAX)) * 2 - 1) / z_len; - } - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(x, y, x_cpu, y_cpu, x_len, res); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - dim3 block_size_2d_dim(block_size_2d, block_size_2d); - dim3 grid_size(num_blocks, num_blocks); - dim3 grid_size_2(num_blocks / 2, num_blocks / 2); - - dim3 block_size_3d_dim(block_size_2d / 2, block_size_2d / 2, block_size_2d / 2); - dim3 grid_size_3(num_blocks / 2, num_blocks / 2, num_blocks / 2); - - conv2d<<>>(x1, x, kernel_1, N, N, channels, K, kn1, stride); - cudaDeviceSynchronize(); - conv2d<<>>(y1, y, kernel_3, N, N, channels, K, kn1, stride); - cudaDeviceSynchronize(); - - mean_pooling<<>>(x11, x1, N / stride, N / stride, kn1, pooling_diameter, pooling_diameter); - cudaDeviceSynchronize(); - mean_pooling<<>>(y11, y1, N / stride, N / stride, kn1, pooling_diameter, pooling_diameter); - cudaDeviceSynchronize(); - - conv2d<<>>(x2, x11, kernel_2, N / stride / pooling_diameter, N / stride / pooling_diameter, kn1, K, kn2, stride); - cudaDeviceSynchronize(); - conv2d<<>>(y2, y11, kernel_4, N / stride / pooling_diameter, N / stride / pooling_diameter, kn1, K, kn2, stride); - cudaDeviceSynchronize(); - - // conv2d<<>>(x2, x1, kernel_2, N / stride, N / stride, kn1, K, kn2, stride); - // cudaDeviceSynchronize(); - // conv2d<<>>(y2, y1, kernel_4, N / stride, N / stride, kn1, K, kn2, stride); - // cudaDeviceSynchronize(); - - // gap<<>>(x3, x2, N / (stride * stride), N / (stride * stride), kn2); - // cudaDeviceSynchronize(); - // gap<<>>(y3, y2, N / (stride * stride), N / (stride * stride), kn2); - // cudaDeviceSynchronize(); - - concat<<>>(z, x2, y2, x2_len); - cudaDeviceSynchronize(); - - dot_product<<>>(z, dense_weights, res, x2_len); - cudaDeviceSynchronize(); - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - tot += tmp; - - if (debug) { - std::cout << " gpu result=" << *res << "; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << *res << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * num_executions) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b1_default.cu b/projects/resources/cuda/old/b1_default.cu deleted file mode 100644 index 7f1d4ed7..00000000 --- a/projects/resources/cuda/old/b1_default.cu +++ /dev/null @@ -1,134 +0,0 @@ -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b1.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void init(float *x, float *y, int N) { - for (int i = 0; i < N; i++) { - x[i] = 1.0 / (i + 1); - y[i] = 2.0 / (i + 1); - } -} - -void reset(float *res, float *x, float *y, int N) { - for (int i = 0; i < N; i++) { - x[i] = 1.0 / (i + 1); - y[i] = 2.0 / (i + 1); - } - res[0] = 0.0; -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int block_size = options.block_size_1d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - if (debug) { - std::cout << "running b1 dag" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - float *x, *y, *x1, *y1, *res; - err = cudaMallocManaged(&x, sizeof(float) * N); - err = cudaMallocManaged(&y, sizeof(float) * N); - err = cudaMallocManaged(&x1, sizeof(float) * N); - err = cudaMallocManaged(&y1, sizeof(float) * N); - err = cudaMallocManaged(&res, sizeof(float)); - if (debug && err) std::cout << err << std::endl; - - // Create streams; - cudaStream_t s1, s2; - err = cudaStreamCreate(&s1); - err = cudaStreamCreate(&s2); - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - init(x, y, N); - - - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(res, x, y, N); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - cudaStreamAttachMemAsync(s1, x, sizeof(float) * N); - cudaStreamAttachMemAsync(s1, x1, sizeof(float) * N); - cudaStreamAttachMemAsync(s2, y, sizeof(float) * N); - cudaStreamAttachMemAsync(s2, y1, sizeof(float) * N); - - // cudaMemPrefetchAsync(x, sizeof(float) * N, 0, s1); - // cudaMemPrefetchAsync(y, sizeof(float) * N, 0, s2); - - square<<>>(x, x1, N); - square<<>>(y, y1, N); - - // Stream 1 waits stream 2; - cudaEvent_t e1; - cudaEventCreate(&e1); - cudaEventRecord(e1, s2); - cudaStreamWaitEvent(s1, e1, 0); - - reduce<<>>(x1, y1, res, N); - cudaStreamSynchronize(s1); - if (debug && err) std::cout << err << std::endl; - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=" << res[0] << "; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << res[0] << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b1_sync.cu b/projects/resources/cuda/old/b1_sync.cu deleted file mode 100644 index bf91308a..00000000 --- a/projects/resources/cuda/old/b1_sync.cu +++ /dev/null @@ -1,113 +0,0 @@ -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b1.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void init(float *x, float *y, int N) { - for (int i = 0; i < N; i++) { - x[i] = 1.0 / (i + 1); - y[i] = 2.0 / (i + 1); - } -} - -void reset(float *res, float *x, float *y, int N) { - for (int i = 0; i < N; i++) { - x[i] = 1.0 / (i + 1); - y[i] = 2.0 / (i + 1); - } - res[0] = 0.0; -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int block_size = options.block_size_1d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - if (debug) { - std::cout << "running b1 sync" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - float *x, *y, *x1, *y1, *res; - err = cudaMallocManaged(&x, sizeof(float) * N); - err = cudaMallocManaged(&y, sizeof(float) * N); - err = cudaMallocManaged(&x1, sizeof(float) * N); - err = cudaMallocManaged(&y1, sizeof(float) * N); - err = cudaMallocManaged(&res, sizeof(float)); - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - init(x, y, N); - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(res, x, y, N); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - square<<>>(x, x1, N); - err = cudaDeviceSynchronize(); - square<<>>(y, y1, N); - err = cudaDeviceSynchronize(); - reduce<<>>(x1, y1, res, N); - err = cudaDeviceSynchronize(); - if (debug && err) std::cout << err << std::endl; - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=" << res[0] << "; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << res[0] << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b5.cuh b/projects/resources/cuda/old/b5.cuh deleted file mode 100644 index ea5a71bc..00000000 --- a/projects/resources/cuda/old/b5.cuh +++ /dev/null @@ -1,91 +0,0 @@ - -///////////////////////////// -///////////////////////////// - -// float R = 0.08; -// float V = 0.3; -// float T = 1.0; -// float K = 60.0; - -// __device__ inline float cndGPU(float d) { -// const float A1 = 0.31938153f; -// const float A2 = -0.356563782f; -// const float A3 = 1.781477937f; -// const float A4 = -1.821255978f; -// const float A5 = 1.330274429f; -// const float RSQRT2PI = 0.39894228040143267793994605993438f; - -// float -// K = __fdividef(1.0f, (1.0f + 0.2316419f * fabsf(d))); - -// float -// cnd = RSQRT2PI * __expf(- 0.5f * d * d) * -// (K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5))))); - -// if (d > 0) -// cnd = 1.0f - cnd; - -// return cnd; -// } - -// extern "C" __global__ void bs(const float *x, float *y, int N, float R, float V, float T, float K) { - -// float sqrtT = __fdividef(1.0F, rsqrtf(T)); -// for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { -// float expRT; -// float d1, d2, CNDD1, CNDD2; -// d1 = __fdividef(__logf(x[i] / K) + (R + 0.5f * V * V) * T, V * sqrtT); -// d2 = d1 - V * sqrtT; - -// CNDD1 = cndGPU(d1); -// CNDD2 = cndGPU(d2); - -// //Calculate Call and Put simultaneously -// expRT = __expf(-R * T); -// y[i] = x[i] * CNDD1 - K * expRT * CNDD2; -// } -// } - -double R = 0.08; -double V = 0.3; -double T = 1.0; -double K = 60.0; - -__device__ inline double cndGPU(double d) { - const double A1 = 0.31938153f; - const double A2 = -0.356563782f; - const double A3 = 1.781477937f; - const double A4 = -1.821255978f; - const double A5 = 1.330274429f; - const double RSQRT2PI = 0.39894228040143267793994605993438f; - - double - K = 1.0 / (1.0 + 0.2316419 * fabs(d)); - - double - cnd = RSQRT2PI * exp(- 0.5f * d * d) * - (K * (A1 + K * (A2 + K * (A3 + K * (A4 + K * A5))))); - - if (d > 0) - cnd = 1.0 - cnd; - - return cnd; -} - -extern "C" __global__ void bs(const double *x, double *y, int N, double R, double V, double T, double K) { - - double sqrtT = 1.0 / rsqrt(T); - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { - double expRT; - double d1, d2, CNDD1, CNDD2; - d1 = (log(x[i] / K) + (R + 0.5 * V * V) * T) / (V * sqrtT); - d2 = d1 - V * sqrtT; - - CNDD1 = cndGPU(d1); - CNDD2 = cndGPU(d2); - - //Calculate Call and Put simultaneously - expRT = exp(-R * T); - y[i] = x[i] * CNDD1 - K * expRT * CNDD2; - } -} \ No newline at end of file diff --git a/projects/resources/cuda/old/b5_default.cu b/projects/resources/cuda/old/b5_default.cu deleted file mode 100644 index 74da2577..00000000 --- a/projects/resources/cuda/old/b5_default.cu +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b5.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void init(double **x, double **y, double* tmp_x, int N, int K) { - for (int j = 0; j < N; j++) { - tmp_x[j] = 60 - 0.5 + (double) rand() / RAND_MAX; - for (int i = 0; i < K; i++) { - x[i][j] = tmp_x[j]; - // y[i][j] = 0; - } - } -} - -void reset(double **x, double* y, int N, int K, cudaStream_t *s) { - for (int i = 0; i < K; i++) { - // memcpy(x[i], y, sizeof(int) * N); - // cudaMemcpy(x[i], y, sizeof(double) * N, cudaMemcpyDefault); - - // cudaMemcpyAsync(x[i], y, sizeof(int) * N, cudaMemcpyHostToDevice, s[i]); - for (int j = 0; j < N; j++) { - x[i][j] = y[j]; - } - } - // cudaMemPrefetchAsync(x[0], sizeof(double) * N, 0, s[0]); -} - - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int block_size = options.block_size_1d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - int M = 10; - - if (debug) { - std::cout << "running b5 default" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - double **x = (double **) malloc(sizeof(double*) * M); - double **y = (double **) malloc(sizeof(double*) * M); - double *tmp_x = (double *) malloc(sizeof(double) * N); - // cudaHostRegister(tmp_x, sizeof(double) * N, 0); - - for (int i = 0; i < M; i++) { - cudaMallocManaged(&x[i], sizeof(double) * N); - cudaMallocManaged(&y[i], sizeof(double) * N); - } - if (debug && err) std::cout << err << std::endl; - - // Create streams; - cudaStream_t *s = (cudaStream_t *) malloc(sizeof(cudaStream_t) * M); - for (int i = 0; i < M; i++) { - err = cudaStreamCreate(&s[i]); - } - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - init(x, y, tmp_x, N, M); - - if (debug) std::cout << "x[0][0]=" << tmp_x[0] << std::endl; - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (double) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - double tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(x, tmp_x, N, M, s); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (double) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - for (int j = 0; j < M; j++) { - cudaStreamAttachMemAsync(s[j], x[j], sizeof(double) * N); - cudaStreamAttachMemAsync(s[j], y[j], sizeof(double) * N); - // if (j > 0) cudaMemPrefetchAsync(y[j - 1], sizeof(double) * N, cudaCpuDeviceId, s[j - 1]); - bs<<>>(x[j], y[j], N, R, V, T, K); - // if (j < M - 1) cudaMemPrefetchAsync(x[j + 1], sizeof(double) * N, 0, s[j + 1]); - } - - // Last tile; - // cudaMemPrefetchAsync(y[M - 1], sizeof(double) * N, cudaCpuDeviceId, s[M - 1]); - - for (int j = 0; j < M; j++) { - err = cudaStreamSynchronize(s[j]); - } - - if (debug && err) std::cout << err << std::endl; - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < M; j++) { - std::cout << y[j][0] << ", "; - } - std::cout << ", ...]; time=" << (double) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << y[0][0] << "," << (double) (reset_time + tmp) / 1e6 << "," << (double) reset_time / 1e6 << "," << (double) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (double) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b5_sync.cu b/projects/resources/cuda/old/b5_sync.cu deleted file mode 100644 index 4f25be1a..00000000 --- a/projects/resources/cuda/old/b5_sync.cu +++ /dev/null @@ -1,127 +0,0 @@ -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b5.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void init(double **x, double **y, double* tmp_x, int N, int K) { - for (int j = 0; j < N; j++) { - tmp_x[j] = 60 - 0.5 + (double) rand() / RAND_MAX; - for (int i = 0; i < K; i++) { - x[i][j] = tmp_x[j]; - // y[i][j] = 0; - } - } -} - -void reset(double **x, double* y, int N, int K) { - for (int i = 0; i < K; i++) { - // memcpy(x[i], y, sizeof(int) * N); - // cudaMemcpy(x[i], y, sizeof(double) * N, cudaMemcpyDefault); - // cudaMemcpyAsync(x[i], y, sizeof(int) * N, cudaMemcpyHostToDevice, s[i]); - for (int j = 0; j < N; j++) { - x[i][j] = y[j]; - } - } -} -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int block_size = options.block_size_1d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - int M = 10; - - if (debug) { - std::cout << "running b5 sync" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - double **x = (double **) malloc(sizeof(double*) * M); - double **y = (double **) malloc(sizeof(double*) * M); - double *tmp_x = (double *) malloc(sizeof(double) * N); - cudaHostRegister(tmp_x, sizeof(double) * N, 0); - - for (int i = 0; i < M; i++) { - cudaMallocManaged(&x[i], sizeof(double) * N); - cudaMallocManaged(&y[i], sizeof(double) * N); - } - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - init(x, y, tmp_x, N, M); - - if (debug) std::cout << "x[0][0]=" << tmp_x[0] << std::endl; - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (double) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - double tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(x, tmp_x, N, M); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (double) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - for (int j = 0; j < M; j++) { - bs<<>>(x[j], y[j], N, R, V, T, K); - err = cudaDeviceSynchronize(); - } - - if (debug && err) std::cout << err << std::endl; - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < M; j++) { - std::cout << y[j][0] << ", "; - } - std::cout << ", ...]; time=" << (double) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << y[0][0] << "," << (double) (reset_time + tmp) / 1e6 << "," << (double) reset_time / 1e6 << "," << (double) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (double) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b6.cuh b/projects/resources/cuda/old/b6.cuh deleted file mode 100644 index 4586a3a2..00000000 --- a/projects/resources/cuda/old/b6.cuh +++ /dev/null @@ -1,140 +0,0 @@ -extern "C" __global__ void nb_1(const int* x, const float* y, float* z, int size, int n_feat, int n_classes) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < size; i += blockDim.x * gridDim.x) { - for (int j = 0; j < n_classes; j++) { - for (int q = 0; q < n_feat; q++) { - z[i * n_classes + j] += x[i * n_feat + q] * y[j * n_feat + q]; - } - } - } -} - -extern "C" __global__ void nb_2(const float* x, float* y, int n_row_x, int n_col_x) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n_row_x; i += blockDim.x * gridDim.x) { - float curr_max = x[i * n_col_x]; - for (int j = 0; j < n_col_x; j++) { - curr_max = fmaxf(curr_max, x[i * n_col_x + j]); - } - y[i] = curr_max; - } -} - -extern "C" __global__ void nb_3(const float* x, const float* y, float* z, int n_row_x, int n_col_x) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n_row_x; i += blockDim.x * gridDim.x) { - float sum = 0; - for (int j = 0; j < n_col_x; j++) { - sum += expf(x[i * n_col_x + j] - y[i]); - } - z[i] = logf(sum) + y[i]; - } -} - -extern "C" __global__ void nb_4(float* x, float* y, int n_row_x, int n_col_x) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n_row_x; i += blockDim.x * gridDim.x) { - for (int j = 0; j < n_col_x; j++) { - x[i * n_col_x + j] = expf(x[i * n_col_x + j] - y[i]); - } - } -} - -__inline__ __device__ float warp_reduce(float val) { - int warp_size = 32; - for (int offset = warp_size / 2; offset > 0; offset /= 2) - val += __shfl_down_sync(0xFFFFFFFF, val, offset); - return val; -} - -extern "C" __global__ void rr_1_0(const int* x, float *y, float *z, int n_row_x, int n_col_x) { - int warp_size = 32; - for(int j = blockIdx.x * blockDim.x + threadIdx.x; j < n_col_x; j += blockDim.x * gridDim.x) { - // Compute mean and variance; - float feature_mean = float(0); - float sum_sq = float(0); - for(int i = blockIdx.y * blockDim.y + threadIdx.y; i < n_row_x; i += blockDim.y * gridDim.y) { - float x_tmp = x[j * n_row_x + i]; - feature_mean += x_tmp; - sum_sq += x_tmp * x_tmp; - } - feature_mean = warp_reduce(feature_mean); // Obtain the sum of values in the current warp; - sum_sq = warp_reduce(sum_sq); // Obtain the sum of values in the current warp; - if (!(threadIdx.y % warp_size)) { - atomicAdd(y + j, feature_mean); - atomicAdd(z + j, sum_sq); - } - } -} - -extern "C" __global__ void rr_1_1(const int *x, float *y, const float *mean, const float *std, int n_row_x, int n_col_x) { - for(int j = blockIdx.x * blockDim.x + threadIdx.x; j < n_col_x; j += blockDim.x * gridDim.x) { - float mean_tmp = mean[j] / n_row_x; - float std_tmp = sqrtf(std[j] / n_row_x - mean_tmp * mean_tmp); - - for(int i = blockIdx.y * blockDim.y + threadIdx.y; i < n_row_x; i += blockDim.y * gridDim.y) { - y[j * n_row_x + i] = ((float) x[j * n_row_x + i] - mean_tmp) / std_tmp; - } - } -} - -extern "C" __global__ void rr_1(const int* x, float *y, int n_row_x, int n_col_x) { - for(int j = blockIdx.x * blockDim.x + threadIdx.x; j < n_col_x; j += blockDim.x * gridDim.x) { - float feature_mean = 0; - float sum_sq = 0; - // Compute mean and variance; - for (int i = 0; i < n_row_x; i++) { - float x_tmp = x[j * n_row_x + i]; - feature_mean += x_tmp; - sum_sq += x_tmp * x_tmp; - } - feature_mean /= n_row_x; - float std = sqrtf(sum_sq / n_row_x - feature_mean * feature_mean); - - // Update values; - for (int i = 0; i < n_row_x; i++) { - y[j * n_row_x + i] = (x[j * n_row_x + i] - feature_mean) / std; - } - } -} - -extern "C" __global__ void rr_2(const float* x, const float* y, float* z, int size, int n_feat, int n_classes) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < size; i += blockDim.x * gridDim.x) { - for (int j = 0; j < n_classes; j++) { - for (int q = 0; q < n_feat; q++) { - z[i * n_classes + j] += x[i * n_feat + q] * y[j * n_feat + q]; - } - } - } -} - -extern "C" __global__ void rr_3(float* x, const float *y, int n_row_x, int n_col_x) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n_row_x; i += blockDim.x * gridDim.x) { - for (int j = 0; j < n_col_x; j++) { - x[i * n_col_x + j] += y[j]; - } - } -} - -extern "C" __global__ void softmax(float *x, int n_row_x, int n_col_x) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n_row_x; i += blockDim.x * gridDim.x) { - float row_exp_sum = 0; - for (int j = 0; j < n_col_x; j++) { - row_exp_sum += expf( x[i * n_col_x + j]); - } - for (int j = 0; j < n_col_x; j++) { - x[i * n_col_x + j] = expf(x[i * n_col_x + j]) / row_exp_sum; - } - } -} - -extern "C" __global__ void argmax(const float *x, const float *y, int *z, int n_row_x, int n_col_x) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n_row_x; i += blockDim.x * gridDim.x) { - int curr_best_index = 0; - float curr_best = x[i * n_col_x] + y[i * n_col_x]; - for (int j = 0; j < n_col_x; j++) { - float curr = x[i * n_col_x + j] + y[i * n_col_x + j]; - if (curr > curr_best) { - curr_best = curr; - curr_best_index = j; - } - } - z[i] = curr_best_index; - } -} diff --git a/projects/resources/cuda/old/b6_default.cu b/projects/resources/cuda/old/b6_default.cu deleted file mode 100644 index ef8690bc..00000000 --- a/projects/resources/cuda/old/b6_default.cu +++ /dev/null @@ -1,188 +0,0 @@ -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "b6.cuh" -#include "options.hpp" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void reset(float *r1, float *r2, const float *nb_class_log_prior, int N, int num_classes) { - for (int i = 0; i < N; i++) { - for (int j = 0; j < num_classes; j++) { - r1[i * num_classes + j] = nb_class_log_prior[j]; - r2[i * num_classes + j] = 0; - } - // r1_mean[i] = 0; - // r1_std[i] = 0; - } -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int block_size = options.block_size_1d; - int num_blocks = 32; // options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - int num_features = 200; - int num_classes = 10; - - if (debug) { - std::cout << "running b6 dag" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - int *x; - float *z; - err = cudaMallocManaged(&x, sizeof(int) * N * num_features); - if (err) std::cout << err << std::endl; - err = cudaMallocManaged(&z, sizeof(float) * N * num_features); - if (err) std::cout << err << std::endl; - - float *nb_feat_log_prob, *nb_class_log_prior, *ridge_coeff, *ridge_intercept, *nb_amax, *nb_l, *r1, *r2; - // float *r1_mean, *r1_std; - int *r; - err = cudaMallocManaged(&nb_feat_log_prob, sizeof(float) * num_classes * num_features); - err = cudaMallocManaged(&nb_class_log_prior, sizeof(float) * num_classes); - err = cudaMallocManaged(&ridge_coeff, sizeof(float) * num_classes * num_features); - err = cudaMallocManaged(&ridge_intercept, sizeof(float) * num_classes); - err = cudaMallocManaged(&nb_amax, sizeof(float) * N); - err = cudaMallocManaged(&nb_l, sizeof(float) * N); - err = cudaMallocManaged(&r1, sizeof(float) * N * num_classes); - err = cudaMallocManaged(&r2, sizeof(float) * N * num_classes); - err = cudaMallocManaged(&r, sizeof(int) * N); - // err = cudaMallocManaged(&r1_mean, sizeof(float) * num_features); - // err = cudaMallocManaged(&r1_std, sizeof(float) * num_features); - if (err) std::cout << err << std::endl; - - // Initialze arrays; - for (int i = 0; i < num_classes; i++) { - for (int j = 0; j < num_features; j++) { - nb_feat_log_prob[i * num_features + j] = (float)(rand()) / (float)(RAND_MAX); - ridge_coeff[i * num_features + j] = (float)(rand()) / (float)(RAND_MAX); - } - nb_class_log_prior[i] = (float)(rand()) / (float)(RAND_MAX); - ridge_intercept[i] = (float)(rand()) / (float)(RAND_MAX); - } - int max_occurrence_of_ngram = 10; - for (int i = 0; i < N; i++) { - for (int j = 0; j < num_features; j++) { - x[i * num_features + j] = rand() % max_occurrence_of_ngram; - } - for (int j = 0; j < num_classes; j++) { - r1[i * num_classes + j] = nb_class_log_prior[j]; - r2[i * num_classes + j] = 0; - } - } - - // Create streams; - cudaStream_t s1, s2; - err = cudaStreamCreate(&s1); - err = cudaStreamCreate(&s2); - if (debug && err) std::cout << err << std::endl; - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(r1, r2, nb_class_log_prior, N, num_classes); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - cudaStreamAttachMemAsync(s1, z, 0); - // cudaStreamAttachMemAsync(s1, r1_mean, 0); - // cudaStreamAttachMemAsync(s1, r1_std, 0); - cudaStreamAttachMemAsync(s2, nb_feat_log_prob, 0); - cudaStreamAttachMemAsync(s2, r1, 0); - cudaStreamAttachMemAsync(s1, ridge_coeff, 0); - cudaStreamAttachMemAsync(s1, r2, 0); - cudaStreamAttachMemAsync(s2, nb_amax, 0); - cudaStreamAttachMemAsync(s2, nb_l, 0); - cudaStreamAttachMemAsync(s1, ridge_intercept, 0); - - rr_1<<>>(x, z, N, num_features); - // dim3 num_blocks_2d(8, 8); - // dim3 block_size_2d(8, 8); - // rr_1_0<<>>(x, r1_mean, r1_std, N, num_features); - // rr_1_1<<>>(x, z, r1_mean, r1_std, N, num_features); - - nb_1<<>>(x, nb_feat_log_prob, r1, N, num_features, num_classes); - - rr_2<<>>(z, ridge_coeff, r2, N, num_features, num_classes); - - nb_2<<>>(r1, nb_amax, N, num_classes); - - nb_3<<>>(r1, nb_amax, nb_l, N, num_classes); - - rr_3<<>>(r2, ridge_intercept, N, num_classes); - - nb_4<<>>(r1, nb_l, N, num_classes); - - softmax<<>>(r1, N, num_classes); - - softmax<<>>(r2, N, num_classes); - - // Stream 1 waits stream 2; - cudaEvent_t e1; - cudaEventCreate(&e1); - cudaEventRecord(e1, s2); - cudaStreamWaitEvent(s1, e1, 0); - - argmax<<>>(r1, r2, r, N, num_classes); - cudaDeviceSynchronize(); - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < 10; j++) { - std::cout << r[j] << ", "; - } - std::cout << ", ...]; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << 0.0 << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b6_sync.cu b/projects/resources/cuda/old/b6_sync.cu deleted file mode 100644 index c4ebd8d9..00000000 --- a/projects/resources/cuda/old/b6_sync.cu +++ /dev/null @@ -1,180 +0,0 @@ -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b6.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void reset(float *r1, float *r2, const float *nb_class_log_prior, int N, int num_classes) { - for (int i = 0; i < N; i++) { - for (int j = 0; j < num_classes; j++) { - r1[i * num_classes + j] = nb_class_log_prior[j]; - r2[i * num_classes + j] = 0; - } - // r1_mean[i] = 0; - // r1_std[i] = 0; - } -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - //srand(time(0)); - srand(13); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int block_size = options.block_size_1d; - int num_blocks = 32; // options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - int num_features = 200; - int num_classes = 10; - - if (debug) { - std::cout << "running b6 sync" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - int *x; - float *z; - err = cudaMallocManaged(&x, sizeof(int) * N * num_features); - if (err) std::cout << err << std::endl; - err = cudaMallocManaged(&z, sizeof(float) * N * num_features); - if (err) std::cout << err << std::endl; - - float *nb_feat_log_prob, *nb_class_log_prior, *ridge_coeff, *ridge_intercept, *nb_amax, *nb_l, *r1, *r2; - // float *r1_mean, *r1_std; - int *r; - err = cudaMallocManaged(&nb_feat_log_prob, sizeof(float) * num_classes * num_features); - err = cudaMallocManaged(&nb_class_log_prior, sizeof(float) * num_classes); - err = cudaMallocManaged(&ridge_coeff, sizeof(float) * num_classes * num_features); - err = cudaMallocManaged(&ridge_intercept, sizeof(float) * num_classes); - err = cudaMallocManaged(&nb_amax, sizeof(float) * N); - err = cudaMallocManaged(&nb_l, sizeof(float) * N); - err = cudaMallocManaged(&r1, sizeof(float) * N * num_classes); - err = cudaMallocManaged(&r2, sizeof(float) * N * num_classes); - err = cudaMallocManaged(&r, sizeof(int) * N); - - // err = cudaMallocManaged(&r1_mean, sizeof(float) * num_features); - // err = cudaMallocManaged(&r1_std, sizeof(float) * num_features); - if (err) std::cout << err << std::endl; - - // Initialze arrays; - for (int i = 0; i < num_classes; i++) { - for (int j = 0; j < num_features; j++) { - nb_feat_log_prob[i * num_features + j] = (float)(rand()) / (float)(RAND_MAX); - ridge_coeff[i * num_features + j] = (float)(rand()) / (float)(RAND_MAX); - } - nb_class_log_prior[i] = (float)(rand()) / (float)(RAND_MAX); - ridge_intercept[i] = (float)(rand()) / (float)(RAND_MAX); - } - int max_occurrence_of_ngram = 2; - for (int i = 0; i < N; i++) { - for (int j = 0; j < num_features; j++) { - x[i * num_features + j] = rand() % max_occurrence_of_ngram; - } - for (int j = 0; j < num_classes; j++) { - r1[i * num_classes + j] = nb_class_log_prior[j]; - r2[i * num_classes + j] = 0; - } - } - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(r1, r2, nb_class_log_prior, N, num_classes); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - rr_1<<>>(x, z, N, num_features); - // dim3 num_blocks_2d(8, 8); - // dim3 block_size_2d(1, 32); - // rr_1_0<<>>(x, r1_mean, r1_std, N, num_features); - // cudaDeviceSynchronize(); - // rr_1_1<<>>(x, z, r1_mean, r1_std, N, num_features); - cudaDeviceSynchronize(); - - // auto e1 = clock_type::now(); - // auto rr1time = chrono::duration_cast(e1 - start).count(); - // if (debug) std::cout << " rr1=" << (float) rr1time / 1000 << " ms" << std::endl; - - nb_1<<>>(x, nb_feat_log_prob, r1, N, num_features, num_classes); - cudaDeviceSynchronize(); - - rr_2<<>>(z, ridge_coeff, r2, N, num_features, num_classes); - cudaDeviceSynchronize(); - - nb_2<<>>(r1, nb_amax, N, num_classes); - cudaDeviceSynchronize(); - - nb_3<<>>(r1, nb_amax, nb_l, N, num_classes); - cudaDeviceSynchronize(); - - rr_3<<>>(r2, ridge_intercept, N, num_classes); - cudaDeviceSynchronize(); - - nb_4<<>>(r1, nb_l, N, num_classes); - cudaDeviceSynchronize(); - - softmax<<>>(r1, N, num_classes); - cudaDeviceSynchronize(); - - softmax<<>>(r2, N, num_classes); - cudaDeviceSynchronize(); - - argmax<<>>(r1, r2, r, N, num_classes); - cudaDeviceSynchronize(); - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < 10; j++) { - std::cout << r[j] << ", "; - } - std::cout << ", ...]; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << 0.0 << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b7.cuh b/projects/resources/cuda/old/b7.cuh deleted file mode 100644 index 5ba2094d..00000000 --- a/projects/resources/cuda/old/b7.cuh +++ /dev/null @@ -1,154 +0,0 @@ - -#define WARP_SIZE 32 -#define THREADS_PER_VECTOR 4 -#define MAX_NUM_VECTORS_PER_BLOCK (1024 / THREADS_PER_VECTOR) - -///////////////////////////// -///////////////////////////// - -extern "C" __global__ void spmv(const int *ptr, const int *idx, const int *val, const float *vec, float *res, int num_rows, int num_nnz) { - - for(int n = blockIdx.x * blockDim.x + threadIdx.x; n < num_rows; n += blockDim.x * gridDim.x) { - float sum = 0; - for (int i = ptr[n]; i < ptr[n + 1]; i++) { - sum += val[i] * vec[idx[i]]; - } - res[n] = sum; - } -} - -extern "C" __global__ void spmv2(const int *ptr, const int *idx, const int *val, const float *vec, float *res, int num_rows, int num_nnz) { - // Thread ID in block - int t = threadIdx.x; - - // Thread ID in warp - int lane = t & (WARP_SIZE - 1); - - // Number of warps per block - int warpsPerBlock = blockDim.x / WARP_SIZE; - - // One row per warp - int row = (blockIdx.x * warpsPerBlock) + (t / WARP_SIZE); - - extern __shared__ volatile float vals[]; - - if (row < num_rows) { - int rowStart = ptr[row]; - int rowEnd = ptr[row+1]; - float sum = 0; - - // Use all threads in a warp accumulate multiplied elements - for (int j = rowStart + lane; j < rowEnd; j += WARP_SIZE) { - int col = idx[j]; - sum += val[j] * vec[col]; - } - vals[t] = sum; - __syncthreads(); - - // Reduce partial sums - if (lane < 16) vals[t] += vals[t + 16]; - if (lane < 8) vals[t] += vals[t + 8]; - if (lane < 4) vals[t] += vals[t + 4]; - if (lane < 2) vals[t] += vals[t + 2]; - if (lane < 1) vals[t] += vals[t + 1]; - __syncthreads(); - - // Write result - if (lane == 0) { - res[row] = vals[t]; - } - } -} - -extern "C" __global__ void spmv3(int* cudaRowCounter, int* d_ptr, int* d_cols, int* d_val, float* d_vector, float* d_out, int N) { - int i; - float sum; - int row; - int rowStart, rowEnd; - int laneId = threadIdx.x % THREADS_PER_VECTOR; //lane index in the vector - int vectorId = threadIdx.x / THREADS_PER_VECTOR; //vector index in the thread block - int warpLaneId = threadIdx.x & 31; //lane index in the warp - int warpVectorId = warpLaneId / THREADS_PER_VECTOR; //vector index in the warp - - __shared__ volatile int space[MAX_NUM_VECTORS_PER_BLOCK][2]; - - // Get the row index - if (warpLaneId == 0) { - row = atomicAdd(cudaRowCounter, 32 / THREADS_PER_VECTOR); - } - // Broadcast the value to other threads in the same warp and compute the row index of each vector - row = __shfl_sync(0xffffffff, row, 0) + warpVectorId; - - while (row < N) { - - // Use two threads to fetch the row offset - if (laneId < 2) { - space[vectorId][laneId] = d_ptr[row + laneId]; - } - rowStart = space[vectorId][0]; - rowEnd = space[vectorId][1]; - - sum = 0; - // Compute dot product - if (THREADS_PER_VECTOR == 32) { - - // Ensure aligned memory access - i = rowStart - (rowStart & (THREADS_PER_VECTOR - 1)) + laneId; - - // Process the unaligned part - if (i >= rowStart && i < rowEnd) { - sum += d_val[i] * d_vector[d_cols[i]]; - } - - // Process the aligned part - for (i += THREADS_PER_VECTOR; i < rowEnd; i += THREADS_PER_VECTOR) { - sum += d_val[i] * d_vector[d_cols[i]]; - } - } else { - for (i = rowStart + laneId; i < rowEnd; i += THREADS_PER_VECTOR) { - sum += d_val[i] * d_vector[d_cols[i]]; - } - } - // Intra-vector reduction - for (i = THREADS_PER_VECTOR >> 1; i > 0; i >>= 1) { - sum += __shfl_down_sync(0xffffffff,sum, i); - } - - // Save the results - if (laneId == 0) { - d_out[row] = sum; - } - - // Get a new row index - if(warpLaneId == 0) { - row = atomicAdd(cudaRowCounter, 32 / THREADS_PER_VECTOR); - } - // Broadcast the row index to the other threads in the same warp and compute the row index of each vector - row = __shfl_sync(0xffffffff,row, 0) + warpVectorId; - } -} - - -__inline__ __device__ float warp_reduce(float val) { - int warp_size = 32; - for (int offset = warp_size / 2; offset > 0; offset /= 2) - val += __shfl_down_sync(0xFFFFFFFF, val, offset); - return val; -} - -extern "C" __global__ void sum(const float *x, float* z, int N) { - int warp_size = 32; - float sum = float(0); - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { - sum += x[i]; - } - sum = warp_reduce(sum); // Obtain the sum of values in the current warp; - if ((threadIdx.x & (warp_size - 1)) == 0) // Same as (threadIdx.x % warp_size) == 0 but faster - atomicAdd(z, sum); // The first thread in the warp updates the output; -} - -extern "C" __global__ void divide(const float* x, float *y, float *val, int n) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { - y[i] = x[i] / val[0]; - } -} \ No newline at end of file diff --git a/projects/resources/cuda/old/b7_default.cu b/projects/resources/cuda/old/b7_default.cu deleted file mode 100644 index a4e7e3ba..00000000 --- a/projects/resources/cuda/old/b7_default.cu +++ /dev/null @@ -1,243 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b7.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void random_coo(int* x, int *y, int *val, int N, int degree) { - for (int i = 0; i < N; i++) { - std::set edges; - while (edges.size() < degree) { - edges.insert(rand() % N); - } - int j = 0; - for (auto iter = edges.begin(); iter != edges.end(); iter++, j++) { - x[i * degree + j] = i; - y[i * degree + j] = *iter; - val[i * degree + j] = 1; - } - } -} - -void reset(float *auth1, float *auth2, float *hub1, float* hub2, float *auth_norm, float *hub_norm, int N, cudaStream_t s1, cudaStream_t s2) { - for (int i = 0; i < N; i++) { - auth1[i] = 1; - auth2[i] = 1; - hub1[i] = 1; - hub2[i] = 1; - } - auth_norm[0] = 0; - hub_norm[0] = 0; - - // cudaMemPrefetchAsync(auth1, N * sizeof(int), 0, s2); - // cudaMemPrefetchAsync(auth2, N * sizeof(int), 0, s1); - // cudaMemPrefetchAsync(hub1, N * sizeof(int), 0, s1); - // cudaMemPrefetchAsync(hub2, N * sizeof(int), 0, s2); - // cudaMemPrefetchAsync(auth_norm, sizeof(float), 0); - // cudaMemPrefetchAsync(hub_norm, sizeof(float), 0); - // cudaDeviceSynchronize(); -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int degree = 3; - int iterations = 5; - - int block_size = options.block_size_1d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - int nnz = degree * N; - - if (debug) { - std::cout << "running b7 default" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - int *ptr, *idx, *val, *ptr2, *idx2, *val2, *rowCounter1, *rowCounter2; - - int *ptr_tmp, *idx_tmp, *val_tmp, *ptr2_tmp, *idx2_tmp, *val2_tmp; - - float *auth1, *auth2, *hub1, *hub2, *auth_norm, *hub_norm; - - // Use temporary CPU vectors to simplify reinitialization at each benchmark execution; - ptr_tmp = (int *) malloc(sizeof(int) * (N + 1)); - ptr2_tmp = (int *) malloc(sizeof(int) * (N + 1)); - idx_tmp = (int *) malloc(sizeof(int) * nnz); - idx2_tmp = (int *) malloc(sizeof(int) * nnz); - val_tmp = (int *) malloc(sizeof(int) * nnz); - val2_tmp = (int *) malloc(sizeof(int) * nnz); - - err = cudaMallocManaged(&ptr, sizeof(int) * (N + 1)); - err = cudaMallocManaged(&ptr2, sizeof(int) * (N + 1)); - err = cudaMallocManaged(&idx, sizeof(int) * nnz); - err = cudaMallocManaged(&idx2, sizeof(int) * nnz); - err = cudaMallocManaged(&val, sizeof(int) * nnz); - err = cudaMallocManaged(&val2, sizeof(int) * nnz); - err = cudaMallocManaged(&rowCounter1, sizeof(int)); - err = cudaMallocManaged(&rowCounter2, sizeof(int)); - - err = cudaMallocManaged(&auth1, sizeof(float) * N); - err = cudaMallocManaged(&auth2, sizeof(float) * N); - err = cudaMallocManaged(&hub1, sizeof(float) * N); - err = cudaMallocManaged(&hub2, sizeof(float) * N); - err = cudaMallocManaged(&auth_norm, sizeof(float)); - err = cudaMallocManaged(&hub_norm, sizeof(float)); - - if (debug && err) std::cout << err << std::endl; - - // Create streams; - cudaStream_t s1, s2; - err = cudaStreamCreate(&s1); - err = cudaStreamCreate(&s2); - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - - // Create a random COO; - int *x = (int*) malloc(nnz * sizeof(int)); - int *y = (int*) malloc(nnz * sizeof(int)); - int *v = (int*) malloc(nnz * sizeof(int)); - random_coo(x, y, v, N, degree); - - // Create a CSR; - coo2csr(ptr_tmp, idx_tmp, val_tmp, x, y, v, N, N, nnz); - coo2csr(ptr2_tmp, idx2_tmp, val2_tmp, y, x, v, N, N, nnz); - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - for (int j = 0; j < nnz; j++) { - idx[j] = idx_tmp[j]; - idx2[j] = idx2_tmp[j]; - val[j] = val_tmp[j]; - val2[j] = val2_tmp[j]; - } - for (int j = 0; j < N + 1; j++) { - ptr[j] = ptr_tmp[j]; - ptr2[j] = ptr2_tmp[j]; - } - reset(auth1, auth2, hub1, hub2, auth_norm, hub_norm, N, s1, s2); - rowCounter1[0] = 0; - rowCounter2[0] = 0; - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - for (int iter = 0; iter < iterations; iter++) { - - // cudaMemPrefetchAsync(auth1, N * sizeof(float), 0, s2); - // cudaMemPrefetchAsync(auth2, N * sizeof(float), 0, s1); - // cudaMemPrefetchAsync(hub1, N * sizeof(float), 0, s1); - // cudaMemPrefetchAsync(hub2, N * sizeof(float), 0, s2); - // cudaMemPrefetchAsync(auth_norm, sizeof(float), 0, s1); - // cudaMemPrefetchAsync(hub_norm, sizeof(float), 0, s2); - - cudaStreamAttachMemAsync(s1, ptr2, 0); - cudaStreamAttachMemAsync(s1, idx2, 0); - cudaStreamAttachMemAsync(s1, val2, 0); - cudaStreamAttachMemAsync(s1, hub1, 0); - cudaStreamAttachMemAsync(s1, auth2, 0); - - cudaStreamAttachMemAsync(s2, ptr, 0); - cudaStreamAttachMemAsync(s2, idx, 0); - cudaStreamAttachMemAsync(s2, val, 0); - cudaStreamAttachMemAsync(s2, auth1, 0); - cudaStreamAttachMemAsync(s2, hub2, 0); - - cudaEvent_t e1, e2; - cudaEventCreate(&e1); - cudaEventCreate(&e2); - - int nb = ceil(N / ((float) block_size)); - - // spmv<<>>(ptr2, idx2, val2, hub1, auth2, N, nnz); - spmv3<<>>(rowCounter1, ptr2, idx2, val2, hub1, auth2, N); - err = cudaEventRecord(e1, s1); - // spmv<<>>(ptr, idx, val, auth1, hub2, N, nnz); - spmv3<<>>(rowCounter2, ptr, idx, val, auth1, hub2, N); - err = cudaEventRecord(e2, s2); - - sum<<>>(auth2, auth_norm, N); - - sum<<>>(hub2, hub_norm, N); - - // Stream 1 waits stream 2; - err = cudaStreamWaitEvent(s1, e2, 0); - cudaStreamAttachMemAsync(s1, auth1, 0); - divide<<>>(auth2, auth1, auth_norm, N); - // Stream 2 waits stream 1; - err = cudaStreamWaitEvent(s2, e1, 0); - cudaStreamAttachMemAsync(s2, hub1, 0); - divide<<>>(hub2, hub1, hub_norm, N); - - err = cudaStreamSynchronize(s1); - err = cudaStreamSynchronize(s2); - auth_norm[0] = 0; - hub_norm[0] = 0; - rowCounter1[0] = 0; - rowCounter2[0] = 0; - - if (debug && err) std::cout << err << std::endl; - } - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < 10; j++) { - std::cout << auth1[j] << ", "; - } - std::cout << ", ...]; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << 0.0 << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b7_sync.cu b/projects/resources/cuda/old/b7_sync.cu deleted file mode 100644 index 1f821d44..00000000 --- a/projects/resources/cuda/old/b7_sync.cu +++ /dev/null @@ -1,219 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b7.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void random_coo(int* x, int *y, int *val, int N, int degree) { - for (int i = 0; i < N; i++) { - std::set edges; - while (edges.size() < degree) { - edges.insert(rand() % N); - } - int j = 0; - for (auto iter = edges.begin(); iter != edges.end(); iter++, j++) { - x[i * degree + j] = i; - y[i * degree + j] = *iter; - val[i * degree + j] = 1; - } - } -} - -void reset(float *auth1, float *auth2, float *hub1, float* hub2, float *auth_norm, float *hub_norm, int N) { - for (int i = 0; i < N; i++) { - auth1[i] = 1; - auth2[i] = 1; - hub1[i] = 1; - hub2[i] = 1; - } - auth_norm[0] = 0; - hub_norm[0] = 0; - - // cudaMemPrefetchAsync(auth1, N * sizeof(float), 0); - // cudaMemPrefetchAsync(auth2, N * sizeof(float), 0); - // cudaMemPrefetchAsync(hub1, N * sizeof(float), 0); - // cudaMemPrefetchAsync(hub2, N * sizeof(float), 0); - // cudaMemPrefetchAsync(auth_norm, sizeof(float), 0); - // cudaMemPrefetchAsync(hub_norm, sizeof(float), 0); - // cudaDeviceSynchronize(); -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int degree = 3; - int iterations = 5; - - int block_size = options.block_size_1d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - int nnz = degree * N; - - if (debug) { - std::cout << "running b7 sync" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - int *ptr, *idx, *val, *ptr2, *idx2, *val2, *rowCounter1, *rowCounter2; - int *ptr_tmp, *idx_tmp, *val_tmp, *ptr2_tmp, *idx2_tmp, *val2_tmp; - - float *auth1, *auth2, *hub1, *hub2, *auth_norm, *hub_norm; - - // Use temporary CPU vectors to simplify reinitialization at each benchmark execution; - ptr_tmp = (int *) malloc(sizeof(int) * (N + 1)); - ptr2_tmp = (int *) malloc(sizeof(int) * (N + 1)); - idx_tmp = (int *) malloc(sizeof(int) * nnz); - idx2_tmp = (int *) malloc(sizeof(int) * nnz); - val_tmp = (int *) malloc(sizeof(int) * nnz); - val2_tmp = (int *) malloc(sizeof(int) * nnz); - - err = cudaMallocManaged(&ptr, sizeof(int) * (N + 1)); - err = cudaMallocManaged(&ptr2, sizeof(int) * (N + 1)); - err = cudaMallocManaged(&idx, sizeof(int) * nnz); - err = cudaMallocManaged(&idx2, sizeof(int) * nnz); - err = cudaMallocManaged(&val, sizeof(int) * nnz); - err = cudaMallocManaged(&val2, sizeof(int) * nnz); - err = cudaMallocManaged(&rowCounter1, sizeof(int)); - err = cudaMallocManaged(&rowCounter2, sizeof(int)); - - err = cudaMallocManaged(&auth1, sizeof(float) * N); - err = cudaMallocManaged(&auth2, sizeof(float) * N); - err = cudaMallocManaged(&hub1, sizeof(float) * N); - err = cudaMallocManaged(&hub2, sizeof(float) * N); - err = cudaMallocManaged(&auth_norm, sizeof(float)); - err = cudaMallocManaged(&hub_norm, sizeof(float)); - - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - - // Create a random COO; - int *x = (int*) malloc(nnz * sizeof(int)); - int *y = (int*) malloc(nnz * sizeof(int)); - int *v = (int*) malloc(nnz * sizeof(int)); - random_coo(x, y, v, N, degree); - - // Create a CSR; - coo2csr(ptr_tmp, idx_tmp, val_tmp, x, y, v, N, N, nnz); - coo2csr(ptr2_tmp, idx2_tmp, val2_tmp, y, x, v, N, N, nnz); - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - for (int j = 0; j < nnz; j++) { - idx[j] = idx_tmp[j]; - idx2[j] = idx2_tmp[j]; - val[j] = val_tmp[j]; - val2[j] = val2_tmp[j]; - } - for (int j = 0; j < N + 1; j++) { - ptr[j] = ptr_tmp[j]; - ptr2[j] = ptr2_tmp[j]; - } - reset(auth1, auth2, hub1, hub2, auth_norm, hub_norm, N); - rowCounter1[0] = 0; - rowCounter2[0] = 0; - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - for (int iter = 0; iter < iterations; iter++) { - - // cudaMemPrefetchAsync(auth1, N * sizeof(float), 0); - // cudaMemPrefetchAsync(auth2, N * sizeof(float), 0); - // cudaMemPrefetchAsync(hub1, N * sizeof(float), 0); - // cudaMemPrefetchAsync(hub2, N * sizeof(float), 0); - // cudaMemPrefetchAsync(auth_norm, sizeof(float), 0); - // cudaMemPrefetchAsync(hub_norm, sizeof(float), 0); - // cudaDeviceSynchronize(); - - int nb = ceil(N / ((float) block_size)); - - // spmv<<>>(ptr2, idx2, val2, hub1, auth2, N, nnz); - spmv3<<>>(rowCounter1, ptr2, idx2, val2, hub1, auth2, N); - err = cudaDeviceSynchronize(); - - // spmv<<>>(ptr, idx, val, auth1, hub2, N, nnz); - spmv3<<>>(rowCounter2, ptr, idx, val, auth1, hub2, N); - err = cudaDeviceSynchronize(); - - sum<<>>(auth2, auth_norm, N); - err = cudaDeviceSynchronize(); - - sum<<>>(hub2, hub_norm, N); - err = cudaDeviceSynchronize(); - - divide<<>>(auth2, auth1, auth_norm, N); - err = cudaDeviceSynchronize(); - - divide<<>>(hub2, hub1, hub_norm, N); - err = cudaDeviceSynchronize(); - - auth_norm[0] = 0; - hub_norm[0] = 0; - rowCounter1[0] = 0; - rowCounter2[0] = 0; - - if (debug && err) std::cout << err << std::endl; - } - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < 10; j++) { - std::cout << auth1[j] << ", "; - } - std::cout << ", ...]; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << 0.0 << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b8.cuh b/projects/resources/cuda/old/b8.cuh deleted file mode 100644 index f045253f..00000000 --- a/projects/resources/cuda/old/b8.cuh +++ /dev/null @@ -1,160 +0,0 @@ - -///////////////////////////// -///////////////////////////// - -extern "C" __global__ void gaussian_blur(const float *image, float *result, int rows, int cols, const float* kernel, int diameter) { - extern __shared__ float kernel_local[]; - for(int i = threadIdx.x; i < diameter; i += blockDim.x) { - for(int j = threadIdx.y; j < diameter; j += blockDim.y) { - kernel_local[i * diameter + j] = kernel[i * diameter + j]; - } - } - __syncthreads(); - - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < rows; i += blockDim.x * gridDim.x) { - for(int j = blockIdx.y * blockDim.y + threadIdx.y; j < cols; j += blockDim.y * gridDim.y) { - float sum = 0; - int radius = diameter / 2; - for (int x = -radius; x <= radius; ++x) { - for (int y = -radius; y <= radius; ++y) { - int nx = x + i; - int ny = y + j; - if (nx >= 0 && ny >= 0 && nx < rows && ny < cols) { - sum += kernel_local[(x + radius) * diameter + (y + radius)] * image[nx * cols + ny]; - } - } - } - result[i * cols + j] = sum; - } - } -} - -extern "C" __global__ void sobel(const float *image, float *result, int rows, int cols) { - // int SOBEL_X[3][3] = {{-1, -2, -1}, {0, 0, 0}, {1, 2, 1}}; - // int SOBEL_Y[3][3] = {{-1, 0, 1}, {-2, 0, 2}, {-1, 0, 1}}; - __shared__ int SOBEL_X[9]; - __shared__ int SOBEL_Y[9]; - if (threadIdx.x == 0 && threadIdx.y == 0) { - SOBEL_X[0] = -1; - SOBEL_X[1] = -2; - SOBEL_X[2] = -1; - SOBEL_X[3] = 0; - SOBEL_X[4] = 0; - SOBEL_X[5] = 0; - SOBEL_X[6] = 1; - SOBEL_X[7] = 2; - SOBEL_X[8] = 1; - - SOBEL_Y[0] = -1; - SOBEL_Y[1] = 0; - SOBEL_Y[2] = 1; - SOBEL_Y[3] = -2; - SOBEL_Y[4] = 0; - SOBEL_Y[5] = 2; - SOBEL_Y[6] = -1; - SOBEL_Y[7] = 0; - SOBEL_Y[8] = 1; - } - __syncthreads(); - - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < rows; i += blockDim.x * gridDim.x) { - for(int j = blockIdx.y * blockDim.y + threadIdx.y; j < cols; j += blockDim.y * gridDim.y) { - float sum_gradient_x = 0.0, sum_gradient_y = 0.0; - int radius = 1; - for (int x = -radius; x <= radius; ++x) { - for (int y = -radius; y <= radius; ++y) { - int nx = x + i; - int ny = y + j; - if (nx >= 0 && ny >= 0 && nx < rows && ny < cols) { - float neighbour = image[nx * cols + ny]; - int s = (x + radius) * 3 + y + radius; - sum_gradient_x += SOBEL_X[s] * neighbour; - sum_gradient_y += SOBEL_Y[s] * neighbour; - } - } - } - result[i * cols + j] = sqrt(sum_gradient_x * sum_gradient_x + sum_gradient_y * sum_gradient_y); - } - } -} - -__device__ float atomicMinf(float* address, float val) -{ - int *address_as_int =(int*)address; - int old = *address_as_int, assumed; - while (val < __int_as_float(old)) { - assumed = old; - old = atomicCAS(address_as_int, assumed, - __float_as_int(val)); - } - return __int_as_float(old); -} - -__device__ float atomicMaxf(float* address, float val) -{ - int *address_as_int = (int*) address; - int old = *address_as_int, assumed; - // If val is smaller than current, don't do anything, else update the current value atomically; - while (val > __int_as_float(old)) { - assumed = old; - old = atomicCAS(address_as_int, assumed, __float_as_int(val)); - } - return __int_as_float(old); -} - -__inline__ __device__ float warp_reduce_max(float val) { - int warp_size = 32; - for (int offset = warp_size / 2; offset > 0; offset /= 2) - val = max(val, __shfl_down_sync(0xFFFFFFFF, val, offset)); - return val; -} - -__inline__ __device__ float warp_reduce_min(float val) { - int warp_size = 32; - for (int offset = warp_size / 2; offset > 0; offset /= 2) - val = min(val, __shfl_down_sync(0xFFFFFFFF, val, offset)); - return val; -} - -extern "C" __global__ void maximum_kernel(const float *in, float* out, int N) { - int warp_size = 32; - float maximum = -1000; - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { - maximum = max(maximum, in[i]); - } - maximum = warp_reduce_max(maximum); // Obtain the max of values in the current warp; - if ((threadIdx.x & (warp_size - 1)) == 0) // Same as (threadIdx.x % warp_size) == 0 but faster - atomicMaxf(out, maximum); // The first thread in the warp updates the output; -} - -extern "C" __global__ void minimum_kernel(const float *in, float* out, int N) { - int warp_size = 32; - float minimum = 1000; - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < N; i += blockDim.x * gridDim.x) { - minimum = min(minimum, in[i]); - } - minimum = warp_reduce_min(minimum); // Obtain the min of values in the current warp; - if ((threadIdx.x & (warp_size - 1)) == 0) // Same as (threadIdx.x % warp_size) == 0 but faster - atomicMinf(out, minimum); // The first thread in the warp updates the output; -} - -extern "C" __global__ void extend(float *x, const float *minimum, const float *maximum, int n) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { - float res_tmp = 5 * (x[i] - *minimum) / (*maximum - *minimum); - x[i] = res_tmp > 1 ? 1 : res_tmp; - } -} - -extern "C" __global__ void unsharpen(const float *x, const float *y, float *res, float amount, int n) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { - float res_tmp = x[i] * (1 + amount) - y[i] * amount; - res_tmp = res_tmp > 1 ? 1 : res_tmp; - res[i] = res_tmp < 0 ? 0 : res_tmp; - } -} - -extern "C" __global__ void combine(const float *x, const float *y, const float *mask, float *res, int n) { - for(int i = blockIdx.x * blockDim.x + threadIdx.x; i < n; i += blockDim.x * gridDim.x) { - res[i] = x[i] * mask[i] + y[i] * (1 - mask[i]); - } -} diff --git a/projects/resources/cuda/old/b8_default.cu b/projects/resources/cuda/old/b8_default.cu deleted file mode 100644 index 0a85e575..00000000 --- a/projects/resources/cuda/old/b8_default.cu +++ /dev/null @@ -1,221 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b8.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void reset(float *image, float *maximum, float *minimum, int N) { - for (int i = 0; i < N; i++) { - for (int j = 0; j < N; j++) { - image[i * N + j] = 0; - } - } - *maximum = 0; - *minimum = 0; -} - -void gaussian_kernel(float* kernel, int diameter, float sigma) { - int mean = diameter / 2; - float sum_tmp = 0; - for (int i = 0; i < diameter; i++) { - for (int j = 0; j < diameter; j++) { - kernel[i * diameter + j] = exp(-0.5 * ((i - mean) * (i - mean) + (j - mean) * (j - mean)) / (sigma * sigma)); - sum_tmp += kernel[i * diameter + j]; - } - } - for (int i = 0; i < diameter; i++) { - for (int j = 0; j < diameter; j++) { - kernel[i * diameter + j] /= sum_tmp; - } - } -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int kernel_small_diameter = 3; - int kernel_large_diameter = 5; - int kernel_unsharpen_diameter = 3; - - int block_size_1d = options.block_size_1d; - int block_size_2d = options.block_size_2d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - if (debug) { - std::cout << "running b8 default" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size_1d << std::endl; - std::cout << "block size 2d=" << block_size_2d << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - float *image, *image2, *image3, *image_unsharpen, *mask_small, *mask_large, *mask_unsharpen, *blurred_small, *blurred_large, *blurred_unsharpen; - float *kernel_small, *kernel_large, *kernel_unsharpen, *maximum, *minimum; - err = cudaMallocManaged(&image, sizeof(float) * N * N); - err = cudaMallocManaged(&image2, sizeof(float) * N * N); - err = cudaMallocManaged(&image3, sizeof(float) * N * N); - err = cudaMallocManaged(&image_unsharpen, sizeof(float) * N * N); - err = cudaMallocManaged(&mask_small, sizeof(float) * N * N); - err = cudaMallocManaged(&mask_large, sizeof(float) * N * N); - err = cudaMallocManaged(&mask_unsharpen, sizeof(float) * N * N); - err = cudaMallocManaged(&blurred_small, sizeof(float) * N * N); - err = cudaMallocManaged(&blurred_large, sizeof(float) * N * N); - err = cudaMallocManaged(&blurred_unsharpen, sizeof(float) * N * N); - - err = cudaMallocManaged(&kernel_small, sizeof(float) * kernel_small_diameter * kernel_small_diameter); - err = cudaMallocManaged(&kernel_large, sizeof(float) * kernel_large_diameter * kernel_large_diameter); - err = cudaMallocManaged(&kernel_unsharpen, sizeof(float) * kernel_unsharpen_diameter * kernel_unsharpen_diameter); - err = cudaMallocManaged(&maximum, sizeof(float)); - err = cudaMallocManaged(&minimum, sizeof(float)); - - if (debug && err) std::cout << err << std::endl; - - // Initialize arrays; - start = clock_type::now(); - for (int i = 0; i < N; i++) { - for (int j = 0; j < N; j++) { - image[i * N + j] = (float)(rand()) / (float)(RAND_MAX); - } - } - gaussian_kernel(kernel_small, kernel_small_diameter, 1); - gaussian_kernel(kernel_large, kernel_large_diameter, 10); - gaussian_kernel(kernel_unsharpen, kernel_unsharpen_diameter, 5); - - // Create streams; - cudaStream_t s1, s2, s3, s4, s5; - err = cudaStreamCreate(&s1); - err = cudaStreamCreate(&s2); - err = cudaStreamCreate(&s3); - err = cudaStreamCreate(&s4); - err = cudaStreamCreate(&s5); - if (err) std::cout << err << std::endl; - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(image3, maximum, minimum, N); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - dim3 block_size_2d_dim(block_size_2d, block_size_2d); - dim3 grid_size(num_blocks, num_blocks); - int nb = num_blocks / 2; - dim3 grid_size_2(nb, nb); - - start = clock_type::now(); - - cudaStreamAttachMemAsync(s1, blurred_small, 0); - cudaStreamAttachMemAsync(s1, mask_small, 0); - cudaStreamAttachMemAsync(s2, blurred_large, 0); - cudaStreamAttachMemAsync(s2, mask_large, 0); - cudaStreamAttachMemAsync(s3, blurred_unsharpen, 0); - cudaStreamAttachMemAsync(s3, image_unsharpen, 0); - cudaStreamAttachMemAsync(s2, image2, 0); - cudaStreamAttachMemAsync(s1, image3, 0); - - gaussian_blur<<>>(image, blurred_small, N, N, kernel_small, kernel_small_diameter); - - gaussian_blur<<>>(image, blurred_large, N, N, kernel_large, kernel_large_diameter); - - gaussian_blur<<>>(image, blurred_unsharpen, N, N, kernel_unsharpen, kernel_unsharpen_diameter); - - sobel<<>>(blurred_small, mask_small, N, N); - - sobel<<>>(blurred_large, mask_large, N, N); - - cudaEvent_t e1, e2, e3, e4, e5; - cudaEventCreate(&e1); - cudaEventCreate(&e2); - cudaEventCreate(&e3); - cudaEventCreate(&e4); - cudaEventCreate(&e5); - - cudaEventRecord(e1, s2); - cudaStreamWaitEvent(s5, e1, 0); - maximum_kernel<<>>(mask_large, maximum, N * N); - - cudaStreamWaitEvent(s4, e1, 0); - minimum_kernel<<>>(mask_large, minimum, N * N); - - cudaEventRecord(e2, s4); - cudaEventRecord(e5, s5); - - cudaStreamWaitEvent(s2, e2, 0); - cudaStreamWaitEvent(s2, e5, 0); - - extend<<>>(mask_large, minimum, maximum, N * N); - - unsharpen<<>>(image, blurred_unsharpen, image_unsharpen, 0.5, N * N); - cudaEventRecord(e3, s3); - cudaStreamWaitEvent(s2, e3, 0); - combine<<>>(image_unsharpen, blurred_large, mask_large, image2, N * N); - cudaEventRecord(e4, s2); - cudaStreamWaitEvent(s1, e4, 0); - cudaStreamAttachMemAsync(s1, image2, 0); - - combine<<>>(image2, blurred_small, mask_small, image3, N * N); - - // Extra - // cudaEventRecord(e1, s2); - // cudaEventRecord(e2, s3); - // cudaStreamWaitEvent(s1, e1, 0); - // cudaStreamWaitEvent(s1, e2, 0); - // combine<<>>(blurred_small, blurred_large, blurred_unsharpen, image3, N * N); - - cudaStreamSynchronize(s1); - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - if (i >= skip_iterations) tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < 10; j++) { - std::cout << image3[j] << ", "; - } - std::cout << ", ...]; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << 0.0 << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * (num_executions - skip_iterations)) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b8_sync.cu b/projects/resources/cuda/old/b8_sync.cu deleted file mode 100644 index 6bf0ebff..00000000 --- a/projects/resources/cuda/old/b8_sync.cu +++ /dev/null @@ -1,189 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "utils.hpp" -#include "options.hpp" -#include "b8.cuh" - -///////////////////////////// -///////////////////////////// - -namespace chrono = std::chrono; -using clock_type = chrono::high_resolution_clock; - -///////////////////////////// -///////////////////////////// - -void reset(float *image, float *maximum, float *minimum, int N) { - for (int i = 0; i < N; i++) { - for (int j = 0; j < N; j++) { - image[i * N + j] = 0; - } - } - *maximum = 0; - *minimum = 0; -} - -void gaussian_kernel(float* kernel, int diameter, float sigma) { - int mean = diameter / 2; - float sum_tmp = 0; - for (int i = 0; i < diameter; i++) { - for (int j = 0; j < diameter; j++) { - kernel[i * diameter + j] = exp(-0.5 * ((i - mean) * (i - mean) + (j - mean) * (j - mean)) / (sigma * sigma)); - sum_tmp += kernel[i * diameter + j]; - } - } - for (int i = 0; i < diameter; i++) { - for (int j = 0; j < diameter; j++) { - kernel[i * diameter + j] /= sum_tmp; - } - } -} - -///////////////////////////// -///////////////////////////// - -int main(int argc, char *argv[]) { - - srand(time(0)); - - Options options = Options(argc, argv); - int debug = options.debug; - - int num_executions = options.num_iter; - int N = options.N; - - int kernel_small_diameter = 3; - int kernel_large_diameter = 5; - int kernel_unsharpen_diameter = 3; - - int block_size_1d = options.block_size_1d; - int block_size_2d = options.block_size_2d; - int num_blocks = options.num_blocks; - int skip_iterations = options.skip_iterations; - int err = 0; - - if (debug) { - std::cout << "running b8 sync" << std::endl; - std::cout << "N=" << N << std::endl; - std::cout << "num executions=" << num_executions << std::endl; - std::cout << "block size 1d=" << block_size_1d << std::endl; - std::cout << "block size 2d=" << block_size_2d << std::endl; - std::cout << "num blocks=" << num_blocks << std::endl; - std::cout << "skip iteration time=" << skip_iterations << std::endl; - } - - auto start = clock_type::now(); - float *image, *image2, *image3, *image_unsharpen, *mask_small, *mask_large, *mask_unsharpen, *blurred_small, *blurred_large, *blurred_unsharpen; - float *kernel_small, *kernel_large, *kernel_unsharpen, *maximum, *minimum; - err = cudaMallocManaged(&image, sizeof(float) * N * N); - err = cudaMallocManaged(&image2, sizeof(float) * N * N); - err = cudaMallocManaged(&image3, sizeof(float) * N * N); - err = cudaMallocManaged(&image_unsharpen, sizeof(float) * N * N); - err = cudaMallocManaged(&mask_small, sizeof(float) * N * N); - err = cudaMallocManaged(&mask_large, sizeof(float) * N * N); - err = cudaMallocManaged(&mask_unsharpen, sizeof(float) * N * N); - err = cudaMallocManaged(&blurred_small, sizeof(float) * N * N); - err = cudaMallocManaged(&blurred_large, sizeof(float) * N * N); - err = cudaMallocManaged(&blurred_unsharpen, sizeof(float) * N * N); - - err = cudaMallocManaged(&kernel_small, sizeof(float) * kernel_small_diameter * kernel_small_diameter); - err = cudaMallocManaged(&kernel_large, sizeof(float) * kernel_large_diameter * kernel_large_diameter); - err = cudaMallocManaged(&kernel_unsharpen, sizeof(float) * kernel_unsharpen_diameter * kernel_unsharpen_diameter); - err = cudaMallocManaged(&maximum, sizeof(float)); - err = cudaMallocManaged(&minimum, sizeof(float)); - - if (debug && err) std::cout << err << std::endl; - - // Initialze arrays; - start = clock_type::now(); - for (int i = 0; i < N; i++) { - for (int j = 0; j < N; j++) { - image[i * N + j] = (float)(rand()) / (float)(RAND_MAX); - } - } - gaussian_kernel(kernel_small, kernel_small_diameter, 1); - gaussian_kernel(kernel_large, kernel_large_diameter, 10); - gaussian_kernel(kernel_unsharpen, kernel_unsharpen_diameter, 5); - - auto end = clock_type::now(); - if (debug) std::cout << "init=" << (float) chrono::duration_cast(end - start).count() / 1000 << " ms" << std::endl; - - // Print header; - if (!debug) std::cout << "num_iter,gpu_result,total_time_sec,overhead_sec,computation_sec" << std::endl; - - float tot = 0; - for (int i = 0; i < num_executions; i++) { - if (debug) std::cout << "\n-- iter=" << i << std::endl; - auto start_tmp = clock_type::now(); - reset(image3, maximum, minimum, N); - auto end_tmp = clock_type::now(); - auto reset_time = chrono::duration_cast(end_tmp - start_tmp).count(); - if (debug) std::cout << " reset=" << (float) reset_time / 1000 << " ms" << std::endl; - - start = clock_type::now(); - - dim3 block_size_2d_dim(block_size_2d, block_size_2d); - dim3 grid_size(num_blocks, num_blocks); - dim3 grid_size_2(num_blocks / 2, num_blocks / 2); - - gaussian_blur<<>>(image, blurred_small, N, N, kernel_small, kernel_small_diameter); - cudaDeviceSynchronize(); - - gaussian_blur<<>>(image, blurred_large, N, N, kernel_large, kernel_large_diameter); - cudaDeviceSynchronize(); - - gaussian_blur<<>>(image, blurred_unsharpen, N, N, kernel_unsharpen, kernel_unsharpen_diameter); - cudaDeviceSynchronize(); - - sobel<<>>(blurred_small, mask_small, N, N); - cudaDeviceSynchronize(); - - sobel<<>>(blurred_large, mask_large, N, N); - cudaDeviceSynchronize(); - - maximum_kernel<<>>(mask_large, maximum, N * N); - cudaDeviceSynchronize(); - - minimum_kernel<<>>(mask_large, minimum, N * N); - cudaDeviceSynchronize(); - - extend<<>>(mask_large, minimum, maximum, N * N); - cudaDeviceSynchronize(); - - unsharpen<<>>(image, blurred_unsharpen, image_unsharpen, 0.5, N * N); - cudaDeviceSynchronize(); - - combine<<>>(image_unsharpen, blurred_large, mask_large, image2, N * N); - cudaDeviceSynchronize(); - - combine<<>>(image2, blurred_small, mask_small, image3, N * N); - - // Extra - // combine<<>>(blurred_small, blurred_large, blurred_unsharpen, image3, N * N); - - cudaDeviceSynchronize(); - - end = clock_type::now(); - auto tmp = chrono::duration_cast(end - start).count(); - tot += tmp; - - if (debug) { - std::cout << " gpu result=["; - for (int j = 0; j < 10; j++) { - std::cout << image3[j] << ", "; - } - std::cout << ", ...]; time=" << (float) tmp / 1000 << " ms" << std::endl; - } else { - std::cout << i << "," << 0.0 << "," << (float) (reset_time + tmp) / 1e6 << "," << (float) reset_time / 1e6 << "," << (float) tmp / 1e6 << std::endl; - } - } - - // Print; - cudaDeviceSynchronize(); - - if (debug) std::cout << "\nmean exec time=" << (float) tot / (1000 * num_executions) << " ms" << std::endl; -} diff --git a/projects/resources/cuda/old/b9.cuh b/projects/resources/cuda/old/b9.cuh deleted file mode 100644 index 30eec586..00000000 --- a/projects/resources/cuda/old/b9.cuh +++ /dev/null @@ -1,16 +0,0 @@ -#pragma once -#include "benchmark.cuh" - -class Benchmark1 : public Benchmark -{ -public: - Benchmark1(Options &options) : Benchmark(options) {} - void alloc(); - void init(); - void reset(); - void execute_sync(int iter); - void execute_async(int iter); - void execute_cudagraph(int iter); - void execute_cudagraph_manual(int iter); - std::string print_result(bool short_form = false); -}; diff --git a/projects/resources/cuda/old/options.hpp b/projects/resources/cuda/old/options.hpp deleted file mode 100644 index 058977ce..00000000 --- a/projects/resources/cuda/old/options.hpp +++ /dev/null @@ -1,152 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include "utils.hpp" - -////////////////////////////// -////////////////////////////// - -#define DEBUG false -#define NUM_ITER 30 -#define DEFAULT_BLOCK_SIZE_1D 32 -#define DEFAULT_BLOCK_SIZE_2D 8 -#define DEFAULT_NUM_BLOCKS 64 -#define DEFAULT_SKIP 3 -#define DEFAULT_BENCHMARK "b1" -#define DEFAULT_POLICY "async" - -////////////////////////////// -////////////////////////////// - -enum Policy -{ - Sync, - Async, - CudaGraph, - CudaGraphAsync -}; - -enum BenchmarkEnum -{ - B1, - B5, - B6, - B7, - B8, - B10, - ERR -}; - -////////////////////////////// -////////////////////////////// - -inline Policy get_policy(std::string policy) -{ - if (policy == "sync") - return Policy::Sync; - else if (policy == "cudagraph") - return Policy::CudaGraph; - else if (policy == "cudagraph_manual") - return Policy::CudaGraphAsync; - else - return Policy::Async; -} - -inline BenchmarkEnum get_benchmark(std::string benchmark) -{ - if (benchmark == "b1") - return BenchmarkEnum::B1; - else if (benchmark == "b5") - return BenchmarkEnum::B5; - else if (benchmark == "b6") - return BenchmarkEnum::B6; - else if (benchmark == "b7") - return BenchmarkEnum::B7; - else if (benchmark == "b8") - return BenchmarkEnum::B8; - else if (benchmark == "b10") - return BenchmarkEnum::B10; - else - return BenchmarkEnum::ERR; -} - -struct Options -{ - - // Testing options; - uint num_iter = NUM_ITER; - int debug = DEBUG; - int block_size_1d = DEFAULT_BLOCK_SIZE_1D; - int block_size_2d = DEFAULT_BLOCK_SIZE_2D; - int num_blocks = DEFAULT_NUM_BLOCKS; - int N = 0; - int skip_iterations = DEFAULT_SKIP; - BenchmarkEnum benchmark_choice = get_benchmark(DEFAULT_BENCHMARK); - Policy policy_choice = get_policy(DEFAULT_POLICY); - - // Used for printing; - std::map benchmark_map; - std::map policy_map; - - ////////////////////////////// - ////////////////////////////// - - Options(int argc, char *argv[]) - { - map_init(policy_map)(Policy::Sync, "sync")(Policy::Async, "async")(Policy::CudaGraph, "cudagraph")(Policy::CudaGraphAsync, "cudagraph_manual"); - map_init(benchmark_map)(BenchmarkEnum::B1, "b1")(BenchmarkEnum::B5, "b5")(BenchmarkEnum::B6, "b6")(BenchmarkEnum::B7, "b7")(BenchmarkEnum::B8, "b8")(BenchmarkEnum::B10, "b10"); - - int opt; - static struct option long_options[] = {{"debug", no_argument, 0, 'd'}, - {"num_iter", required_argument, 0, 't'}, - {"N", required_argument, 0, 'n'}, - {"block_size_1d", required_argument, 0, 'b'}, - {"block_size_2d", required_argument, 0, 'c'}, - {"num_blocks", required_argument, 0, 'g'}, - {"skip_first", required_argument, 0, 's'}, - {"benchmark", required_argument, 0, 'k'}, - {"policy", required_argument, 0, 'p'}, - {0, 0, 0, 0}}; - // getopt_long stores the option index here; - int option_index = 0; - - while ((opt = getopt_long(argc, argv, "dt:n:b:c:g:s:k:p:", long_options, &option_index)) != EOF) - { - switch (opt) - { - case 'd': - debug = true; - break; - case 't': - num_iter = atoi(optarg); - break; - case 'n': - N = atoi(optarg); - break; - case 'b': - block_size_1d = atoi(optarg); - break; - case 'c': - block_size_2d = atoi(optarg); - break; - case 'g': - num_blocks = atoi(optarg); - break; - case 's': - skip_iterations = atoi(optarg); - break; - case 'k': - benchmark_choice = get_benchmark(optarg); - break; - case 'p': - policy_choice = get_policy(optarg); - break; - default: - break; - } - } - } -}; diff --git a/projects/resources/cuda/old/utils.hpp b/projects/resources/cuda/old/utils.hpp deleted file mode 100644 index 2181ac59..00000000 --- a/projects/resources/cuda/old/utils.hpp +++ /dev/null @@ -1,134 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -template struct map_init_helper -{ - T& data; - map_init_helper(T& d) : data(d) {} - map_init_helper& operator() (typename T::key_type const& key, typename T::mapped_type const& value) - { - data[key] = value; - return *this; - } -}; - -template map_init_helper map_init(T& item) -{ - return map_init_helper(item); -} - -template -inline bool compare(const std::tuple &lhs, const std::tuple &rhs) { - I a = std::get < 0 > (lhs); - I b = std::get < 0 > (rhs); - I c = std::get < 1 > (lhs); - I d = std::get < 1 > (rhs); - if (a == b) - return c < d; - else - return a < b; -} - -template -inline bool compare(const std::tuple &lhs, const std::tuple &rhs) { - I a = std::get < 0 > (lhs); - I b = std::get < 0 > (rhs); - I c = std::get < 1 > (lhs); - I d = std::get < 1 > (rhs); - if (a == b) - return c < d; - else - return a < b; -} - - -template -inline void customSort(I *row_indices, I *col_indices, T *values, I nnz) { - I nvals = nnz; - std::vector> my_tuple; - - for (I i = 0; i < nvals; ++i) - my_tuple.push_back(std::make_tuple(row_indices[i], col_indices[i], values[i], i)); - - std::sort(my_tuple.begin(), my_tuple.end(), compare); - - for (I i = 0; i < nvals; ++i) { - row_indices[i] = std::get<0>(my_tuple[i]); - col_indices[i] = std::get<1>(my_tuple[i]); - values[i] = std::get<2>(my_tuple[i]); - } -} - -template -inline void coo2csr(I *csrRowPtr, I *csrColInd, T *csrVal, I *row_indices, - I* col_indices, T* values, I nrows, I ncols, I nnz) { - - I temp, row, col, dest, cumsum = 0; - - std::vector row_indices_t(row_indices, row_indices + nnz); - std::vector col_indices_t (col_indices, col_indices + nnz); - std::vector values_t(values, values + nnz); - - customSort(row_indices_t.data(), col_indices_t.data(), values_t.data(), nnz); - - // Set all rowPtr to 0 - for (I i = 0; i <= nrows; i++) - csrRowPtr[i] = 0; - - // Go through all elements to see how many fall in each row - for (I i = 0; i < nnz; i++) { - row = row_indices_t[i]; - if (row >= nrows) - std::cout << "Error: Index out of bounds!\n"; - csrRowPtr[row]++; - } - - // Cumulative sum to obtain rowPtr - for (I i = 0; i < nrows; i++) { - temp = csrRowPtr[i]; - csrRowPtr[i] = cumsum; - cumsum += temp; - } - csrRowPtr[nrows] = nnz; - - // Store colInd and val - for (I i = 0; i < nnz; i++) { - row = row_indices_t[i]; - dest = csrRowPtr[row]; - col = col_indices_t[i]; - if (col >= ncols) - std::cout << "Error: Index out of bounds!\n"; - csrColInd[dest] = col; - csrVal[dest] = values_t[i]; - csrRowPtr[row]++; - } - cumsum = 0; - - // Undo damage done to rowPtr - for (I i = 0; i < nrows; i++) { - temp = csrRowPtr[i]; - csrRowPtr[i] = cumsum; - cumsum = temp; - } - temp = csrRowPtr[nrows]; - csrRowPtr[nrows] = cumsum; - cumsum = temp; -} - -template -inline void print_graph(T *ptr, T* idx, int N, int max_N = 20, int max_E = 20) { - std::cout << "-) degree: " << ptr[0] << std::endl; - for (int v = 1; v < std::min((int) N + 1, max_N); v++) { - std::cout << v - 1 << ") degree: " << ptr[v] - ptr[v - 1] << ", edges: "; - for (int e = 0; e < ptr[v] - ptr[v - 1]; e++) { - if (e < max_E) { - std::cout << idx[ptr[v - 1] + e] << ", "; - } - } - std::cout << std::endl; - } -} diff --git a/projects/resources/cuda/options.hpp b/projects/resources/cuda/options.hpp index b490301f..e673c172 100644 --- a/projects/resources/cuda/options.hpp +++ b/projects/resources/cuda/options.hpp @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include diff --git a/projects/resources/cuda/other/b1_default_nomanaged.cu b/projects/resources/cuda/other/b1_default_nomanaged.cu index 93f7256c..22756e58 100644 --- a/projects/resources/cuda/other/b1_default_nomanaged.cu +++ b/projects/resources/cuda/other/b1_default_nomanaged.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b1_sync_nomanaged.cu b/projects/resources/cuda/other/b1_sync_nomanaged.cu index 9792ebd1..0ae0bda1 100644 --- a/projects/resources/cuda/other/b1_sync_nomanaged.cu +++ b/projects/resources/cuda/other/b1_sync_nomanaged.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b4_default.cu b/projects/resources/cuda/other/b4_default.cu index 98f5eaaf..4c80035b 100644 --- a/projects/resources/cuda/other/b4_default.cu +++ b/projects/resources/cuda/other/b4_default.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b4_sync.cu b/projects/resources/cuda/other/b4_sync.cu index 4d354156..3eaa8959 100644 --- a/projects/resources/cuda/other/b4_sync.cu +++ b/projects/resources/cuda/other/b4_sync.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b5_default_nomanaged.cu b/projects/resources/cuda/other/b5_default_nomanaged.cu index d29357d4..6b70594d 100644 --- a/projects/resources/cuda/other/b5_default_nomanaged.cu +++ b/projects/resources/cuda/other/b5_default_nomanaged.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b5_sync_nomanaged.cu b/projects/resources/cuda/other/b5_sync_nomanaged.cu index e55bf70e..cbd1ff4f 100644 --- a/projects/resources/cuda/other/b5_sync_nomanaged.cu +++ b/projects/resources/cuda/other/b5_sync_nomanaged.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b9_default.cu b/projects/resources/cuda/other/b9_default.cu index 01937715..4633eb06 100644 --- a/projects/resources/cuda/other/b9_default.cu +++ b/projects/resources/cuda/other/b9_default.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/other/b9_sync.cu b/projects/resources/cuda/other/b9_sync.cu index 8e0b5b17..167b4bea 100644 --- a/projects/resources/cuda/other/b9_sync.cu +++ b/projects/resources/cuda/other/b9_sync.cu @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include #include diff --git a/projects/resources/cuda/utils.hpp b/projects/resources/cuda/utils.hpp index 38d8b954..3cc67e67 100644 --- a/projects/resources/cuda/utils.hpp +++ b/projects/resources/cuda/utils.hpp @@ -1,3 +1,32 @@ +// Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// * Neither the name of NECSTLab nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// * Neither the name of Politecnico di Milano nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once #include diff --git a/projects/resources/python/benchmark/bench/bench_1.py b/projects/resources/python/benchmark/bench/bench_1.py index f0abd098..fef2b98b 100644 --- a/projects/resources/python/benchmark/bench/bench_1.py +++ b/projects/resources/python/benchmark/bench/bench_1.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot from java.lang import System diff --git a/projects/resources/python/benchmark/bench/bench_10.py b/projects/resources/python/benchmark/bench/bench_10.py index 3bce8473..6b62d670 100644 --- a/projects/resources/python/benchmark/bench/bench_10.py +++ b/projects/resources/python/benchmark/bench/bench_10.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot from java.lang import System diff --git a/projects/resources/python/benchmark/bench/bench_2.py b/projects/resources/python/benchmark/bench/bench_2.py index 6b70d18e..3892849b 100644 --- a/projects/resources/python/benchmark/bench/bench_2.py +++ b/projects/resources/python/benchmark/bench/bench_2.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/benchmark/bench/bench_3.py b/projects/resources/python/benchmark/bench/bench_3.py index 98288f75..ea9d628b 100644 --- a/projects/resources/python/benchmark/bench/bench_3.py +++ b/projects/resources/python/benchmark/bench/bench_3.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/benchmark/bench/bench_4.py b/projects/resources/python/benchmark/bench/bench_4.py index 4d99e0b0..77973667 100644 --- a/projects/resources/python/benchmark/bench/bench_4.py +++ b/projects/resources/python/benchmark/bench/bench_4.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/benchmark/bench/bench_5.py b/projects/resources/python/benchmark/bench/bench_5.py index 9e47762a..16894603 100644 --- a/projects/resources/python/benchmark/bench/bench_5.py +++ b/projects/resources/python/benchmark/bench/bench_5.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/benchmark/bench/bench_6.py b/projects/resources/python/benchmark/bench/bench_6.py index 04478406..f4828f3b 100644 --- a/projects/resources/python/benchmark/bench/bench_6.py +++ b/projects/resources/python/benchmark/bench/bench_6.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/benchmark/bench/bench_7.py b/projects/resources/python/benchmark/bench/bench_7.py index 73cee1b7..b7241dbf 100644 --- a/projects/resources/python/benchmark/bench/bench_7.py +++ b/projects/resources/python/benchmark/bench/bench_7.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot from java.lang import System diff --git a/projects/resources/python/benchmark/bench/bench_8.py b/projects/resources/python/benchmark/bench/bench_8.py index fdbeb939..be508334 100644 --- a/projects/resources/python/benchmark/bench/bench_8.py +++ b/projects/resources/python/benchmark/bench/bench_8.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot from java.lang import System diff --git a/projects/resources/python/benchmark/bench/bench_9.py b/projects/resources/python/benchmark/bench/bench_9.py index 4ca89e43..43f70bb6 100644 --- a/projects/resources/python/benchmark/bench/bench_9.py +++ b/projects/resources/python/benchmark/bench/bench_9.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot from java.lang import System diff --git a/projects/resources/python/benchmark/benchmark.py b/projects/resources/python/benchmark/benchmark.py index e787dd23..fa6b7bc1 100644 --- a/projects/resources/python/benchmark/benchmark.py +++ b/projects/resources/python/benchmark/benchmark.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + from benchmark_result import BenchmarkResult from abc import ABC, abstractmethod from java.lang import System diff --git a/projects/resources/python/benchmark/benchmark_main.py b/projects/resources/python/benchmark/benchmark_main.py index 8d3497a0..87537106 100644 --- a/projects/resources/python/benchmark/benchmark_main.py +++ b/projects/resources/python/benchmark/benchmark_main.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import argparse from distutils.util import strtobool diff --git a/projects/resources/python/benchmark/benchmark_nvprof_wrapper.py b/projects/resources/python/benchmark/benchmark_nvprof_wrapper.py index 0344c2bf..7a679648 100644 --- a/projects/resources/python/benchmark/benchmark_nvprof_wrapper.py +++ b/projects/resources/python/benchmark/benchmark_nvprof_wrapper.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import argparse import subprocess import time diff --git a/projects/resources/python/benchmark/benchmark_result.py b/projects/resources/python/benchmark/benchmark_result.py index 7e009a05..36778f0b 100644 --- a/projects/resources/python/benchmark/benchmark_result.py +++ b/projects/resources/python/benchmark/benchmark_result.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import os from datetime import datetime import json diff --git a/projects/resources/python/benchmark/benchmark_wrapper.py b/projects/resources/python/benchmark/benchmark_wrapper.py index d41337bb..116858aa 100644 --- a/projects/resources/python/benchmark/benchmark_wrapper.py +++ b/projects/resources/python/benchmark/benchmark_wrapper.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + import argparse import subprocess import time diff --git a/projects/resources/python/benchmark/generate_graphs.py b/projects/resources/python/benchmark/generate_graphs.py index 868212bc..8ad4de05 100644 --- a/projects/resources/python/benchmark/generate_graphs.py +++ b/projects/resources/python/benchmark/generate_graphs.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + from random import sample import os import pickle diff --git a/projects/resources/python/examples/pipeline_1.py b/projects/resources/python/examples/pipeline_1.py index 972c5a16..8c8c7766 100644 --- a/projects/resources/python/examples/pipeline_1.py +++ b/projects/resources/python/examples/pipeline_1.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/examples/pipeline_2.py b/projects/resources/python/examples/pipeline_2.py index b8b754c5..a0362711 100644 --- a/projects/resources/python/examples/pipeline_2.py +++ b/projects/resources/python/examples/pipeline_2.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/examples/pipeline_3.py b/projects/resources/python/examples/pipeline_3.py index 222ca481..505b97fd 100644 --- a/projects/resources/python/examples/pipeline_3.py +++ b/projects/resources/python/examples/pipeline_3.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # coding=utf-8 import polyglot import time diff --git a/projects/resources/python/other/images.py b/projects/resources/python/other/images.py index 9badea6a..901a3813 100755 --- a/projects/resources/python/other/images.py +++ b/projects/resources/python/other/images.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/other/train_ensemble.py b/projects/resources/python/other/train_ensemble.py index 13e4ab65..11b0603e 100755 --- a/projects/resources/python/other/train_ensemble.py +++ b/projects/resources/python/other/train_ensemble.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*- diff --git a/projects/resources/python/plotting/compute_transfer_computation_overlap.py b/projects/resources/python/plotting/compute_transfer_computation_overlap.py index 5c9841c9..8ed7755f 100755 --- a/projects/resources/python/plotting/compute_transfer_computation_overlap.py +++ b/projects/resources/python/plotting/compute_transfer_computation_overlap.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/load_data.py b/projects/resources/python/plotting/load_data.py index 8d941622..54b5c1fe 100755 --- a/projects/resources/python/plotting/load_data.py +++ b/projects/resources/python/plotting/load_data.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_memory_throughput.py b/projects/resources/python/plotting/plot_memory_throughput.py index 945accb4..4f2df9a3 100755 --- a/projects/resources/python/plotting/plot_memory_throughput.py +++ b/projects/resources/python/plotting/plot_memory_throughput.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_memory_throughput_turing.py b/projects/resources/python/plotting/plot_memory_throughput_turing.py index 60aea1a6..ceaa8026 100644 --- a/projects/resources/python/plotting/plot_memory_throughput_turing.py +++ b/projects/resources/python/plotting/plot_memory_throughput_turing.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_speedup_baseline.py b/projects/resources/python/plotting/plot_speedup_baseline.py index bb5ef19c..20431123 100755 --- a/projects/resources/python/plotting/plot_speedup_baseline.py +++ b/projects/resources/python/plotting/plot_speedup_baseline.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_speedup_grcuda_cuda.py b/projects/resources/python/plotting/plot_speedup_grcuda_cuda.py index 88fa5880..36730aae 100755 --- a/projects/resources/python/plotting/plot_speedup_grcuda_cuda.py +++ b/projects/resources/python/plotting/plot_speedup_grcuda_cuda.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_theoretical_performance.py b/projects/resources/python/plotting/plot_theoretical_performance.py index 612328e1..df0db727 100755 --- a/projects/resources/python/plotting/plot_theoretical_performance.py +++ b/projects/resources/python/plotting/plot_theoretical_performance.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_transfer_computation_overlap.py b/projects/resources/python/plotting/plot_transfer_computation_overlap.py index 0702fe6f..43a8e50a 100755 --- a/projects/resources/python/plotting/plot_transfer_computation_overlap.py +++ b/projects/resources/python/plotting/plot_transfer_computation_overlap.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/projects/resources/python/plotting/plot_utils.py b/projects/resources/python/plotting/plot_utils.py index e2e5e256..54602ddd 100755 --- a/projects/resources/python/plotting/plot_utils.py +++ b/projects/resources/python/plotting/plot_utils.py @@ -1,3 +1,32 @@ +# Copyright (c) 2020, 2021, NECSTLab, Politecnico di Milano. All rights reserved. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of NECSTLab nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# * Neither the name of Politecnico di Milano nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #!/usr/bin/env python3 # -*- coding: utf-8 -*- """