Skip to content

Commit

Permalink
Trival whitespace/comment tweaks.
Browse files Browse the repository at this point in the history
Details:
- Trivial whitespace and comment changes, most of which ideally would
  have been part of the previous commit pertaining to HPX (2b05948).
  • Loading branch information
fgvanzee committed Nov 14, 2022
1 parent 2b05948 commit f0337b7
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 37 deletions.
9 changes: 7 additions & 2 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ files-that-dont-contain = $(strip $(foreach f, $(1), $(if $(findstring $(2),$(f)
rm-dups = $(if $1,$(firstword $1) $(call rm-dups,$(filter-out $(firstword $1),$1)))



#
# --- Include makefile configuration file --------------------------------------
#
Expand Down Expand Up @@ -440,6 +441,7 @@ ADDON_FRAG_PATH := ./obj/$(CONFIG_NAME)/$(ADDON_DIR)
SANDBOX_FRAG_PATH := ./obj/$(CONFIG_NAME)/$(SANDBOX_DIR)



#
# --- Library name and local paths ---------------------------------------------
#
Expand Down Expand Up @@ -515,6 +517,8 @@ else
LIBBLIS_SO_OUTPUT_NAME := $(LIBBLIS_SO_PATH)
endif



#
# --- Utility program definitions ----------------------------------------------
#
Expand Down Expand Up @@ -644,6 +648,7 @@ endif
endif



#
# --- Include makefile definitions file ----------------------------------------
#
Expand Down Expand Up @@ -826,7 +831,7 @@ $(foreach c, $(CONFIG_LIST_FAM), $(eval $(call append-var-for,CXXLANGFLAGS,$(c))

# Enable clock_gettime() in time.h.
CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L
# Enable ip_mreq on macOS which is needed for ASIO which is needed for HPX
# Enable ip_mreq on macOS which is needed for ASIO which is needed for HPX.
ifeq ($(OS_NAME),Darwin)
CPPROCFLAGS += -D_DARWIN_C_SOURCE
endif
Expand Down Expand Up @@ -891,7 +896,7 @@ LDFLAGS += $(LIBPTHREAD)
endif
endif

# Threading flags for HPX
# Threading flags for HPX.
ifneq ($(findstring hpx,$(THREADING_MODEL)),)
HPX_CXXFLAGS := $(shell pkg-config --cflags hpx_component)
HPX_LDFLAGS := $(filter-out -shared,$(shell pkg-config --libs hpx_component))
Expand Down
56 changes: 28 additions & 28 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ print_usage()
echo " --enable-rpath, --disable-rpath"
echo " "
echo " Enable (disabled by default) setting an install_name for"
echo " dynamic libraries on macOS which starts with @rpath rather"
echo " than the absolute install path."
echo " dynamic libraries on macOS which starts with @rpath rather"
echo " than the absolute install path."
echo " "
echo " -e SYMBOLS, --export-shared[=SYMBOLS]"
echo " "
Expand All @@ -175,17 +175,17 @@ print_usage()
echo " BLIS, and the choice of which to use will be determined at"
echo " runtime. If the user does not express a preference (by"
echo " setting the BLIS_THREAD_IMPL environment variable to"
echo " 'single', 'openmp', 'pthreads', or 'hpx'; by calling the global"
echo " runtime API bli_thread_set_thread_impl(); or by encoding a"
echo " choice on a per-call basis within a rntm_t passed into the"
echo " expert API), then the first model listed in MODEL will be"
echo " used by default. Note that 'single' is silently appended"
echo " to whatever the user specifies in MODEL, meaning that"
echo " single-threaded functionality will always be available,"
echo " even if it is not requested and even if it is not enabled"
echo " by default. Even --disable-threading is actually shorthand"
echo " for --enable-threading=single (which is the default when"
echo " the option is not specified)."
echo " 'single', 'openmp', 'pthreads', or 'hpx'; by calling the"
echo " global runtime API bli_thread_set_thread_impl(); or by"
echo " encoding a choice on a per-call basis within a rntm_t"
echo " passed into the expert API), then the first model listed"
echo " in MODEL will be used by default. Note that 'single' is"
echo " silently appended to whatever the user specifies in MODEL,"
echo " meaning that single-threaded functionality will always be"
echo " available, even if it is not requested and even if it is"
echo " not enabled by default. Even --disable-threading is"
echo " actually shorthand for --enable-threading=single (which is"
echo " the default when the option is not specified)."
echo " "
echo " --enable-system, --disable-system"
echo " "
Expand Down Expand Up @@ -1262,9 +1262,9 @@ has_libmemkind()
# Depending on the return code from the compile step above, we set
# enable_memkind accordingly.
if [ "$?" == 0 ]; then
rval='yes'
rval='yes'
else
rval='no'
rval='no'
fi

# Remove the executable generated above.
Expand Down Expand Up @@ -1292,9 +1292,9 @@ has_pragma_omp_simd()
# Depending on the return code from the compile step above, we set
# enable_memkind accordingly.
if [ "$?" == 0 ]; then
rval='yes'
rval='yes'
else
rval='no'
rval='no'
fi

# Remove the executable generated above.
Expand Down Expand Up @@ -1514,11 +1514,11 @@ get_compiler_version()
# Begin parsing cc_vendor for the version string.

if [ "${cc_vendor}" = "GCC" ]; then
# Conda gcc sometimes has GCC (all caps) in the version string
# Conda gcc sometimes has GCC (all caps) in the version string
cc_vendor="gcc"
fi
if [ "${cc_vendor}" = "crosstool-NG" ]; then
# Treat compilers built by crosstool-NG (for eg: conda) as gcc.
# Treat compilers built by crosstool-NG (for eg: conda) as gcc.
cc_vendor="gcc"
fi
if [ "${cc_vendor}" = "icc" -o \
Expand Down Expand Up @@ -1561,7 +1561,7 @@ get_compiler_version()
cc_version=$(echo "${vendor_string}" \
| egrep -o 'AOCC.LLVM.[0-9]+\.[0-9]+\.?[0-9]*' \
| egrep -o '[0-9]+\.[0-9]+\.?[0-9]*' \
| { read first rest ; echo $first ; })
| { read first rest ; echo $first ; })
else

# Grep for the AOCC_x.y.z substring first, and then isolate the
Expand All @@ -1572,7 +1572,7 @@ get_compiler_version()
cc_version=$(echo "${vendor_string}" \
| egrep -o 'AOCC_[0-9]+\.[0-9]+\.?[0-9]*' \
| egrep -o '[0-9]+\.[0-9]+\.?[0-9]*' \
| { read first rest ; echo $first ; })
| { read first rest ; echo $first ; })
fi

elif [ "${cc_vendor}" = "oneAPI" ]; then
Expand Down Expand Up @@ -2025,9 +2025,9 @@ try_assemble()
${cc} ${cflags} -c ${asm_src} -o ${asm_bin} > /dev/null 2>&1

if [ "$?" == 0 ]; then
rval='yes'
rval='yes'
else
rval='no'
rval='no'
fi

# Remove the object file.
Expand Down Expand Up @@ -2501,7 +2501,7 @@ main()
enable_arg_max_hack='no'
enable_static='yes'
enable_shared='yes'
enable_rpath='no'
enable_rpath='no'
export_shared='public'
enable_pba_pools='yes'
enable_sba_pools='yes'
Expand Down Expand Up @@ -2944,7 +2944,7 @@ main()
get_binutils_version
check_assembler

# Check if there is any incompatibility due to the operating system.
# Check if there is any incompatibility due to the operating system.
check_os

# Remove duplicates and whitespace from the blacklist.
Expand Down Expand Up @@ -3473,7 +3473,7 @@ main()
if [ "x${enable_asan}" = "xyes" ]; then
echo "${script_name}: enabling AddressSanitizer support (except for optimized kernels)."
else
enable_asan='no'
enable_asan='no'
echo "${script_name}: AddressSanitizer support disabled."
fi

Expand Down Expand Up @@ -3665,7 +3665,7 @@ main()

elif [ "x${word}" = "xhpx" ]; then

echo "${script_name}: enabling support for threading via hpx."
echo "${script_name}: enabling support for threading via HPX."
enable_hpx='yes'
enable_hpx_01=1

Expand Down Expand Up @@ -3705,7 +3705,7 @@ main()

fi

# If either OpenMP or pthreads was enabled, given that single-threaded mode is
# If OpenMP, pthreads, or HPX was enabled, given that single-threaded mode is
# also always enabled, remind the user which one will serve as the default
# (that is, absent any explicit choice at runtime).
if [ "x${enable_openmp}" = "xyes" ] ||
Expand Down
2 changes: 1 addition & 1 deletion frame/include/bli_config_macro_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
// or pthreads are enabled. This macro is useful in situations when
// we want to detect use of either OpenMP or pthreads, or both (as
// opposed to neither being used).
#if defined ( BLIS_ENABLE_OPENMP ) || \
#if defined ( BLIS_ENABLE_OPENMP ) || \
defined ( BLIS_ENABLE_PTHREADS ) || \
defined ( BLIS_ENABLE_HPX )
#define BLIS_ENABLE_MULTITHREADING
Expand Down
3 changes: 2 additions & 1 deletion frame/thread/bli_thrcomm.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ typedef struct thrcomm_s
#endif
#endif

// -- Fields specific to HPX --

#ifdef BLIS_ENABLE_HPX
#ifdef BLIS_USE_HPX_BARRIER
hpx::barrier<> * barrier;
#endif
#endif


} thrcomm_t;


Expand Down
6 changes: 3 additions & 3 deletions frame/thread/bli_thread_hpx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ void bli_thread_launch_hpx

void bli_thread_initialize_hpx( int argc, char** argv )
{
hpx::start( nullptr, argc, argv );
hpx::start( nullptr, argc, argv );
}

int bli_thread_finalize_hpx()
{
hpx::apply([]() { hpx::finalize(); });
return hpx::stop();
hpx::apply([]() { hpx::finalize(); });
return hpx::stop();
}

} // extern "C"
Expand Down
4 changes: 2 additions & 2 deletions testsuite/src/test_libblis.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main( int argc, char** argv )
test_ops_t ops;

#ifdef BLIS_ENABLE_HPX
bli_thread_initialize_hpx( 1, argv );
bli_thread_initialize_hpx( 1, argv );
#endif

// Initialize libblis.
Expand All @@ -93,7 +93,7 @@ int main( int argc, char** argv )
bli_finalize();

#ifdef BLIS_ENABLE_HPX
return bli_thread_finalize_hpx();
return bli_thread_finalize_hpx();
#else
// Return peacefully.
return 0;
Expand Down

0 comments on commit f0337b7

Please sign in to comment.