Skip to content

Commit

Permalink
Version 2.0 release candidate 2
Browse files Browse the repository at this point in the history
Co-authored-by: John F. Carr <[email protected]>
Co-authored-by: TB Schardl <[email protected]>
  • Loading branch information
VoxSciurorum and neboat committed Jul 15, 2022
1 parent 832aeeb commit 8f6f6e8
Show file tree
Hide file tree
Showing 64 changed files with 3,290 additions and 14,431 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR CHEETAH_STANDALONE_BUI
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set(PACKAGE_NAME Cheetah)
set(PACKAGE_VERSION 12.0.0)
set(PACKAGE_VERSION 14.0.6)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "[email protected]")
set(PACKAGE_BUGREPORT "https://github.com/OpenCilk/cheetah/issues/")
endif()

# Require out of source build.
Expand Down Expand Up @@ -109,6 +109,9 @@ if (CHEETAH_STANDALONE_BUILD)
endif()
set(LLVM_LIT_ARGS "${LIT_ARGS_DEFAULT}" CACHE STRING "Default options for lit")
set(LLVM_LIT_OUTPUT_DIR "${CHEETAH_EXEC_OUTPUT_DIR}")

# Define llvm-link path
set(LLVM_LINK_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-link")
endif()

construct_cheetah_default_triple()
Expand Down
4 changes: 2 additions & 2 deletions cmake/Modules/AddCheetah.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -466,10 +466,10 @@ function(add_cheetah_bitcode name)
set(output_file_${libname} lib${output_name_${libname}}.bc)
add_custom_command(
OUTPUT ${output_dir_${libname}}/${output_file_${libname}}
COMMAND cp $<TARGET_OBJECTS:${libname}_compile> ${output_dir_${libname}}/${output_file_${libname}}
COMMAND ${LLVM_LINK_PATH} -o ${output_dir_${libname}}/${output_file_${libname}} $<TARGET_OBJECTS:${libname}_compile>
DEPENDS ${libname}_compile $<TARGET_OBJECTS:${libname}_compile>
COMMENT "Building bitcode ${output_file_${libname}}"
VERBATIM)
VERBATIM COMMAND_EXPAND_LISTS)
add_custom_target(${libname} DEPENDS ${output_dir_${libname}}/${output_file_${libname}})
install(FILES ${output_dir_${libname}}/${output_file_${libname}}
DESTINATION ${install_dir_${libname}}
Expand Down
1 change: 1 addition & 0 deletions cmake/base-config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
include(CheckIncludeFile)
include(CheckCXXSourceCompiles)
include(TestBigEndian)
include(CMakePushCheckState)

check_include_file(unwind.h HAVE_UNWIND_H)

Expand Down
1 change: 1 addition & 0 deletions cmake/config-ix.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include(CheckLibraryExists)
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)
include(CMakePushCheckState)

function(check_linker_flag flag out_var)
cmake_push_check_state()
Expand Down
19 changes: 2 additions & 17 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,8 @@ set(cilk_header_files
cilk/cilk_api.h
cilk/cilk_stub.h
cilk/holder.h
cilk/hyperobject_base.h
cilk/metaprogramming.h
cilk/reducer.h
cilk/reducer_file.h
cilk/reducer_list.h
cilk/reducer_max.h
cilk/reducer_min.h
cilk/reducer_min_max.h
cilk/reducer_opadd.h
cilk/reducer_opand.h
cilk/reducer_opmul.h
cilk/reducer_opor.h
cilk/reducer_opxor.h
cilk/reducer_ostream.h
cilk/reducer_string.h
cilk/reducer_vector.h
)
cilk/opadd_reducer.h
cilk/ostream_reducer.h)

set(output_dir ${CHEETAH_OUTPUT_DIR}/include)
set(out_files)
Expand Down
2 changes: 2 additions & 0 deletions include/cilk/cilk.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
#define cilk_for _Cilk_for
#define cilk_scope _Cilk_scope

#define cilk_reducer _Hyperobject

#endif /* _CILK_H */
18 changes: 15 additions & 3 deletions include/cilk/cilk_api.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifndef _CILK_API_H
#define _CILK_API_H

#include <stddef.h> /* size_t */

#ifdef __cplusplus
extern "C" {
#endif
Expand All @@ -11,18 +14,27 @@ extern unsigned __cilkrts_get_nworkers(void);
extern unsigned __cilkrts_get_worker_number(void) __attribute__((deprecated));
extern int __cilkrts_running_on_workers(void);

#if defined(__cilk_pedigrees__) || defined(ENABLE_CILKRTS_PEDIGREE)
#include <inttypes.h>
typedef struct __cilkrts_pedigree {
uint64_t rank;
struct __cilkrts_pedigree *parent;
} __cilkrts_pedigree;
extern __cilkrts_pedigree __cilkrts_get_pedigree(void);
extern void __cilkrts_bump_worker_rank(void);
extern void __cilkrts_dprand_set_seed(uint64_t seed);
extern void __cilkrts_init_dprng(void);
extern uint64_t __cilkrts_get_dprand(void);
#endif // defined(__cilk_pedigrees__) || defined(ENABLE_CILKRTS_PEDIGREE)

#undef VISIBILITY
typedef void (*__cilk_identity_fn)(void *);
typedef void (*__cilk_reduce_fn)(void *, void *);

extern void *__cilkrts_reducer_lookup(void *key);
extern void __cilkrts_reducer_register(void *key, size_t size,
__cilk_identity_fn id,
__cilk_reduce_fn reduce)
__attribute__((deprecated));
extern void __cilkrts_reducer_unregister(void *key)
__attribute__((deprecated));

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit 8f6f6e8

Please sign in to comment.