Commit 2e01cda6 by Ilya Verbin Committed by Ilya Verbin

backport: Makefile.am: Merge from upstream...

Merge libcilkrts from upstream.

libcilkrts/
	* Makefile.am: Merge from upstream, version 2.0.4420.0
	<https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git>.
	* README: Likewise.
	* configure.ac: Likewise.
	* configure.tgt: Likewise.
	* include/cilk/cilk.h: Likewise.
	* include/cilk/cilk_api.h: Likewise.
	* include/cilk/cilk_api_linux.h: Likewise.
	* include/cilk/cilk_stub.h: Likewise.
	* include/cilk/cilk_undocumented.h: Likewise.
	* include/cilk/common.h: Likewise.
	* include/cilk/holder.h: Likewise.
	* include/cilk/hyperobject_base.h: Likewise.
	* include/cilk/metaprogramming.h: Likewise.
	* include/cilk/reducer.h: Likewise.
	* include/cilk/reducer_file.h: Likewise.
	* include/cilk/reducer_list.h: Likewise.
	* include/cilk/reducer_max.h: Likewise.
	* include/cilk/reducer_min.h: Likewise.
	* include/cilk/reducer_min_max.h: Likewise.
	* include/cilk/reducer_opadd.h: Likewise.
	* include/cilk/reducer_opand.h: Likewise.
	* include/cilk/reducer_opmul.h: Likewise.
	* include/cilk/reducer_opor.h: Likewise.
	* include/cilk/reducer_opxor.h: Likewise.
	* include/cilk/reducer_ostream.h: Likewise.
	* include/cilk/reducer_string.h: Likewise.
	* include/cilktools/cilkscreen.h: Likewise.
	* include/cilktools/cilkview.h: Likewise.
	* include/cilktools/fake_mutex.h: Likewise.
	* include/cilktools/lock_guard.h: Likewise.
	* include/internal/abi.h: Likewise.
	* include/internal/cilk_fake.h: Likewise.
	* include/internal/cilk_version.h: Likewise.
	* include/internal/metacall.h: Likewise.
	* include/internal/rev.mk: Likewise.
	* mk/cilk-version.mk: Likewise.
	* runtime/acknowledgements.dox: Likewise.
	* runtime/bug.cpp: Likewise.
	* runtime/bug.h: Likewise.
	* runtime/c_reducers.c: Likewise.
	* runtime/cilk-abi-cilk-for.cpp: Likewise.
	* runtime/cilk-abi-vla-internal.c: Likewise.
	* runtime/cilk-abi-vla-internal.h: Likewise.
	* runtime/cilk-abi.c: Likewise.
	* runtime/cilk-ittnotify.h: Likewise.
	* runtime/cilk-tbb-interop.h: Likewise.
	* runtime/cilk_api.c: Likewise.
	* runtime/cilk_fiber-unix.cpp: Likewise.
	* runtime/cilk_fiber-unix.h: Likewise.
	* runtime/cilk_fiber.cpp: Likewise.
	* runtime/cilk_fiber.h: Likewise.
	* runtime/cilk_malloc.c: Likewise.
	* runtime/cilk_malloc.h: Likewise.
	* runtime/component.h: Likewise.
	* runtime/config/generic/cilk-abi-vla.c: Likewise.
	* runtime/config/generic/os-fence.h: Likewise.
	* runtime/config/generic/os-unix-sysdep.c: Likewise.
	* runtime/config/x86/cilk-abi-vla.c: Likewise.
	* runtime/config/x86/os-fence.h: Likewise.
	* runtime/config/x86/os-unix-sysdep.c: Likewise.
	* runtime/doxygen-layout.xml: Likewise.
	* runtime/doxygen.cfg: Likewise.
	* runtime/except-gcc.cpp: Likewise.
	* runtime/except-gcc.h: Likewise.
	* runtime/except.h: Likewise.
	* runtime/frame_malloc.c: Likewise.
	* runtime/frame_malloc.h: Likewise.
	* runtime/full_frame.c: Likewise.
	* runtime/full_frame.h: Likewise.
	* runtime/global_state.cpp: Likewise.
	* runtime/global_state.h: Likewise.
	* runtime/jmpbuf.c: Likewise.
	* runtime/jmpbuf.h: Likewise.
	* runtime/linux-symbols.ver: Likewise.
	* runtime/local_state.c: Likewise.
	* runtime/local_state.h: Likewise.
	* runtime/mac-symbols.txt: Likewise.
	* runtime/metacall_impl.c: Likewise.
	* runtime/metacall_impl.h: Likewise.
	* runtime/os-unix.c: Likewise.
	* runtime/os.h: Likewise.
	* runtime/os_mutex-unix.c: Likewise.
	* runtime/os_mutex.h: Likewise.
	* runtime/pedigrees.c: Likewise.
	* runtime/pedigrees.h: Likewise.
	* runtime/record-replay.cpp: Likewise.
	* runtime/record-replay.h: Likewise.
	* runtime/reducer_impl.cpp: Likewise.
	* runtime/reducer_impl.h: Likewise.
	* runtime/rts-common.h: Likewise.
	* runtime/scheduler.c: Likewise.
	* runtime/scheduler.h: Likewise.
	* runtime/signal_node.c: Likewise.
	* runtime/signal_node.h: Likewise.
	* runtime/spin_mutex.c: Likewise.
	* runtime/spin_mutex.h: Likewise.
	* runtime/stats.c: Likewise.
	* runtime/stats.h: Likewise.
	* runtime/sysdep-unix.c: Likewise.
	* runtime/sysdep.h: Likewise.
	* runtime/worker_mutex.c: Likewise.
	* runtime/worker_mutex.h: Likewise.
	* include/cilk/reducer_vector.h: New.
	* runtime/cilk_str_mem.h: New.
	* runtime/config/arm/cilk-abi-vla.c: New.
	* runtime/config/arm/os-fence.h: New.
	* runtime/config/arm/os-unix-sysdep.c: New.
	* runtime/declare-alloca.h: New.
	* runtime/sslib/ignore_handler_s.c: New.
	* runtime/sslib/safe_lib.h: New.
	* runtime/sslib/safe_lib_errno.h: New.
	* runtime/sslib/safe_str_constraint.c: New.
	* runtime/sslib/safe_str_constraint.h: New.
	* runtime/sslib/safe_str_lib.h: New.
	* runtime/sslib/safe_types.h: New.
	* runtime/sslib/safeclib_private.h: New.
	* runtime/sslib/snprintf_s.h: New.
	* runtime/sslib/snprintf_support.c: New.
	* runtime/sslib/strcpy_s.c: New.
	* runtime/sslib/strncpy_s.c: New.
	* runtime/sslib/strnlen_s.c: New.
	* runtime/symbol_test.c: Remove.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r235870
parent d9cb3e75
2016-05-04 Ilya Verbin <ilya.verbin@intel.com>
* Makefile.am: Merge from upstream, version 2.0.4420.0
<https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git>.
* README: Likewise.
* configure.ac: Likewise.
* configure.tgt: Likewise.
* include/cilk/cilk.h: Likewise.
* include/cilk/cilk_api.h: Likewise.
* include/cilk/cilk_api_linux.h: Likewise.
* include/cilk/cilk_stub.h: Likewise.
* include/cilk/cilk_undocumented.h: Likewise.
* include/cilk/common.h: Likewise.
* include/cilk/holder.h: Likewise.
* include/cilk/hyperobject_base.h: Likewise.
* include/cilk/metaprogramming.h: Likewise.
* include/cilk/reducer.h: Likewise.
* include/cilk/reducer_file.h: Likewise.
* include/cilk/reducer_list.h: Likewise.
* include/cilk/reducer_max.h: Likewise.
* include/cilk/reducer_min.h: Likewise.
* include/cilk/reducer_min_max.h: Likewise.
* include/cilk/reducer_opadd.h: Likewise.
* include/cilk/reducer_opand.h: Likewise.
* include/cilk/reducer_opmul.h: Likewise.
* include/cilk/reducer_opor.h: Likewise.
* include/cilk/reducer_opxor.h: Likewise.
* include/cilk/reducer_ostream.h: Likewise.
* include/cilk/reducer_string.h: Likewise.
* include/cilktools/cilkscreen.h: Likewise.
* include/cilktools/cilkview.h: Likewise.
* include/cilktools/fake_mutex.h: Likewise.
* include/cilktools/lock_guard.h: Likewise.
* include/internal/abi.h: Likewise.
* include/internal/cilk_fake.h: Likewise.
* include/internal/cilk_version.h: Likewise.
* include/internal/metacall.h: Likewise.
* include/internal/rev.mk: Likewise.
* mk/cilk-version.mk: Likewise.
* runtime/acknowledgements.dox: Likewise.
* runtime/bug.cpp: Likewise.
* runtime/bug.h: Likewise.
* runtime/c_reducers.c: Likewise.
* runtime/cilk-abi-cilk-for.cpp: Likewise.
* runtime/cilk-abi-vla-internal.c: Likewise.
* runtime/cilk-abi-vla-internal.h: Likewise.
* runtime/cilk-abi.c: Likewise.
* runtime/cilk-ittnotify.h: Likewise.
* runtime/cilk-tbb-interop.h: Likewise.
* runtime/cilk_api.c: Likewise.
* runtime/cilk_fiber-unix.cpp: Likewise.
* runtime/cilk_fiber-unix.h: Likewise.
* runtime/cilk_fiber.cpp: Likewise.
* runtime/cilk_fiber.h: Likewise.
* runtime/cilk_malloc.c: Likewise.
* runtime/cilk_malloc.h: Likewise.
* runtime/component.h: Likewise.
* runtime/config/generic/cilk-abi-vla.c: Likewise.
* runtime/config/generic/os-fence.h: Likewise.
* runtime/config/generic/os-unix-sysdep.c: Likewise.
* runtime/config/x86/cilk-abi-vla.c: Likewise.
* runtime/config/x86/os-fence.h: Likewise.
* runtime/config/x86/os-unix-sysdep.c: Likewise.
* runtime/doxygen-layout.xml: Likewise.
* runtime/doxygen.cfg: Likewise.
* runtime/except-gcc.cpp: Likewise.
* runtime/except-gcc.h: Likewise.
* runtime/except.h: Likewise.
* runtime/frame_malloc.c: Likewise.
* runtime/frame_malloc.h: Likewise.
* runtime/full_frame.c: Likewise.
* runtime/full_frame.h: Likewise.
* runtime/global_state.cpp: Likewise.
* runtime/global_state.h: Likewise.
* runtime/jmpbuf.c: Likewise.
* runtime/jmpbuf.h: Likewise.
* runtime/linux-symbols.ver: Likewise.
* runtime/local_state.c: Likewise.
* runtime/local_state.h: Likewise.
* runtime/mac-symbols.txt: Likewise.
* runtime/metacall_impl.c: Likewise.
* runtime/metacall_impl.h: Likewise.
* runtime/os-unix.c: Likewise.
* runtime/os.h: Likewise.
* runtime/os_mutex-unix.c: Likewise.
* runtime/os_mutex.h: Likewise.
* runtime/pedigrees.c: Likewise.
* runtime/pedigrees.h: Likewise.
* runtime/record-replay.cpp: Likewise.
* runtime/record-replay.h: Likewise.
* runtime/reducer_impl.cpp: Likewise.
* runtime/reducer_impl.h: Likewise.
* runtime/rts-common.h: Likewise.
* runtime/scheduler.c: Likewise.
* runtime/scheduler.h: Likewise.
* runtime/signal_node.c: Likewise.
* runtime/signal_node.h: Likewise.
* runtime/spin_mutex.c: Likewise.
* runtime/spin_mutex.h: Likewise.
* runtime/stats.c: Likewise.
* runtime/stats.h: Likewise.
* runtime/sysdep-unix.c: Likewise.
* runtime/sysdep.h: Likewise.
* runtime/worker_mutex.c: Likewise.
* runtime/worker_mutex.h: Likewise.
* include/cilk/reducer_vector.h: New.
* runtime/cilk_str_mem.h: New.
* runtime/config/arm/cilk-abi-vla.c: New.
* runtime/config/arm/os-fence.h: New.
* runtime/config/arm/os-unix-sysdep.c: New.
* runtime/declare-alloca.h: New.
* runtime/sslib/ignore_handler_s.c: New.
* runtime/sslib/safe_lib.h: New.
* runtime/sslib/safe_lib_errno.h: New.
* runtime/sslib/safe_str_constraint.c: New.
* runtime/sslib/safe_str_constraint.h: New.
* runtime/sslib/safe_str_lib.h: New.
* runtime/sslib/safe_types.h: New.
* runtime/sslib/safeclib_private.h: New.
* runtime/sslib/snprintf_s.h: New.
* runtime/sslib/snprintf_support.c: New.
* runtime/sslib/strcpy_s.c: New.
* runtime/sslib/strncpy_s.c: New.
* runtime/sslib/strnlen_s.c: New.
* runtime/symbol_test.c: Remove.
* Makefile.in: Regenerate.
* configure: Regenerate.
2016-04-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2016-04-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/60290 PR target/60290
......
# @copyright # Copyright (C) 2011-2016, Intel Corporation
# Copyright (C) 2011, 2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -17,7 +15,6 @@ ...@@ -17,7 +15,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -30,6 +27,20 @@ ...@@ -30,6 +27,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
...@@ -37,7 +48,7 @@ AUTOMAKE_OPTIONS = foreign ...@@ -37,7 +48,7 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .. -I ../config ACLOCAL_AMFLAGS = -I .. -I ../config
# Compiler and linker flags. # Compiler and linker flags.
GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/runtime/config/$(config_dir) -DIN_CILK_RUNTIME=1 GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/runtime/config/$(config_dir) -I$(top_srcdir)/runtime/sslib -DIN_CILK_RUNTIME=1
# GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for # GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for
# Enable Intel Cilk Plus extension # Enable Intel Cilk Plus extension
...@@ -60,6 +71,19 @@ toolexeclib_LTLIBRARIES = libcilkrts.la ...@@ -60,6 +71,19 @@ toolexeclib_LTLIBRARIES = libcilkrts.la
libcilkrts_la_SOURCES = \ libcilkrts_la_SOURCES = \
runtime/config/$(config_dir)/cilk-abi-vla.c \ runtime/config/$(config_dir)/cilk-abi-vla.c \
runtime/config/$(config_dir)/os-unix-sysdep.c \ runtime/config/$(config_dir)/os-unix-sysdep.c \
runtime/sslib/ignore_handler_s.c \
runtime/sslib/safe_lib.h \
runtime/sslib/safe_lib_errno.h \
runtime/sslib/safe_str_constraint.c \
runtime/sslib/safe_str_constraint.h \
runtime/sslib/safe_str_lib.h \
runtime/sslib/safe_types.h \
runtime/sslib/safeclib_private.h \
runtime/sslib/snprintf_s.h \
runtime/sslib/snprintf_support.c \
runtime/sslib/strcpy_s.c \
runtime/sslib/strncpy_s.c \
runtime/sslib/strnlen_s.c \
runtime/bug.cpp \ runtime/bug.cpp \
runtime/cilk-abi.c \ runtime/cilk-abi.c \
runtime/cilk-abi-cilk-for.cpp \ runtime/cilk-abi-cilk-for.cpp \
...@@ -85,7 +109,6 @@ libcilkrts_la_SOURCES = \ ...@@ -85,7 +109,6 @@ libcilkrts_la_SOURCES = \
runtime/signal_node.c \ runtime/signal_node.c \
runtime/spin_mutex.c \ runtime/spin_mutex.c \
runtime/stats.c \ runtime/stats.c \
runtime/symbol_test.c \
runtime/sysdep-unix.c \ runtime/sysdep-unix.c \
runtime/worker_mutex.c runtime/worker_mutex.c
......
...@@ -40,6 +40,9 @@ configure script: ...@@ -40,6 +40,9 @@ configure script:
% ./configure --prefix=/your/path/to/lib % ./configure --prefix=/your/path/to/lib
It is also possible to use CMake if the above method does not apply
well in your environment. Instruction is available in CMakeLists.txt.
# #
# 2. USING: # 2. USING:
# #
...@@ -79,6 +82,9 @@ http://cilkplus.org/ ...@@ -79,6 +82,9 @@ http://cilkplus.org/
Changes to the Intel Cilk Plus runtime are welcome and should be Changes to the Intel Cilk Plus runtime are welcome and should be
contributed to the upstream version via http://cilkplus.org/. contributed to the upstream version via http://cilkplus.org/.
Thanks to Tobias Burnus for showing us the magic to make gcc and g++
automatically include the Cilk Plus runtime.
------------------------ ------------------------
Intel and Cilk are trademarks of Intel Corporation in the U.S. and/or Intel and Cilk are trademarks of Intel Corporation in the U.S. and/or
other countries. other countries.
This source diff could not be displayed because it is too large. You can view the blob instead.
# @copyright # Copyright (C) 2011-2016, Intel Corporation
# Copyright (C) 2011-2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -17,7 +15,6 @@ ...@@ -17,7 +15,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -30,6 +27,20 @@ ...@@ -30,6 +27,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
AC_INIT([Cilk Runtime Library], [2.0], [cilk@intel.com]) AC_INIT([Cilk Runtime Library], [2.0], [cilk@intel.com])
AC_PREREQ([2.64]) AC_PREREQ([2.64])
...@@ -39,6 +50,10 @@ AC_PREREQ([2.64]) ...@@ -39,6 +50,10 @@ AC_PREREQ([2.64])
AC_CANONICAL_SYSTEM AC_CANONICAL_SYSTEM
target_alias=${target_alias-$host_alias} target_alias=${target_alias-$host_alias}
AC_SUBST(target_alias) AC_SUBST(target_alias)
# Test for GNU extensions. Will define _GNU_SOURCE if they're available
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE(foreign no-dist) AM_INIT_AUTOMAKE(foreign no-dist)
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
...@@ -134,6 +149,10 @@ case "${target}" in ...@@ -134,6 +149,10 @@ case "${target}" in
config_dir="x86" config_dir="x86"
;; ;;
arm-*-*)
config_dir="arm"
;;
*) *)
config_dir="generic" config_dir="generic"
;; ;;
...@@ -189,8 +208,7 @@ AC_LINK_IFELSE( ...@@ -189,8 +208,7 @@ AC_LINK_IFELSE(
# Check for pthread_{,attr_}[sg]etaffinity_np. # Check for pthread_{,attr_}[sg]etaffinity_np.
AC_LINK_IFELSE( AC_LINK_IFELSE(
[AC_LANG_PROGRAM( [AC_LANG_PROGRAM(
[#define _GNU_SOURCE [#include <pthread.h>],
#include <pthread.h>],
[cpu_set_t cpuset; [cpu_set_t cpuset;
pthread_attr_t attr; pthread_attr_t attr;
pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
......
# @copyright # Copyright (C) 2013-2016, Intel Corporation
# Copyright (C) 2011-2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -17,7 +15,6 @@ ...@@ -17,7 +15,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -30,13 +27,29 @@ ...@@ -30,13 +27,29 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
# Disable Cilk Runtime library for non x86 architecture...for now. # Disable Cilk Runtime library for unsupported architectures.
case "${target}" in case "${target}" in
x86_64-*-*) x86_64-*-*)
;; ;;
i?86-*-*) i?86-*-*)
;; ;;
arm-*-*)
;;
*-*-*) *-*-*)
UNSUPPORTED=1 UNSUPPORTED=1
;; ;;
......
/* cilk.h -*-C++-*- /* cilk.h -*-C++-*-
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,40 +29,54 @@ ...@@ -32,40 +29,54 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/ */
/** @file cilk.h /** @file cilk.h
* *
* @brief Provides convenient aliases for the Cilk language keywords. * @brief Provides convenient aliases for Intel(R) Cilk(TM) language keywords.
* *
* @details * @details
* Since Cilk is a nonstandard extension to both C and C++, the Cilk * Since Intel Cilk Plus is a nonstandard extension to both C and C++, the Intel
* language keywords all begin with “`_Cilk_`”, which guarantees that they * Cilk language keywords all begin with "`_Cilk_`", which guarantees that they
* will not conflict with user-defined identifiers in properly written * will not conflict with user-defined identifiers in properly written
* programs, so that “standard” C and C++ programs can safely be * programs. This way, a Cilk-enabled C or C++ compiler can safely compile
* compiled a Cilk-enabled C or C++ compiler. * "standard" C and C++ programs.
* *
* However, this means that the keywords _look_ like something grafted on to * However, this means that the keywords _look_ like something grafted on to
* the base language. Therefore, you can include this header: * the base language. Therefore, you can include this header:
* *
* #include "cilk/cilk.h" * #include "cilk/cilk.h"
* *
* and then write the Cilk keywords with a “`cilk_`” prefix instead of * and then write the Intel Cilk keywords with a "`cilk_`" prefix instead of
* “`_Cilk_`”. * "`_Cilk_`".
* *
* @ingroup language * @ingroup language
*/ */
/** @defgroup language Language Keywords /** @defgroup language Language Keywords
* Definitions having to do with the Cilk language. * Definitions for the Intel Cilk language.
* @{ * @{
*/ */
#ifndef cilk_spawn #ifndef cilk_spawn
# define cilk_spawn _Cilk_spawn ///< Spawn a task that can execute in parallel. # define cilk_spawn _Cilk_spawn ///< Spawn a task that can execute in parallel.
# define cilk_sync _Cilk_sync ///< Wait for spawned tasks to complete. # define cilk_sync _Cilk_sync ///< Wait for spawned tasks to complete.
# define cilk_for _Cilk_for ///< Execute iterations of a for loop in parallel. # define cilk_for _Cilk_for ///< Execute iterations of a `for` loop in parallel.
#endif #endif
/// @} /// @}
/* /*
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -18,7 +16,6 @@ ...@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -31,6 +28,20 @@ ...@@ -31,6 +28,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
*/ */
......
/* cilk_stub.h -*-C++-*- /* cilk_stub.h -*-C++-*-
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,13 +29,27 @@ ...@@ -32,13 +29,27 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
*/ */
#ifndef INCLUDED_CILK_STUB_DOT_H #ifndef INCLUDED_CILK_STUB_DOT_H
#define INCLUDED_CILK_STUB_DOT_H #define INCLUDED_CILK_STUB_DOT_H
/* Definitions for creating a serialization from a Cilk program. /* Definitions for creating a serialization from an Intel(R) Cilk(TM) Plus program.
* These definitions are suitable for use by a compiler that is not * These definitions are suitable for use by a compiler that is not
* Cilk-enabled. * Cilk-enabled.
*/ */
...@@ -47,9 +58,14 @@ ...@@ -47,9 +58,14 @@
#undef __cilk #undef __cilk
#define CILK_STUB #define CILK_STUB
/* Replace Cilk keywords with serial equivalents */ /* Replace Intel Cilk keywords with serial equivalents */
#define _Cilk_spawn #define _Cilk_spawn
#define _Cilk_sync #define _Cilk_sync
#define _Cilk_for for #define _Cilk_for for
/* Replace simd-loop keywords with serial equivalents */
#define _Simd
#define _Safelen(...)
#define _Reduction(...)
#endif /* ! defined(INCLUDED_CILK_STUB_DOT_H) */ #endif /* ! defined(INCLUDED_CILK_STUB_DOT_H) */
/* /*
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -18,7 +16,6 @@ ...@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -31,6 +28,20 @@ ...@@ -31,6 +28,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
****************************************************************************** ******************************************************************************
* *
...@@ -83,7 +94,7 @@ CILK_EXPORT __CILKRTS_NOTHROW ...@@ -83,7 +94,7 @@ CILK_EXPORT __CILKRTS_NOTHROW
void *__cilkrts_get_sf(void); void *__cilkrts_get_sf(void);
/** /**
* Returns the size of stacks created by Cilk. * Returns the size of stacks created by Intel(R) Cilk(TM) Plus.
*/ */
CILK_EXPORT __CILKRTS_NOTHROW CILK_EXPORT __CILKRTS_NOTHROW
size_t __cilkrts_get_stack_size(void); size_t __cilkrts_get_stack_size(void);
......
/** common.h /** common.h
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,18 +29,31 @@ ...@@ -32,18 +29,31 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/ */
/** @file common.h /** @file common.h
* *
* @brief Defines common macros and structures used by the Intel Cilk Plus * @brief Defines common macros and structures used by the Intel(R) Cilk(TM) Plus runtime.
* runtime.
* *
* @ingroup common * @ingroup common
*/ */
/** @defgroup common Common Definitions /** @defgroup common Common Definitions
* Macro, structure, and class definitions used elsewhere in the runtime. * Definitions for runtime macros, structures, and classes.
* @{ * @{
*/ */
...@@ -51,18 +61,17 @@ ...@@ -51,18 +61,17 @@
#define INCLUDED_CILK_COMMON #define INCLUDED_CILK_COMMON
#ifdef __cplusplus #ifdef __cplusplus
/** Namespace for all Cilk definitions that can be included in user code. /** Namespace for all Intel Cilk Plus definitions that can be included in user code.
*/ */
namespace cilk { namespace cilk {
/** Namespace for definitions that are primarily intended for use /** Namespace for definitions re-used in other Intel Cilk Plus definitions.
* in other Cilk definitions.
*/ */
namespace internal {} namespace internal {}
} }
#endif #endif
/** Cilk library version = 1.01 /** Intel Cilk Plus library version = 1.02
*/ */
#define CILK_LIBRARY_VERSION 102 #define CILK_LIBRARY_VERSION 102
...@@ -73,7 +82,7 @@ namespace cilk { ...@@ -73,7 +82,7 @@ namespace cilk {
#endif #endif
/** /**
* Prefix standard library function and type names with __STDNS in order to * Prefix standard library function and type names with __STDNS to
* get correct lookup in both C and C++. * get correct lookup in both C and C++.
*/ */
#ifdef __cplusplus #ifdef __cplusplus
...@@ -159,7 +168,7 @@ namespace cilk { ...@@ -159,7 +168,7 @@ namespace cilk {
/** /**
* Macro to specify alignment of a data member in a structure. * Macro to specify alignment of a data member in a structure.
* Because of the way that gccs alignment attribute is defined, @a n must * Because of the way that gcc's alignment attribute is defined, @a n must
* be a numeric literal, not just a compile-time constant expression. * be a numeric literal, not just a compile-time constant expression.
*/ */
#ifdef _WIN32 #ifdef _WIN32
...@@ -231,7 +240,7 @@ namespace cilk { ...@@ -231,7 +240,7 @@ namespace cilk {
/** /**
* OS-independent macro to specify a function that should be inlined * OS-independent macro to specify a function that should be inlined
*/ */
#ifdef __cpluspus #ifdef __cplusplus
// C++ // C++
# define __CILKRTS_INLINE inline # define __CILKRTS_INLINE inline
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
...@@ -247,7 +256,7 @@ namespace cilk { ...@@ -247,7 +256,7 @@ namespace cilk {
/** /**
* Functions marked as CILK_EXPORT_AND_INLINE have both * Functions marked as CILK_EXPORT_AND_INLINE have both
* inline versions defined in the Cilk API, as well as * inline versions defined in the Intel Cilk Plus API, as well as
* non-inlined versions that are exported (for * non-inlined versions that are exported (for
* compatibility with previous versions that did not * compatibility with previous versions that did not
* inline the functions). * inline the functions).
...@@ -306,13 +315,14 @@ namespace cilk { ...@@ -306,13 +315,14 @@ namespace cilk {
#endif /* ! defined(_MSC_VER) || (_MSC_VER >= 1600) */ #endif /* ! defined(_MSC_VER) || (_MSC_VER >= 1600) */
/** /**
* @brief Application Binary Interface version of the Cilk runtime library. * @brief Application Binary Interface (ABI) version of the Intel Cilk Plus runtime
* library.
* *
* The ABI version is determined by the compiler used. An object file * The compiler determines the ABI version used for compilation. Object files
* compiled with a higher ABI version is not compatible with a library that is * compiled with higher ABI versions are not compatible with libraries compiled
* compiled with a lower ABI version. An object file compiled with a lower * with lower ABI versions. However, an object file compiled with a lower ABI
* ABI version, however, can be used with a library compiled with a higher ABI * version can be used with a library compiled with a higher ABI version
* version unless otherwise stated. * (unless otherwise stated.)
*/ */
#ifndef __CILKRTS_ABI_VERSION #ifndef __CILKRTS_ABI_VERSION
# ifdef IN_CILK_RUNTIME # ifdef IN_CILK_RUNTIME
......
/* /*
* @copyright * Copyright (C) 2011-2016, Intel Corporation
* Copyright (C) 2011-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -18,7 +16,6 @@ ...@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -31,6 +28,20 @@ ...@@ -31,6 +28,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
*/ */
...@@ -60,8 +71,8 @@ ...@@ -60,8 +71,8 @@
* common variable where it is not necessary to preserve changes from * common variable where it is not necessary to preserve changes from
* different parallel strands. In effect, a holder acts a bit like * different parallel strands. In effect, a holder acts a bit like
* thread-local storage, but has qualities that work better with the * thread-local storage, but has qualities that work better with the
* fork-join structure of Cilk. In particular, a holder has the following * fork-join structure of Intel(R) Cilk(TM) Plus. In particular, a holder has the
* qualities: * following qualities:
* *
* - The view of a holder before the first spawn within a function is the same * - The view of a holder before the first spawn within a function is the same
* as the view after each sync (as in the case of a reducer). * as the view after each sync (as in the case of a reducer).
...@@ -220,7 +231,7 @@ ...@@ -220,7 +231,7 @@
* same as the view on entry to 'h'. More importantly, the view of the holder * same as the view on entry to 'h'. More importantly, the view of the holder
* within the recursive call to 'compute' is the same as the view on entry to * within the recursive call to 'compute' is the same as the view on entry to
* 'h', even if a different worker is executing the recursive call. Thus, the * 'h', even if a different worker is executing the recursive call. Thus, the
* holder view within a Cilk program has useful qualities not found in * holder view within a Intel Cilk Plus program has useful qualities not found in
* thread-local storage. * thread-local storage.
*/ */
......
/* /*
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -18,7 +16,6 @@ ...@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -31,6 +28,20 @@ ...@@ -31,6 +28,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
*/ */
...@@ -49,7 +60,7 @@ ...@@ -49,7 +60,7 @@
#if defined _WIN32 || defined _WIN64 #if defined _WIN32 || defined _WIN64
# if !defined CILK_STUB && !defined IN_CILK_RUNTIME # if !defined CILK_STUB && !defined IN_CILK_RUNTIME
/* bring in the Cilk library, which has definitions for some of these /* bring in the Intel(R) Cilk(TM) Plus library, which has definitions for some of these
* functions. */ * functions. */
# pragma comment(lib, "cilkrts") # pragma comment(lib, "cilkrts")
# endif # endif
...@@ -126,7 +137,7 @@ CILK_EXPORT ...@@ -126,7 +137,7 @@ CILK_EXPORT
#else // CILK_STUB #else // CILK_STUB
// Programs compiled with CILK_STUB are not linked with the Cilk runtime // Programs compiled with CILK_STUB are not linked with the Intel Cilk Plus runtime
// library, so they should not have external references to cilkrts functions. // library, so they should not have external references to cilkrts functions.
// Furthermore, they don't need the hyperobject functionality, so the // Furthermore, they don't need the hyperobject functionality, so the
// functions can be stubbed. // functions can be stubbed.
......
/* /*
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -18,7 +16,6 @@ ...@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -31,6 +28,20 @@ ...@@ -31,6 +28,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
*/ */
......
/* reducer_max.h -*- C++ -*- /* reducer_max.h -*- C++ -*-
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,6 +29,20 @@ ...@@ -32,6 +29,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/ */
/** @file reducer_max.h /** @file reducer_max.h
......
/* reducer_min.h -*- C++ -*- /* reducer_min.h -*- C++ -*-
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,6 +29,20 @@ ...@@ -32,6 +29,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/ */
/** @file reducer_min.h /** @file reducer_min.h
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2013-2016, Intel Corporation
* Copyright (C) 2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
************************************************************************** **************************************************************************
* *
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2011-2016, Intel Corporation
* Copyright (C) 2011-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
************************************************************************** **************************************************************************
* *
......
/* /*
* abi.h * abi.h
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -20,7 +18,6 @@ ...@@ -20,7 +18,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -33,6 +30,20 @@ ...@@ -33,6 +30,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
******************************************************************************/ ******************************************************************************/
...@@ -461,6 +472,20 @@ CILK_ABI(void) __cilkrts_enter_frame_fast_1(__cilkrts_stack_frame *sf); ...@@ -461,6 +472,20 @@ CILK_ABI(void) __cilkrts_enter_frame_fast_1(__cilkrts_stack_frame *sf);
CILK_ABI(void) __cilkrts_leave_frame(__cilkrts_stack_frame *sf); CILK_ABI(void) __cilkrts_leave_frame(__cilkrts_stack_frame *sf);
/** /**
* Suspends the runtime by notifying the workers that they should not try to
* steal. This function is supposed to be called from a non-parallel region
* (i.e., after cilk_sync in the top-level spawning function). Otherwise,
* which workers are sleeping or busy is unpredictable in general.
* The runtime can be resumed by calling __cilkrts_resume().
*/
CILK_ABI(void) __cilkrts_suspend(void);
/**
* Resumes the runtime by notifying the workers that they can steal.
*/
CILK_ABI(void) __cilkrts_resume(void);
/**
* Wait for any spawned children of this function to complete before * Wait for any spawned children of this function to complete before
* continuing. This function will only return when the join counter * continuing. This function will only return when the join counter
* has gone to 0. Other workers will re-enter the scheduling loop to * has gone to 0. Other workers will re-enter the scheduling loop to
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2011-2016, Intel Corporation
* Copyright (C) 2011-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
// cilk_version.h // cilk_version.h
// //
// @copyright // Copyright (C) 2009-2016, Intel Corporation
// Copyright (C) 2009-2013, Intel Corporation
// All rights reserved. // All rights reserved.
// //
// @copyright
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions // modification, are permitted provided that the following conditions
// are met: // are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
// contributors may be used to endorse or promote products derived // contributors may be used to endorse or promote products derived
// from this software without specific prior written permission. // from this software without specific prior written permission.
// //
// @copyright
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,16 +29,30 @@ ...@@ -32,16 +29,30 @@
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
// WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE. // POSSIBILITY OF SUCH DAMAGE.
//
// *********************************************************************
//
// PLEASE NOTE: This file is a downstream copy of a file mainitained in
// a repository at cilkplus.org. Changes made to this file that are not
// submitted through the contribution process detailed at
// http://www.cilkplus.org/submit-cilk-contribution will be lost the next
// time that a new version is released. Changes only submitted to the
// GNU compiler collection or posted to the git repository at
// https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
// not tracked.
//
// We welcome your contributions to this open source project. Thank you
// for your assistance in helping us improve Cilk Plus.
// DO NOT EDIT THIS FILE! // DO NOT EDIT THIS FILE!
// //
// It was automatically generated by cilkrts/include/internal/Makefile // It was automatically generated by cilkrts/include/internal/Makefile
#define VERSION_MAJOR 2 #define VERSION_MAJOR 2
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_BUILD 3902 #define VERSION_BUILD 4420
#define VERSION_REV 0 #define VERSION_REV 0
#define VERSION_STRING "2,0,3902,0" #define VERSION_STRING "2,0,4420,0"
#define VERSION_HASH "b4e38f4f7e3e" #define VERSION_HASH "3b2d6aa9059c"
#define VERSION_BRANCH "v14.0" #define VERSION_BRANCH "eng"
#define TBB_REV_NUMBER "" #define TBB_REV_NUMBER "14788"
#define VERSION_YEAR "2013" #define VERSION_YEAR "2015"
// -*- C++ -*- // -*- C++ -*-
/* /*
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -20,7 +18,6 @@ ...@@ -20,7 +18,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -33,6 +30,20 @@ ...@@ -33,6 +30,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
****************************************************************************** ******************************************************************************
* *
......
######################################################################### #########################################################################
# #
# @copyright # Copyright (C) 2011-2016, Intel Corporation
# Copyright (C) 2011-2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,10 +29,24 @@ ...@@ -32,10 +29,24 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
########################################################################### ###########################################################################
# DO NOT EDIT THIS FILE! # DO NOT EDIT THIS FILE!
# #
# It was automatically generated by cilkrts/include/internal/Makefile # It was automatically generated by cilkrts/include/internal/Makefile
CILK_REVISION = 3902 CILK_REVISION = 4420
######################################################################### #########################################################################
# #
# @copyright # Copyright (C) 2009-2016, Intel Corporation
# Copyright (C) 2009-2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,6 +29,20 @@ ...@@ -32,6 +29,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
########################################################################### ###########################################################################
# cilk-version.mk # cilk-version.mk
# #
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* /*
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "bug.h" #include "bug.h"
...@@ -54,7 +65,7 @@ __CILKRTS_BEGIN_EXTERN_C ...@@ -54,7 +65,7 @@ __CILKRTS_BEGIN_EXTERN_C
COMMON_PORTABLE const char *const __cilkrts_assertion_failed = COMMON_PORTABLE const char *const __cilkrts_assertion_failed =
"%s:%d: cilk assertion failed: %s\n"; "%s:%d: cilk assertion failed: %s\n";
COMMON_PORTABLE void __cilkrts_bug(const char *fmt,...) cilk_nothrow COMMON_PORTABLE NORETURN __cilkrts_bug(const char *fmt,...) cilk_nothrow
{ {
#if defined (_WIN32) && defined(_DEBUG) #if defined (_WIN32) && defined(_DEBUG)
_CRTIMP void __cdecl _wassert(__in_z const wchar_t * _Message, _CRTIMP void __cdecl _wassert(__in_z const wchar_t * _Message,
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
...@@ -47,6 +58,13 @@ ...@@ -47,6 +58,13 @@
#define CILK_C_DEFINE_REDUCERS #define CILK_C_DEFINE_REDUCERS
#ifdef _WRS_KERNEL
#define WCHAR_MIN 0
#define WCHAR_MAX USHRT_MAX
#define WINT_MIN INT_MIN
#define WINT_MAX INT_MAX
#endif
#include <cilk/reducer_opadd.h> #include <cilk/reducer_opadd.h>
#include <cilk/reducer_opand.h> #include <cilk/reducer_opand.h>
#include <cilk/reducer_opmul.h> #include <cilk/reducer_opmul.h>
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2011-2016, Intel Corporation
* Copyright (C) 2011, 2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
...@@ -405,6 +416,9 @@ CILK_ABI_THROWS_VOID __cilkrts_cilk_for_32(__cilk_abi_f32_t body, void *data, ...@@ -405,6 +416,9 @@ CILK_ABI_THROWS_VOID __cilkrts_cilk_for_32(__cilk_abi_f32_t body, void *data,
CILK_ABI_THROWS_VOID __cilkrts_cilk_for_64(__cilk_abi_f64_t body, void *data, CILK_ABI_THROWS_VOID __cilkrts_cilk_for_64(__cilk_abi_f64_t body, void *data,
cilk64_t count, int grain) cilk64_t count, int grain)
{ {
// Cilkscreen should not report this call in a stack trace
NOTIFY_ZC_INTRINSIC((char *)"cilkscreen_hide_call", 0);
// Check for an empty range here as an optimization - don't need to do any // Check for an empty range here as an optimization - don't need to do any
// __cilkrts_stack_frame initialization // __cilkrts_stack_frame initialization
if (count > 0) if (count > 0)
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2013-2016, Intel Corporation
* Copyright (C) 2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* /*
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2013-2016, Intel Corporation
* Copyright (C) 2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
...@@ -296,6 +307,45 @@ CILK_ABI_VOID __cilkrts_sync(__cilkrts_stack_frame *sf) ...@@ -296,6 +307,45 @@ CILK_ABI_VOID __cilkrts_sync(__cilkrts_stack_frame *sf)
__cilkrts_c_sync(w, sf); __cilkrts_c_sync(w, sf);
} }
/**
* Suspends the runtime by notifying the workers that they should not try to
* steal. This function is supposed to be called from a non-parallel region
* (i.e., after cilk_sync in the top-level spawning function). Otherwise,
* which workers are sleeping or busy is unpredictable in general.
* The runtime can be resumed by calling __cilkrts_resume().
*/
CILK_ABI_VOID __cilkrts_suspend(void)
{
global_state_t *g = cilkg_get_global_state();
if (NULL == g || g->P < 2)
return;
__cilkrts_worker *w = __cilkrts_get_tls_worker();
// Do nothing if worker/frame is not available
if (NULL == w || NULL == w->current_stack_frame)
return;
// Do nothing if this was called within a parallel region.
__cilkrts_stack_frame *sf = w->current_stack_frame;
if (0 == (sf->flags & CILK_FRAME_LAST) || (sf->flags & CILK_FRAME_UNSYNCHED))
return;
__cilkrts_worker *root = g->workers[0];
root->l->steal_failure_count = g->max_steal_failures + 1;
CILK_ASSERT(root->l->signal_node);
signal_node_msg(root->l->signal_node, 0);
}
/**
* Resumes the runtime by notifying the workers that they can steal.
*/
CILK_ABI_VOID __cilkrts_resume(void)
{
global_state_t *g = cilkg_get_global_state();
if (NULL == g || g->P < 2)
return;
__cilkrts_worker *root = g->workers[0];
CILK_ASSERT(root->l->signal_node);
signal_node_msg(root->l->signal_node, 1);
}
/* /*
* __cilkrts_get_sf * __cilkrts_get_sf
* *
...@@ -391,6 +441,10 @@ CILK_ABI_WORKER_PTR BIND_THREAD_RTN(void) ...@@ -391,6 +441,10 @@ CILK_ABI_WORKER_PTR BIND_THREAD_RTN(void)
__cilkrts_set_tls_worker(w); __cilkrts_set_tls_worker(w);
__cilkrts_cilkscreen_establish_worker(w); __cilkrts_cilkscreen_establish_worker(w);
START_INTERVAL(w, INTERVAL_IN_SCHEDULER);
START_INTERVAL(w, INTERVAL_IN_RUNTIME);
{ {
full_frame *ff = __cilkrts_make_full_frame(w, 0); full_frame *ff = __cilkrts_make_full_frame(w, 0);
...@@ -462,13 +516,10 @@ CILK_ABI_WORKER_PTR BIND_THREAD_RTN(void) ...@@ -462,13 +516,10 @@ CILK_ABI_WORKER_PTR BIND_THREAD_RTN(void)
global_os_mutex_unlock(); global_os_mutex_unlock();
/* If there's only 1 worker, the counts will be started in /* We are about to switch back into user code after binding the
* __cilkrts_scheduler */ thread. Start working again. */
if (g->P > 1) STOP_INTERVAL(w, INTERVAL_IN_RUNTIME);
{ START_INTERVAL(w, INTERVAL_WORKING);
START_INTERVAL(w, INTERVAL_IN_SCHEDULER);
START_INTERVAL(w, INTERVAL_WORKING);
}
ITT_SYNC_RELEASING(&unique_obj); ITT_SYNC_RELEASING(&unique_obj);
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#ifndef INCLUDED_CILK_ITTNOTIFY_DOT_H #ifndef INCLUDED_CILK_ITTNOTIFY_DOT_H
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* /*
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2012-2016, Intel Corporation
* Copyright (C) 2012-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "cilk_fiber-unix.h" #include "cilk_fiber-unix.h"
...@@ -47,33 +58,32 @@ ...@@ -47,33 +58,32 @@
#include <errno.h> #include <errno.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <unistd.h> #include <unistd.h>
#include "declare-alloca.h"
// You'd think that getting a defintion for alloca would be easy. But you'd
// be wrong. Here's a variant on what's recommended in the autoconf doc. I've
// remove the Windows portion since this is Unix-specific code.
#if defined HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
// MAP_ANON is deprecated on Linux, but seems to be required on Mac... // MAP_ANON is deprecated on Linux, but seems to be required on Mac...
#ifndef MAP_ANONYMOUS #ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON # define MAP_ANONYMOUS MAP_ANON
#endif
// MAP_STACK and MAP_GROWSDOWN have no affect in Linux as of 2014-04-04, but
// could be very useful in future versions. If they are not defined, then set
// them to zero (no bits set).
#ifndef MAP_STACK
# define MAP_STACK 0
#endif
#ifndef MAP_GROWSDOWN
# define MAP_GROWSDOWN 0
#endif #endif
// Magic number for sanity checking fiber structure // Magic number for sanity checking fiber structure
const unsigned magic_number = 0x5afef00d; const unsigned magic_number = 0x5afef00d;
int cilk_fiber_sysdep::s_page_size = getpagesize(); // Page size for stacks
#ifdef _WRS_KERNEL
long cilk_fiber_sysdep::s_page_size = 4096;
#else
long cilk_fiber_sysdep::s_page_size = sysconf(_SC_PAGESIZE);
#endif
cilk_fiber_sysdep::cilk_fiber_sysdep(std::size_t stack_size) cilk_fiber_sysdep::cilk_fiber_sysdep(std::size_t stack_size)
: cilk_fiber(stack_size) : cilk_fiber(stack_size)
...@@ -270,7 +280,7 @@ void cilk_fiber_sysdep::make_stack(size_t stack_size) ...@@ -270,7 +280,7 @@ void cilk_fiber_sysdep::make_stack(size_t stack_size)
p = (char*)mmap(0, rounded_stack_size, p = (char*)mmap(0, rounded_stack_size,
PROT_READ|PROT_WRITE, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK|MAP_GROWSDOWN,
-1, 0); -1, 0);
if (MAP_FAILED == p) { if (MAP_FAILED == p) {
// For whatever reason (probably ran out of memory), mmap() failed. // For whatever reason (probably ran out of memory), mmap() failed.
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2012-2016, Intel Corporation
* Copyright (C) 2012-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#ifndef INCLUDED_CILK_FIBER_UNIX_DOT_H #ifndef INCLUDED_CILK_FIBER_UNIX_DOT_H
...@@ -126,13 +137,12 @@ struct cilk_fiber_sysdep : public cilk_fiber ...@@ -126,13 +137,12 @@ struct cilk_fiber_sysdep : public cilk_fiber
inline char* get_stack_base_sysdep() { return m_stack_base; } inline char* get_stack_base_sysdep() { return m_stack_base; }
private: private:
char* m_stack_base; ///< The base of this fiber's stack. char* m_stack_base; ///< The base of this fiber's stack.
char* m_stack; // Stack memory (low address) char* m_stack; ///< Stack memory (low address)
__CILK_JUMP_BUFFER m_resume_jmpbuf; // Place to resume fiber __CILK_JUMP_BUFFER m_resume_jmpbuf; ///< Place to resume fiber
unsigned m_magic; // Magic number for checking unsigned m_magic; ///< Magic number for checking
static int s_page_size; // Page size for static long s_page_size; ///< Page size for stacks.
// stacks.
// Allocate memory for a stack. This method // Allocate memory for a stack. This method
// initializes m_stack and m_stack_base. // initializes m_stack and m_stack_base.
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2012-2016, Intel Corporation
* Copyright (C) 2012-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* Implementations of non-platform-specific aspects of cilk_fiber, especially /* Implementations of non-platform-specific aspects of cilk_fiber, especially
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2012-2016, Intel Corporation
* Copyright (C) 2012-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,12 +31,26 @@ ...@@ -34,12 +31,26 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "cilk_malloc.h" #include "cilk_malloc.h"
#include <stdlib.h> #include <stdlib.h>
#if defined _WIN32 || defined _WIN64 || defined __linux__ #if defined _WIN32 || defined _WIN64 || defined __GLIBC__ || defined __linux__
#include <malloc.h> #include <malloc.h>
#define HAS_MEMALIGN 1 #define HAS_MEMALIGN 1
#endif #endif
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
/* cilk_str_mem.h -*-C-*-
*
*************************************************************************
*
* Copyright (C) 2014-2016, Intel Corporation
* 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 Intel Corporation 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 AND CONTRIBUTORS
* "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
* HOLDER 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.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
* @file cilk_str_mem.h
*
* @breif Interface to safe string/memmory C API to replace banned C API.
*/
#ifndef INCLUDED_CILK_STR_MEM_DOT_H
#define INCLUDED_CILK_STR_MEM_DOT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _WIN32
# include "safe_lib.h"
# include "snprintf_s.h"
#define cilk_strlen(str) strnlen_s(str, RSIZE_MAX_STR)
#define cilk_strcpy_s strcpy_s
// Different sprintf entries with different argument lists.
#define cilk_snprintf_s snprintf_s_s
#define cilk_snprintf_i snprintf_s_i
#define cilk_snprintf_l snprintf_s_l
#define cilk_snprintf_si snprintf_s_si
#define cilk_snprintf_sl snprintf_s_sl
#else // ! defined _WIN32
#define CILK_MAX_STR (4UL << 10) // 4KB
#define cilk_strlen(str) strnlen_s(str, CILK_MAX_STR)
#define cilk_strcpy_s strcpy_s
#define cilk_snprintf_s sprintf_s
#define cilk_snprintf_i sprintf_s
#define cilk_snprintf_l sprintf_s
#define cilk_snprintf_si sprintf_s
#define cilk_snprintf_sl sprintf_s
#endif // ! defined _WIN32
#ifdef __cplusplus
}
#endif
#endif // INCLUDED_CILK_STR_MEM_DOT_H
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#ifndef INCLUDED_COMPONENT_DOT_H #ifndef INCLUDED_COMPONENT_DOT_H
......
/* cilk-abi-vla.cpp -*-C++-*-
*
*************************************************************************
*
* Copyright (C) 2013-2016, Intel Corporation
* 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 Intel Corporation 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 AND CONTRIBUTORS
* "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
* HOLDER 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.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/*
* Implementation of Variable Length Array (VLA) ABI.
*
* The compiler calls these functions to allocate Variable Length Arrays
* at runtime. The compiler must guarantee that __cilkrts_stack_free() is
* called to cleanup any memory allocated by __cilkrts_stack_alloc().
*
* This generic implementation always allocates the memory from the heap.
* Optimally, the implementation should expand the frame of the calling
* function if possible, since that will be faster. See the x86 version
* for one possible implementation.
*/
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include "internal/abi.h"
#include "cilk-abi-vla-internal.h"
// Allocate space for a variable length array
CILK_ABI(__cilkrts_void_ptr)
__cilkrts_stack_alloc(
__cilkrts_stack_frame *sf,
size_t size,
size_t distance_from_sp_to_alloca_area,
uint32_t align, // align is always >= minimum stack alignment and
// >= ptr_size as well, and must be a power of 2.
uint32_t needs_tag // non-zero if the pointer being returned needs to
// be tagged
)
{
// full_size will be a multiple of align, and contains
// enough extra space to allocate a marker.
size_t full_size = (size + align - 1) & ~(align - 1);
// Allocate memory from the heap. The compiler is responsible
// for guaranteeing us a chance to free it before the function
// exits
return (void *)vla_internal_heap_alloc(sf, full_size, align);
}
// Free the space allocated for a variable length array.
CILK_ABI(void)
__cilkrts_stack_free(
__cilkrts_stack_frame *sf,
void *p,
size_t size,
size_t distance_from_sp_to_alloca_area,
uint32_t align, // same requirements as for align in allocation,
// and must match alignment that was passed when
// doing the allocation
uint32_t known_from_stack // non-zero if this is known to be allocated
// on the stack, and therefore has no tag
)
{
// full_size will be a multiple of align, and contains
// enough extra space to allocate a marker if one was needed.
size_t full_size = (size + align - 1) & ~(align - 1);
// Just free the allocated memory to the heap since we don't know
// how to expand/contract the calling frame
vla_internal_heap_free(p, full_size);
}
/* symbol_test.c -*-C-*- /* os.h -*-C++-*-
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,30 +31,34 @@ ...@@ -34,30 +31,34 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* simple program to verify that there are no undefined symbols in the runtime. /*
* If the runtime uses any symbols that are not defined, compiling this program * void __cilkrts_fence(void)
* will cause a linker error. *
* Executes an MFENCE instruction to serialize all load and store instructions
* that were issued prior the MFENCE instruction. This serializing operation
* guarantees that every load and store instruction that precedes the MFENCE
* instruction is globally visible before any load or store instruction that
* follows the MFENCE instruction. The MFENCE instruction is ordered with
* respect to all load and store instructions, other MFENCE instructions, any
* SFENCE and LFENCE instructions, and any serializing instructions (such as
* the CPUID instruction).
*/ */
#define _Cilk_for for // COMMON_SYSDEP void __cilkrts_fence(void); ///< MFENCE instruction
extern void* __cilkrts_global_state; # define __cilkrts_fence() __asm__ __volatile__ ("mcr p15,0,%[t],c7,c10,4\n" :: [t] "r" (0) : "memory");
void *volatile p;
void foo () { }
int main ()
{
int i;
long long j;
_Cilk_spawn foo();
_Cilk_for (i = 0; i < 2; ++i)
foo();
_Cilk_for (j = 0; j < 2; ++j)
foo();
p = __cilkrts_global_state;
return 0;
}
/* End symbol_test.c */
/* os-unix-sysdep.c -*-C-*-
*
*************************************************************************
*
* Copyright (C) 2009-2016, Intel Corporation
* 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 Intel Corporation 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 AND CONTRIBUTORS
* "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
* HOLDER 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.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*************************************************************************
*
* This file contains generic implementations of system-specific code for
* Unix-based systems
*/
#include "os.h"
#include "sysdep.h"
/*
* The cycle counter is used for debugging. This funciton is only called if
* CILK_PROFILE is defined when the runtime is built.
*/
COMMON_SYSDEP unsigned long long __cilkrts_getticks(void)
{
# warning "unimplemented cycle counter"
return 0;
}
/*
* A "short pause" - called from the Cilk runtime's spinloops.
*/
COMMON_SYSDEP void __cilkrts_short_pause(void)
{
# warning __cilkrts_short_pause empty
}
/*
* Interlocked exchange - used to implement the Cilk runtime's spinloops
*/
COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x)
{
x = __sync_lock_test_and_set(ptr, x);
return x;
}
/*
* Restore the floating point state that is stored in a stack frame at each
* spawn. This should be called each time a frame is resumed.
*
* Only valid for IA32 and Intel64 processors.
*/
void restore_x86_fp_state (__cilkrts_stack_frame *sf)
{
}
/*
* Save the floating point state to the __cilkrts_stack_frame at each spawn.
*
* Architecture-specific - Should only be needed on IA32 and Intel64
* processors.
*/
void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf)
{
}
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2013-2016, Intel Corporation
* Copyright (C) 2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
...@@ -103,5 +114,5 @@ __cilkrts_stack_free( ...@@ -103,5 +114,5 @@ __cilkrts_stack_free(
// Just free the allocated memory to the heap since we don't know // Just free the allocated memory to the heap since we don't know
// how to expand/contract the calling frame // how to expand/contract the calling frame
vla_internal_heap_free(t, full_size); vla_internal_heap_free(p, full_size);
} }
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* /*
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
************************************************************************* *************************************************************************
* *
* This file contains generic implementations of system-specific code for * This file contains generic implementations of system-specific code for
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2013-2016, Intel Corporation
* Copyright (C) 2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
...@@ -58,37 +69,21 @@ ...@@ -58,37 +69,21 @@
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include "declare-alloca.h"
// Getting a definition for alloca appears to be a pain in the butt. Here's
// a variant on what's recommended in the autoconf doc
#if defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#elif defined HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#ifdef _WIN32 #ifdef _WIN32
# define INLINE static __inline # define INLINE static __inline
# pragma warning(disable:1025) // Don't whine about zero extending result of unary operation # pragma warning(disable:1025) // Don't whine about zero extending result of unary operation
#else #else
# define INLINE static inline # define INLINE static inline
#endif #endif
#include "internal/abi.h" #include "internal/abi.h"
#include "cilk-abi-vla-internal.h" #include "cilk-abi-vla-internal.h"
#ifdef __INTEL_COMPILER
// These functions are used only within __INTEL_COMPILER.
#if defined(__x86_64) || defined(_M_X64) #if defined(__x86_64) || defined(_M_X64)
INLINE void setsp(void *val) INLINE void setsp(void *val)
{ {
...@@ -151,7 +146,7 @@ INLINE void copy_frame_up_and_move_bp( ...@@ -151,7 +146,7 @@ INLINE void copy_frame_up_and_move_bp(
"movq %2, %%rcx;" "movq %2, %%rcx;"
"shrq $3, %%rcx;" "shrq $3, %%rcx;"
"std; rep movsq; cld;" "std; rep movsq; cld;"
"movl %3, %%rbp;" : "movq %3, %%rbp;" :
: :
"rm"(dst), "rm"(src), "rm"(cpy_bytes), "rm"(new_ebp) : "rm"(dst), "rm"(src), "rm"(cpy_bytes), "rm"(new_ebp) :
"rsi", "rdi", "rcx", "rbp", "memory"); "rsi", "rdi", "rcx", "rbp", "memory");
...@@ -226,6 +221,7 @@ INLINE void copy_frame_up_and_move_bp( ...@@ -226,6 +221,7 @@ INLINE void copy_frame_up_and_move_bp(
} }
#endif #endif
#endif // __INTEL_COMPILER
#define c_cilk_ptr_from_heap 0xc2f2f00d #define c_cilk_ptr_from_heap 0xc2f2f00d
#define c_cilk_ptr_from_stack 0xc3f30d0f #define c_cilk_ptr_from_stack 0xc3f30d0f
...@@ -241,11 +237,17 @@ __cilkrts_stack_alloc( ...@@ -241,11 +237,17 @@ __cilkrts_stack_alloc(
// be tagged // be tagged
) )
{ {
#ifdef __INTEL_COMPILER
// full_size will be a multiple of align, and contains // full_size will be a multiple of align, and contains
// enough extra space to allocate a marker. // enough extra space to allocate a marker.
size_t full_size = (size + align - 1) & ~(align - 1); size_t full_size = (size + align - 1) & ~(align - 1);
#ifndef __INTEL_COMPILER
// Allocate memory from the heap. The compiler is responsible
// for guaranteeing us a chance to free it before the function
// exits
return (void *)vla_internal_heap_alloc(sf, full_size, align);
#else
if (needs_tag) { if (needs_tag) {
full_size += align; full_size += align;
} }
...@@ -336,10 +338,7 @@ __cilkrts_stack_alloc( ...@@ -336,10 +338,7 @@ __cilkrts_stack_alloc(
} }
return t; return t;
#else // Not __INTEL_COMPILER #endif // __INTEL_COMPILER
// Not supported unless we can figure out how to get the size of the frame
return NULL;
#endif
} }
// This frees the space allocated for a variable length array. // This frees the space allocated for a variable length array.
...@@ -356,12 +355,17 @@ __cilkrts_stack_free( ...@@ -356,12 +355,17 @@ __cilkrts_stack_free(
// on the stack, and therefore has no tag // on the stack, and therefore has no tag
) )
{ {
#ifdef __INTEL_COMPILER
uint32_t *t = (uint32_t*)p;
// full_size will be a multiple of align, and contains // full_size will be a multiple of align, and contains
// enough extra space to allocate a marker if one was needed. // enough extra space to allocate a marker if one was needed.
size_t full_size = (size + align - 1) & ~(align - 1); size_t full_size = (size + align - 1) & ~(align - 1);
#ifndef __INTEL_COMPILER
// Just free the allocated memory to the heap since we don't know
// how to expand/contract the calling frame
vla_internal_heap_free(p, full_size);
#else
uint32_t *t = (uint32_t*)p;
if (known_from_stack == 0) { if (known_from_stack == 0) {
// if the compiler hasn't told the run-time that this is // if the compiler hasn't told the run-time that this is
// known to be on the stack, then this pointer must have been // known to be on the stack, then this pointer must have been
...@@ -435,7 +439,5 @@ __cilkrts_stack_free( ...@@ -435,7 +439,5 @@ __cilkrts_stack_free(
else { else {
vla_internal_heap_free(t, full_size); vla_internal_heap_free(t, full_size);
} }
#else // Not __INTEL_COMPILER #endif // __INTEL_COMPILER
// Not supported unless we can figure out how to get the size of the frame
#endif
} }
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/* gcc before 4.4 does not implement __sync_synchronize properly */ /* gcc before 4.4 does not implement __sync_synchronize properly */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
************************************************************************* *************************************************************************
* *
* Copyright (C) 2009-2014, Intel Corporation * Copyright (C) 2009-2016, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
...@@ -31,6 +31,20 @@ ...@@ -31,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
************************************************************************* *************************************************************************
* *
* This file contains system-specific code for Unix systems * This file contains system-specific code for Unix systems
...@@ -96,7 +110,7 @@ COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x) ...@@ -96,7 +110,7 @@ COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x)
* This declaration should generate an error when the Intel compiler adds * This declaration should generate an error when the Intel compiler adds
* supprt for the intrinsic. * supprt for the intrinsic.
*/ */
#ifdef __INTEL_COMPILER #if defined(__INTEL_COMPILER) || defined(__clang__)
static inline int __builtin_cpu_supports(const char *feature) static inline int __builtin_cpu_supports(const char *feature)
{ {
return 1; return 1;
...@@ -124,7 +138,6 @@ void restore_x86_fp_state (__cilkrts_stack_frame *sf) { ...@@ -124,7 +138,6 @@ void restore_x86_fp_state (__cilkrts_stack_frame *sf) {
#endif #endif
} }
void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf) void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf)
{ {
// If we're not going to restore, don't bother saving it // If we're not going to restore, don't bother saving it
...@@ -135,7 +148,7 @@ void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf) ...@@ -135,7 +148,7 @@ void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf)
{ {
__asm__ ("stmxcsr %0" : "=m" (sf->mxcsr)); __asm__ ("stmxcsr %0" : "=m" (sf->mxcsr));
} }
__asm__ ("fnstcw %0" : "=m" (sf->fpcsr)); __asm__ ("fnstcw %0" : "=m" (sf->fpcsr));
} }
#endif #endif
} }
......
/* cilk-abi-vla.cpp -*-C++-*-
*
*************************************************************************
*
* Copyright (C) 2013-2016, Intel Corporation
* 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 Intel Corporation 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 AND CONTRIBUTORS
* "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
* HOLDER 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.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/*
* You'd think that getting a declaration for alloca would be easy. But you'd
* be wrong. Here's a variant on what's recommended in the autoconf doc
*/
#if defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#elif defined HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
<doxygenlayout version="1.0"> <doxygenlayout version="1.0">
<!-- <!--
# @copyright # Copyright (C) 2011-2016, Intel Corporation
# Copyright (C) 2011-2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -20,7 +18,6 @@ ...@@ -20,7 +18,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -33,6 +30,20 @@ ...@@ -33,6 +30,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
--> -->
<!-- Navigation index tabs for HTML output --> <!-- Navigation index tabs for HTML output -->
......
# Doxyfile 1.7.4 # Doxyfile 1.7.4
# @copyright # Copyright (C) 2011-2016, Intel Corporation
# Copyright (C) 2011-2013, Intel Corporation
# All rights reserved. # All rights reserved.
# #
# @copyright
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions # modification, are permitted provided that the following conditions
# are met: # are met:
...@@ -19,7 +17,6 @@ ...@@ -19,7 +17,6 @@
# contributors may be used to endorse or promote products derived # contributors may be used to endorse or promote products derived
# from this software without specific prior written permission. # from this software without specific prior written permission.
# #
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -32,6 +29,20 @@ ...@@ -32,6 +29,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
# This file describes the settings to be used by the documentation system # This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project. # doxygen (www.doxygen.org) for a project.
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "except-gcc.h" #include "except-gcc.h"
...@@ -100,12 +111,12 @@ static void ...@@ -100,12 +111,12 @@ static void
decode_exceptions(char *out, size_t len, struct pending_exception_info *info) decode_exceptions(char *out, size_t len, struct pending_exception_info *info)
{ {
if (info->empty()) if (info->empty())
snprintf(out, len, "[empty]"); cilk_snprintf_s(out, len, "%s", "[empty]");
else if (info->rethrow) else if (info->rethrow)
snprintf(out, len, "[rethrow %p]", cilk_snprintf_l(out, len, "[rethrow %p]",
info->runtime_state.caughtExceptions); info->runtime_state.caughtExceptions);
else else
snprintf(out, len, "[throw %p]", (void *)info->active); cilk_snprintf_l(out, len, "[throw %p]", (void *)info->active);
} }
#endif #endif
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "frame_malloc.h" #include "frame_malloc.h"
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#ifndef INCLUDED_FULL_FRAME_DOT_H #ifndef INCLUDED_FULL_FRAME_DOT_H
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "global_state.h" #include "global_state.h"
...@@ -57,7 +68,7 @@ ...@@ -57,7 +68,7 @@
// TBD: There is a race when multiple threads try to initialize the // TBD: There is a race when multiple threads try to initialize the
// user_settable_values?? // user_settable_values??
// //
// Set to true if the user settable values portion of the global state // Set to true if the user settable values portion of the global state
// singleton is initialized, even if the rest of the singleton is not // singleton is initialized, even if the rest of the singleton is not
// initialized. // initialized.
...@@ -69,9 +80,10 @@ namespace { ...@@ -69,9 +80,10 @@ namespace {
// cilkg_get_user_settable_values() is called and partially-zero-filled until // cilkg_get_user_settable_values() is called and partially-zero-filled until
// cilkg_init_global_state() is called. The first field is filled in with // cilkg_init_global_state() is called. The first field is filled in with
// the size of a void* for the debugger and must be valid before initialization // the size of a void* for the debugger and must be valid before initialization
global_state_t global_state_singleton = static global_state_t global_state_singleton =
{ {
sizeof(void *), // addr_size sizeof(void *), // addr_size
GLOBAL_STATE_VERSION, // structure version
}; };
...@@ -93,13 +105,15 @@ inline bool strmatch(const char* a, const char* b) ...@@ -93,13 +105,15 @@ inline bool strmatch(const char* a, const char* b)
return 0 == std::strcmp(a, b); return 0 == std::strcmp(a, b);
} }
// Returns the integer value represented by the null-terminated string at 's'. // Returns the integer value represented by the null-terminated, decimal string
// at 's'.
inline long to_long(const char* s) inline long to_long(const char* s)
{ {
char *end; char *end;
errno = 0; errno = 0;
return std::strtol(s, &end, 0); return std::strtol(s, &end, 10);
} }
#ifdef _WIN32 #ifdef _WIN32
...@@ -571,7 +585,6 @@ global_state_t* cilkg_init_global_state() ...@@ -571,7 +585,6 @@ global_state_t* cilkg_init_global_state()
void cilkg_publish_global_state(global_state_t* g) void cilkg_publish_global_state(global_state_t* g)
{ {
// TBD: which one of these needs to be executed first? I say // TBD: which one of these needs to be executed first? I say
// cilkg_singleton_ptr needs to be set last, with a mfence in // cilkg_singleton_ptr needs to be set last, with a mfence in
// between, since it is the flag that cilkg_is_published_is // between, since it is the flag that cilkg_is_published_is
...@@ -584,7 +597,15 @@ void cilkg_publish_global_state(global_state_t* g) ...@@ -584,7 +597,15 @@ void cilkg_publish_global_state(global_state_t* g)
void cilkg_deinit_global_state() void cilkg_deinit_global_state()
{ {
cilkg_singleton_ptr = NULL; cilkg_singleton_ptr = NULL;
__cilkrts_global_state = NULL;
// The pointer to the global state needs to remain valid for the
// debugger. Thus, we can't clear the following pointer.
// __cilkrts_global_state = NULL;
// We also don't reset the global state, so that if we resume
// execution after ending Cilk, user set variables (e.g., # of
// workers) remains valid.
} }
int cilkg_is_published(void) int cilkg_is_published(void)
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
...@@ -70,6 +81,16 @@ enum record_replay_t { ...@@ -70,6 +81,16 @@ enum record_replay_t {
}; };
/** /**
* @brief Global state structure version.
*
* Since the global state is exposed for debugger access, we need a version
* number to let it know that the version of the structure is what it expects
* to see. If any of the fields marked as (fixed) below are changed, the
* version number needs to be bumped.
*/
#define GLOBAL_STATE_VERSION 0
/**
* @brief The global state is a structure that is shared by all workers in * @brief The global state is a structure that is shared by all workers in
* Cilk. * Cilk.
* *
...@@ -109,7 +130,9 @@ struct global_state_t { /* COMMON_PORTABLE */ ...@@ -109,7 +130,9 @@ struct global_state_t { /* COMMON_PORTABLE */
* debugger integration library will need to be changed to match!!! * debugger integration library will need to be changed to match!!!
*************************************************************************/ *************************************************************************/
int addr_size; ///< Number of bytes for an address, used by debugger (fixed) uint16_t addr_size; ///< Number of bytes for an address, used by debugger (fixed)
uint16_t version; ///< Version of this structure (fixed)
int system_workers; ///< Number of system workers (fixed) int system_workers; ///< Number of system workers (fixed)
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "jmpbuf.h" #include "jmpbuf.h"
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
/* /*
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -20,7 +18,6 @@ ...@@ -20,7 +18,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -33,6 +30,20 @@ ...@@ -33,6 +30,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
CILKABI0 CILKABI0
...@@ -87,11 +98,13 @@ CILKABI1 ...@@ -87,11 +98,13 @@ CILKABI1
__cilkrts_get_sf; __cilkrts_get_sf;
__cilkrts_get_stack_size; __cilkrts_get_stack_size;
__cilkrts_get_worker_rank; __cilkrts_get_worker_rank;
__cilkrts_resume;
__cilkrts_save_fp_ctrl_state; __cilkrts_save_fp_ctrl_state;
__cilkrts_stack_alloc; __cilkrts_stack_alloc;
__cilkrts_stack_free; __cilkrts_stack_free;
__cilkrts_suspend;
__cilkrts_watch_stack; __cilkrts_watch_stack;
} CILKABI0; };
CILKLIB1.02 CILKLIB1.02
{ {
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -7,7 +7,7 @@ ___cilkrts_bump_worker_rank ...@@ -7,7 +7,7 @@ ___cilkrts_bump_worker_rank
___cilkrts_bump_worker_rank_internal ___cilkrts_bump_worker_rank_internal
___cilkrts_cilk_for_32 ___cilkrts_cilk_for_32
___cilkrts_cilk_for_64 ___cilkrts_cilk_for_64
___cilkrts_debugger_notification
___cilkrts_dump_stats ___cilkrts_dump_stats
___cilkrts_end_cilk ___cilkrts_end_cilk
___cilkrts_enter_frame ___cilkrts_enter_frame
...@@ -33,15 +33,17 @@ ___cilkrts_hyperobject_alloc ...@@ -33,15 +33,17 @@ ___cilkrts_hyperobject_alloc
___cilkrts_hyperobject_dealloc ___cilkrts_hyperobject_dealloc
___cilkrts_hyperobject_noop_destroy ___cilkrts_hyperobject_noop_destroy
___cilkrts_init ___cilkrts_init
___cilkrts_irml_version
___cilkrts_leave_frame ___cilkrts_leave_frame
___cilkrts_metacall ___cilkrts_metacall
___cilkrts_resume
___cilkrts_rethrow ___cilkrts_rethrow
___cilkrts_return_exception ___cilkrts_return_exception
___cilkrts_save_fp_ctrl_state ___cilkrts_save_fp_ctrl_state
___cilkrts_set_param ___cilkrts_set_param
___cilkrts_stack_alloc ___cilkrts_stack_alloc
___cilkrts_stack_free ___cilkrts_stack_free
___cilkrts_suspend
___cilkrts_sync ___cilkrts_sync
___cilkrts_synched ___cilkrts_synched
___cilkrts_watch_stack ___cilkrts_watch_stack
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "metacall_impl.h" #include "metacall_impl.h"
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2010-2016, Intel Corporation
* Copyright (C) 2010-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
...@@ -49,6 +60,7 @@ ...@@ -49,6 +60,7 @@
#include "rts-common.h" #include "rts-common.h"
#include "cilk/common.h" #include "cilk/common.h"
#include "cilk-tbb-interop.h" #include "cilk-tbb-interop.h"
#include "cilk_str_mem.h"
#ifdef __cplusplus #ifdef __cplusplus
# include <cstddef> # include <cstddef>
...@@ -156,6 +168,7 @@ COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x); ...@@ -156,6 +168,7 @@ COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x);
COMMON_SYSDEP void __cilkrts_sleep(void); ///< Sleep briefly COMMON_SYSDEP void __cilkrts_sleep(void); ///< Sleep briefly
COMMON_SYSDEP void __cilkrts_yield(void); ///< Yield quantum COMMON_SYSDEP void __cilkrts_yield(void); ///< Yield quantum
COMMON_SYSDEP void __cilkrts_idle(void); ///< Idle
/** /**
* @brief Gets environment variable 'varname' and copy its value into 'value'. * @brief Gets environment variable 'varname' and copy its value into 'value'.
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#include "os_mutex.h" #include "os_mutex.h"
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
/** /**
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2007-2016, Intel Corporation
* Copyright (C) 2007-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2009-2016, Intel Corporation
* Copyright (C) 2009-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/ **************************************************************************/
#ifndef INCLUDED_PEDIGREES_DOT_H #ifndef INCLUDED_PEDIGREES_DOT_H
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2012-2016, Intel Corporation
* Copyright (C) 2012-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
...@@ -46,8 +57,8 @@ ...@@ -46,8 +57,8 @@
#include <stdlib.h> #include <stdlib.h>
// clang is really strict about printf formats, so use the annoying integer // clang is really strict about printf formats, so use the annoying integer
// printf macros. Unfortunately they're not avaiable on Windows // printf macros. Unfortunately they're not available on Windows (or on VxWorks)
#ifdef _WIN32 #if defined(_WIN32) || defined(_WRS_KERNEL)
#define PRIu64 "llu" #define PRIu64 "llu"
#else #else
#define __STDC_FORMAT_MACROS 1 #define __STDC_FORMAT_MACROS 1
...@@ -251,10 +262,9 @@ char * walk_pedigree_nodes(char *p, const __cilkrts_pedigree *pnode) ...@@ -251,10 +262,9 @@ char * walk_pedigree_nodes(char *p, const __cilkrts_pedigree *pnode)
if (pnode->parent) if (pnode->parent)
{ {
p = walk_pedigree_nodes(p, pnode->parent); p = walk_pedigree_nodes(p, pnode->parent);
p += sprintf(p, "_"); p += cilk_snprintf_s(p, PEDIGREE_BUFF_SIZE, "%s", (char *) "_");
} }
return p + cilk_snprintf_l(p, PEDIGREE_BUFF_SIZE, "%" PRIu64, pnode->rank);
return p + sprintf(p, "%" PRIu64, pnode->rank);
} }
/** /**
...@@ -278,7 +288,7 @@ void write_to_replay_log (__cilkrts_worker *w, const char *type, ...@@ -278,7 +288,7 @@ void write_to_replay_log (__cilkrts_worker *w, const char *type,
// If we don't have an initial pedigree node, just use "0" to fill the slot // If we don't have an initial pedigree node, just use "0" to fill the slot
if (NULL == initial_node) if (NULL == initial_node)
strcpy(pedigree, "0"); cilk_strcpy_s(pedigree, PEDIGREE_BUFF_SIZE, "0");
else else
walk_pedigree_nodes(pedigree, initial_node); walk_pedigree_nodes(pedigree, initial_node);
...@@ -544,7 +554,9 @@ void load_recorded_log(__cilkrts_worker *w) ...@@ -544,7 +554,9 @@ void load_recorded_log(__cilkrts_worker *w)
FILE *f; FILE *f;
// Open the log for reading // Open the log for reading
sprintf(local_replay_file_name, "%s%d.cilklog", w->g->record_replay_file_name, w->self); cilk_snprintf_si(local_replay_file_name, sizeof(local_replay_file_name),
"%s%d.cilklog", w->g->record_replay_file_name, w->self);
f = fopen(local_replay_file_name, "r"); f = fopen(local_replay_file_name, "r");
// Make sure we found a log! // Make sure we found a log!
...@@ -701,7 +713,8 @@ void replay_init_workers(global_state_t *g) ...@@ -701,7 +713,8 @@ void replay_init_workers(global_state_t *g)
for(i = 0; i < g->total_workers; ++i) for(i = 0; i < g->total_workers; ++i)
{ {
__cilkrts_worker *w = g->workers[i]; __cilkrts_worker *w = g->workers[i];
sprintf(worker_file_name, "replay_log_%d.cilklog", w->self); cilk_snprintf_i(worker_file_name, sizeof(worker_file_name),
"replay_log_%d.cilklog", w->self);
w->l->record_replay_fptr = fopen(worker_file_name, "w+"); w->l->record_replay_fptr = fopen(worker_file_name, "w+");
CILK_ASSERT(NULL != w->l->record_replay_fptr); CILK_ASSERT(NULL != w->l->record_replay_fptr);
} }
...@@ -717,9 +730,8 @@ void replay_init_workers(global_state_t *g) ...@@ -717,9 +730,8 @@ void replay_init_workers(global_state_t *g)
for(i = 0; i < g->total_workers; ++i) for(i = 0; i < g->total_workers; ++i)
{ {
__cilkrts_worker *w = g->workers[i]; __cilkrts_worker *w = g->workers[i];
sprintf(worker_file_name, "%s%d.cilklog", cilk_snprintf_si(worker_file_name, sizeof(worker_file_name),
g->record_replay_file_name, "%s%d.cilklog", g->record_replay_file_name, w->self);
w->self);
w->l->record_replay_fptr = fopen(worker_file_name, "w+"); w->l->record_replay_fptr = fopen(worker_file_name, "w+");
CILK_ASSERT(NULL != w->l->record_replay_fptr); CILK_ASSERT(NULL != w->l->record_replay_fptr);
} }
......
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
* *
************************************************************************* *************************************************************************
* *
* @copyright * Copyright (C) 2012-2016, Intel Corporation
* Copyright (C) 2012-2013, Intel Corporation
* All rights reserved. * All rights reserved.
* *
* @copyright
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived * contributors may be used to endorse or promote products derived
* from this software without specific prior written permission. * from this software without specific prior written permission.
* *
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...@@ -34,6 +31,20 @@ ...@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
* *
**************************************************************************/ **************************************************************************/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment