mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8293198: [vectorapi] Improve the implementation of VectorMask.indexInRange()
Reviewed-by: jbhateja, qamai, psandoz
This commit is contained in:
parent
b814cfc39d
commit
e245620f6f
41 changed files with 632 additions and 42 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -210,6 +210,23 @@ public class VectorSupport {
|
|||
return defaultImpl.fromBits(bits, s);
|
||||
}
|
||||
|
||||
/* ============================================================================ */
|
||||
public interface IndexPartiallyInUpperRangeOperation<E,
|
||||
M extends VectorMask<E>> {
|
||||
M apply(long offset, long limit);
|
||||
}
|
||||
|
||||
@IntrinsicCandidate
|
||||
public static
|
||||
<E,
|
||||
M extends VectorMask<E>>
|
||||
M indexPartiallyInUpperRange(Class<? extends M> mClass, Class<E> eClass,
|
||||
int length, long offset, long limit,
|
||||
IndexPartiallyInUpperRangeOperation<E, M> defaultImpl) {
|
||||
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
|
||||
return defaultImpl.apply(offset, limit);
|
||||
}
|
||||
|
||||
/* ============================================================================ */
|
||||
public interface ShuffleIotaOperation<S extends VectorSpecies<?>,
|
||||
SH extends VectorShuffle<?>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue