public final class ThreadParams extends Object
Thread parameters handle the infrastructure info about the threading, including but
not limited to the number of threads, thread indicies, group information, etc. Some
of that info duplicates what is available in BenchmarkParams
.
Modifier and Type | Field and Description |
---|---|
protected int |
groupCount |
protected int |
groupIdx |
protected int |
groupThreadCount |
protected int |
groupThreadIdx |
protected int |
subgroupCount |
protected int |
subgroupIdx |
protected int |
subgroupThreadCount |
protected int |
subgroupThreadIdx |
protected int |
threadCount |
protected int |
threadIdx |
Constructor and Description |
---|
ThreadParams(int threadIdx,
int threadCount,
int groupIdx,
int groupCount,
int subgroupIdx,
int subgroupCount,
int groupThreadIdx,
int groupThreadCount,
int subgroupThreadIdx,
int subgroupThreadCount) |
Modifier and Type | Method and Description |
---|---|
int |
getGroupCount()
Answers the number of groups in the run.
|
int |
getGroupIndex()
Answers the thread group index.
|
int |
getGroupThreadCount()
Answers the number of threads in the current group.
|
int |
getGroupThreadIndex()
Answers the thread sub-index in current group.
|
int |
getSubgroupCount()
Answers the number of distinct workloads (subgroups) in the current group.
|
int |
getSubgroupIndex()
Answers the subgroup index.
|
int |
getSubgroupThreadCount()
Answers the number of threads in the current subgroup.
|
int |
getSubgroupThreadIndex()
Answers the thread sub-index in current subgroup.
|
int |
getThreadCount()
Answers the number of threads participating in the run.
|
int |
getThreadIndex()
Answers the thread index.
|
protected final int threadIdx
protected final int threadCount
protected final int groupIdx
protected final int groupCount
protected final int subgroupIdx
protected final int subgroupCount
protected final int groupThreadIdx
protected final int groupThreadCount
protected final int subgroupThreadIdx
protected final int subgroupThreadCount
public ThreadParams(int threadIdx, int threadCount, int groupIdx, int groupCount, int subgroupIdx, int subgroupCount, int groupThreadIdx, int groupThreadCount, int subgroupThreadIdx, int subgroupThreadCount)
public int getGroupCount()
When running the symmetric benchmark, each thread occupies its own group, and therefore number of groups equals the thread count.
This is a convenience method, similar info can be figured out by dividing
the number of threads (getThreadCount()
) by the number of threads per
group (getGroupThreadCount()
).
getThreadCount()
public int getGroupIndex()
Group indices are having the range of [0..G-1], where G is the number of thread groups in the run. When running the symmetric benchmark, each thread occupies its own group, and therefore the group index equals to the thread index.
getGroupCount()
public int getSubgroupCount()
When running the symmetric benchmark, each thread occupies its own group, and therefore number of subgroups equals to one.
getThreadCount()
public int getSubgroupIndex()
Subgroup index enumerates the distinct workloads (subgroups) in current group. The index the range of [0..S-1], where S is the number of subgroups in current group. When running the symmetric benchmark, there is only a single workload in the group, and therefore the subgroup index is zero.
getSubgroupCount()
public int getThreadCount()
This is a convenience method, similar info can be queried directly from
BenchmarkParamsL2.getThreads()
public int getThreadIndex()
Thread indices are in range [0..N-1], where N is the number of threads participating in the run.
getThreadCount()
public int getGroupThreadCount()
When running the symmetric benchmark, each thread occupies its own group, and therefore number of subgroups equals to one.
This is a convenience method, similar info can be figured out by summing
up the thread distribution from
BenchmarkParamsL2.getThreadGroups()
.
getThreadCount()
public int getGroupThreadIndex()
Subgroup index enumerates the thread within a group, and takes the range of [0..T-1], where T is the number of threads in current group. When running the symmetric benchmark, each thread occupies its own group, and therefore the subgroup index is zero.
getGroupThreadCount()
public int getSubgroupThreadCount()
When running the symmetric benchmark, each thread occupies its own group, each thread implicitly occupies a single subgroup, and therefore, the number of subgroups equals to one.
This is a convenience method, similar info can be figured out with
querying BenchmarkParamsL2.getThreadGroups()
with
getSubgroupIndex()
used as index.
getThreadCount()
public int getSubgroupThreadIndex()
Subgroup index enumerates the thread within a subgroup, and takes the range of [0..T-1], where T is the number of threads in current subgroup. When running the symmetric benchmark, each thread occupies its own group, and therefore the subgroup index is zero.
getSubgroupThreadCount()
Copyright © 2012–2020 Oracle. All rights reserved.