Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team reduction for array type #200

Closed
kyungjoo-kim opened this issue Mar 9, 2016 · 1 comment
Closed

Team reduction for array type #200

kyungjoo-kim opened this issue Mar 9, 2016 · 1 comment
Assignees
Labels
pkg: Kokkos type: enhancement Issue is an enhancement, not a bug

Comments

@kyungjoo-kim
Copy link
Contributor

Currently team reduction is designed for scalar type and I need team reduction for array and the array should be thread specific. The input array may have initial values.

template< typename iType, class Lambda, typename ValueType, class JoinType >
KOKKOS_INLINE_FUNCTION
void parallel_reduce(const Impl::TeamThreadRangeBoundariesStruct<iType,Impl::ThreadsExecTeamMember>& loop_boundaries,
const Lambda & lambda, const JoinType& join, ValueType& init_result) {

ValueType result = init_result;

for( iType i = loop_boundaries.start; i < loop_boundaries.end; i+=loop_boundaries.increment) {
ValueType tmp = ValueType();

/// this tmp initialization should be reconsider to use thread local array.

lambda(i,tmp);
join(result,tmp);

}

init_result = loop_boundaries.thread.team_reduce(result,Impl::JoinLambdaAdapter<ValueType,JoinType>(join));
}

@crtrott
Copy link
Member

crtrott commented Oct 23, 2016

If this is still relevant please reissue in github kokkos/kokkos

@crtrott crtrott closed this as completed Oct 23, 2016
bartlettroscoe added a commit that referenced this issue Sep 6, 2017
Origin repo remote tracking branch: 'github/master'
Origin repo remote repo URL: 'github = [email protected]:TriBITSPub/TriBITS.git'

At commit:

commit 822a64a92646e20ab8162d6165fbf073946e5845
Author:  Roscoe A. Bartlett <[email protected]>
Date:    Tue Sep 5 18:33:59 2017 -0600
Summary: Add option <Project>_CHECK_FOR_UNPARSED_ARGUMENTS with default WARNING (#200)
bartlettroscoe added a commit that referenced this issue Nov 8, 2017
Origin repo remote tracking branch: 'github/master'
Origin repo remote repo URL: 'github = [email protected]:TriBITSPub/TriBITS.git'

At commit:

commit dcc2956c57672db185a397e991ebf3c2b541963f
Author:  Roscoe A. Bartlett <[email protected]>
Date:    Tue Nov 7 06:59:06 2017 -0700
Summary: Add check for package-with-subpackage commands in packages without subpackages (#200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Kokkos type: enhancement Issue is an enhancement, not a bug
Projects
None yet
Development

No branches or pull requests

4 participants