A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://kokkos.github.io/kokkos-core-wiki/API/core/policies/TeamVectorRange.html below:

TeamVectorRange - Kokkos documentation

Toggle table of contents sidebar

TeamVectorRange

Header File: <Kokkos_Core.hpp>

Usage
parallel_for(TeamVectorRange(team,range), [=] (int i) {...});
parallel_reduce(TeamVectorRange(team,begin,end),
    [=] (int i, double& lsum) {...},sum);

TeamVectorRange is a nested execution policy used inside hierarchical parallelism. In contrast to global policies, the public interface for nested policies is implemented as functions, in order to enable implicit templating on the execution space type via the team handle.

Synopsis
template<class TeamMemberType, class iType>
/* implementation defined */ TeamVectorRange(TeamMemberType team, iType count);
template<class TeamMemberType, class iType1, class iType2>
/* implementation defined */ TeamVectorRange(TeamMemberType team, iType1 begin, iType2 end);
Description
template<class TeamMemberType, class iType>
/* implementation defined */ TeamVectorRange(TeamMemberType team, iType count);

Splits the index range 0 to count-1 over the threads of the team and their vector lanes.

template<class TeamMemberType, class iType1, class iType2>
/* implementation defined */ TeamVectorRange(TeamMemberType team, iType1 begin, iType2 end);

Splits the index range begin to end-1 over the threads of the team and their vector lanes.

Examples
typedef TeamPolicy<>::member_type team_handle;
parallel_for(TeamPolicy<>(N,AUTO,4), KOKKOS_LAMBDA (const team_handle& team) {
    int n = team.league_rank();
    parallel_for(TeamVectorRange(team,M), [&] (const int& i) {
        A(n,i) = B(n) + i;
    });
    team.team_barrier();
    int team_sum;
    parallel_reduce(TeamVectorRange(team,M), [&] (const int& i, int& lsum) {
        lsum += A(n,i);
    },team_sum);
    single(PerTeam(team),[&] () {
        A_rowsum(n) += team_sum;
    });
});

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4