Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cmake/gauxc-exchcxx.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
find_package( ExchCXX QUIET )
if( NOT ${ExchCXX_FOUND} )
if( NOT ExchCXX_FOUND )

include( gauxc-dep-versions )

Expand All @@ -19,6 +19,10 @@ if( NOT ${ExchCXX_FOUND} )

FetchContent_MakeAvailable( exchcxx )

if( CMAKE_POSITION_INDEPENDENT_CODE AND TARGET exchcxx )

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this in principle, but can you point to the point where this caused an error for the current bug fix? This applies to the other instance as well.

set_target_properties( exchcxx PROPERTIES POSITION_INDEPENDENT_CODE ON )
endif()


else()

Expand All @@ -31,5 +35,3 @@ else()
endif()

endif()


8 changes: 5 additions & 3 deletions cmake/gauxc-integratorxx.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
find_package( IntegratorXX QUIET )
if( NOT ${IntegratorXX_FOUND} )
if( NOT IntegratorXX_FOUND )

include( gauxc-dep-versions )

Expand All @@ -16,6 +16,8 @@ if( NOT ${IntegratorXX_FOUND} )

FetchContent_MakeAvailable( integratorxx )

endif()

if( CMAKE_POSITION_INDEPENDENT_CODE AND TARGET integratorxx )
set_target_properties( integratorxx PROPERTIES POSITION_INDEPENDENT_CODE ON )
endif()

endif()
15 changes: 14 additions & 1 deletion src/xc_integrator/local_work_driver/factory.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,31 @@
*/
#include <gauxc/xc_integrator/local_work_driver.hpp>
#include "host/reference_local_host_work_driver.hpp"
#include <algorithm>
#include <cctype>
#ifdef GAUXC_HAS_DEVICE
#include "device/cuda/cuda_aos_scheme1.hpp"
#include "device/hip/hip_aos_scheme1.hpp"
#endif

namespace GauXC {
namespace {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please done use anonymous namespaces. "detail" would be appropriate here.


void trim_and_uppercase(std::string& name) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only used once, I don't see the value in adding the helper function.

auto not_space = [](unsigned char c) { return !std::isspace(c); };
name.erase(name.begin(), std::find_if(name.begin(), name.end(), not_space));
name.erase(std::find_if(name.rbegin(), name.rend(), not_space).base(), name.end());
std::transform(name.begin(), name.end(), name.begin(),
[](unsigned char c) { return static_cast<char>(std::toupper(c)); });
}

}

LocalWorkDriverFactory::ptr_return_t
LocalWorkDriverFactory::make_local_work_driver( ExecutionSpace ex,
std::string name, LocalWorkSettings settings ) {

std::transform( name.begin(), name.end(), name.begin(), ::toupper );
trim_and_uppercase(name);
(void)(settings);

switch(ex) {
Expand Down
Loading