From 583e13500f76a5ce03aafb054f57e92e476d7ed5 Mon Sep 17 00:00:00 2001 From: Jack Chung Date: Fri, 30 May 2014 09:30:10 -0500 Subject: [PATCH] [refactor] prepend copyright license to source codes --- EraseNonkernel/EraseNonkernel.cpp | 5 ++--- LICENSE.TXT | 35 +++++++++++++++++++++++++++++++ SPIRify/Promote.cpp | 6 +++--- include/amp.h | 7 +++++++ include/amp_impl.h | 9 +++++++- include/amp_math.h | 7 +++++++ include/gmac_manage.h | 7 +++++++ include/okra_manage.h | 7 +++++++ include/parallel_for_each.h | 11 ++++++---- include/serialize.h | 7 +++++++ lib/mcwamp.cpp | 7 +++++++ lib/mcwamp_main.cpp | 7 +++++++ 12 files changed, 104 insertions(+), 11 deletions(-) create mode 100644 LICENSE.TXT diff --git a/EraseNonkernel/EraseNonkernel.cpp b/EraseNonkernel/EraseNonkernel.cpp index e71a7179d7b..36f6fcd740a 100644 --- a/EraseNonkernel/EraseNonkernel.cpp +++ b/EraseNonkernel/EraseNonkernel.cpp @@ -1,4 +1,4 @@ -//===- Hello.cpp - Example code from "Writing an LLVM Pass" ---------------===// +//===- EraseNonkernel.cpp - Remove non-GPU codes from LLVM IR -------------===// // // The LLVM Compiler Infrastructure // @@ -7,8 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This file implements two versions of the LLVM "Hello World" pass described -// in docs/WritingAnLLVMPass.html +// This file implements a pass which removes non-GPU codes from LLVM IR. // //===----------------------------------------------------------------------===// diff --git a/LICENSE.TXT b/LICENSE.TXT new file mode 100644 index 00000000000..9c63d7064eb --- /dev/null +++ b/LICENSE.TXT @@ -0,0 +1,35 @@ +Copyright (c) MulticoreWare, Inc. +Copyright (c) Advanced Micro Devices, Inc. +Copyright (c) Microsoft Corporation. +All rights reserved. + +University of Illinois/NCSA Open Source License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal with the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimers. + +Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimers +in the documentation and/or other materials provided with the +distribution. + +Neither the names of MulticoreWare Inc., Advanced Micro Devices, Inc., +Microsoft Corporation, nor the names of its contributors may be used to +endorse or promote products derived from this Software without specific prior +written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. diff --git a/SPIRify/Promote.cpp b/SPIRify/Promote.cpp index 8a2aeddf966..aa347095a8f 100644 --- a/SPIRify/Promote.cpp +++ b/SPIRify/Promote.cpp @@ -1,4 +1,4 @@ -//===- Hello.cpp - Example code from "Writing an LLVM Pass" ---------------===// +//===- Promote.cpp - Lift LLVM IR to SPIR-compatible ----- ----------------===// // // The LLVM Compiler Infrastructure // @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// // -// This file implements two versions of the LLVM "Hello World" pass described -// in docs/WritingAnLLVMPass.html +// This file implements a pass to promote variables to correct addrspace to +// adhere SPIR specification. // //===----------------------------------------------------------------------===// diff --git a/include/amp.h b/include/amp.h index 9a676a8acda..14ce641cebb 100644 --- a/include/amp.h +++ b/include/amp.h @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + // CAVEATS: There could be walkarounds for quick evaluation purposes. Here we // list such features that are used in the code with description. // diff --git a/include/amp_impl.h b/include/amp_impl.h index 0dc3acb7355..657cb9c1872 100644 --- a/include/amp_impl.h +++ b/include/amp_impl.h @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #ifndef INCLUDE_AMP_IMPL_H #define INCLUDE_AMP_IMPL_H @@ -42,7 +49,7 @@ inline accelerator::accelerator(const accelerator& other) : #endif {} -// TODO(I-Jui Sung): perform real OpenCL queries here.. +// TODO: perform real OpenCL queries here.. inline accelerator::accelerator(const std::wstring& path) : device_path( (path != std::wstring(default_accelerator)) ? path : diff --git a/include/amp_math.h b/include/amp_math.h index 7884f60773c..94e924a8769 100644 --- a/include/amp_math.h +++ b/include/amp_math.h @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #pragma once #include #ifdef __GPU__ diff --git a/include/gmac_manage.h b/include/gmac_manage.h index 09d925d79a2..02e311c6ef6 100644 --- a/include/gmac_manage.h +++ b/include/gmac_manage.h @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #include #pragma once diff --git a/include/okra_manage.h b/include/okra_manage.h index 938c0eb41d9..6e06ab97c23 100644 --- a/include/okra_manage.h +++ b/include/okra_manage.h @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #include #pragma once #include diff --git a/include/parallel_for_each.h b/include/parallel_for_each.h index 6a4fafbe63b..d8d24efdb8b 100644 --- a/include/parallel_for_each.h +++ b/include/parallel_for_each.h @@ -1,8 +1,11 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #pragma once -// My quick and dirty implementation of amp.h -// To use: put a gmac_array object (not pointer or reference!) -// in your functor and use it in your kernel as if it is an array_view -// object #include #include diff --git a/include/serialize.h b/include/serialize.h index 48ef746981e..17e3ee76527 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #pragma once namespace Concurrency { diff --git a/lib/mcwamp.cpp b/lib/mcwamp.cpp index 35bd1881cd9..648a3494fff 100644 --- a/lib/mcwamp.cpp +++ b/lib/mcwamp.cpp @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #include #include namespace Concurrency { diff --git a/lib/mcwamp_main.cpp b/lib/mcwamp_main.cpp index f4c360f1f86..73252f2291e 100644 --- a/lib/mcwamp_main.cpp +++ b/lib/mcwamp_main.cpp @@ -1,3 +1,10 @@ +//===----------------------------------------------------------------------===// +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + #include #include #include