mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-03 15:08:24 +00:00
Adding new lane type constants for intrinsic entries, removing basictype extension changes
This commit is contained in:
parent
ce5768fa0b
commit
68145fd91d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2025, 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
|
||||
@ -96,7 +96,7 @@ void AOTArtifactFinder::find_artifacts() {
|
||||
if (CDSConfig::is_dumping_heap()) {
|
||||
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
|
||||
BasicType bt = (BasicType)i;
|
||||
if (!is_reference_type(bt) && !is_custom_basic_type(bt)) {
|
||||
if (!is_reference_type(bt)) {
|
||||
oop orig_mirror = Universe::java_mirror(bt);
|
||||
oop scratch_mirror = HeapShared::scratch_java_mirror(bt);
|
||||
HeapShared::scan_java_mirror(orig_mirror);
|
||||
|
||||
@ -629,7 +629,7 @@ objArrayOop HeapShared::scratch_resolved_references(ConstantPool* src) {
|
||||
void HeapShared::init_scratch_objects_for_basic_type_mirrors(TRAPS) {
|
||||
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
|
||||
BasicType bt = (BasicType)i;
|
||||
if (!is_reference_type(bt) && !is_custom_basic_type(bt)) {
|
||||
if (!is_reference_type(bt)) {
|
||||
oop m = java_lang_Class::create_basic_type_mirror(type2name(bt), bt, CHECK);
|
||||
_scratch_basic_type_mirrors[i] = OopHandle(Universe::vm_global(), m);
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2025, 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
|
||||
@ -561,7 +561,7 @@ void Universe::initialize_basic_type_mirrors(TRAPS) {
|
||||
_basic_type_mirrors[T_INT].resolve() != nullptr) {
|
||||
// check that all basic type mirrors are mapped also
|
||||
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
|
||||
if (!is_reference_type((BasicType)i) && !is_custom_basic_type((BasicType)i)) {
|
||||
if (!is_reference_type((BasicType)i)) {
|
||||
oop m = _basic_type_mirrors[i].resolve();
|
||||
assert(m != nullptr, "archived mirrors should not be null");
|
||||
}
|
||||
@ -572,7 +572,7 @@ void Universe::initialize_basic_type_mirrors(TRAPS) {
|
||||
{
|
||||
for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
|
||||
BasicType bt = (BasicType)i;
|
||||
if (!is_reference_type(bt) && !is_custom_basic_type(bt)) {
|
||||
if (!is_reference_type(bt)) {
|
||||
oop m = java_lang_Class::create_basic_type_mirror(type2name(bt), bt, CHECK);
|
||||
_basic_type_mirrors[i] = OopHandle(vm_global(), m);
|
||||
}
|
||||
|
||||
@ -298,15 +298,16 @@ static bool is_klass_initialized(const TypeInstPtr* vec_klass) {
|
||||
}
|
||||
|
||||
static bool is_primitive_lane_type(int laneType) {
|
||||
return laneType >= T_FLOAT && laneType <= T_FLOAT16;
|
||||
return laneType >= VectorSupport::LT_FLOAT && laneType <= VectorSupport::LT_FLOAT16;
|
||||
}
|
||||
|
||||
static bool is_unsupported_lane_type(int laneType) {
|
||||
return laneType == T_FLOAT16;
|
||||
return laneType == VectorSupport::LT_FLOAT16;
|
||||
}
|
||||
|
||||
static BasicType get_vector_primitive_lane_type(int lane_type) {
|
||||
if (lane_type == T_FLOAT16) {
|
||||
assert(is_primitive_lane_type(lane_type), "");
|
||||
if (lane_type == VectorSupport::LT_FLOAT16) {
|
||||
return T_SHORT;
|
||||
}
|
||||
return static_cast<BasicType>(lane_type);
|
||||
@ -396,8 +397,8 @@ bool LibraryCallKit::inline_vector_nary_operation(int n) {
|
||||
bool is_unsigned = VectorSupport::is_unsigned_op(opr->get_con());
|
||||
|
||||
int num_elem = vlen->get_con();
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), (BasicType)laneType->get_con());
|
||||
BasicType elem_bt = get_vector_primitive_lane_type(laneType->get_con());
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), laneType->get_con());
|
||||
|
||||
int sopc = has_scalar_op ? VectorNode::opcode(opc, elem_bt) : opc;
|
||||
if (sopc == 0 || num_elem == 1) {
|
||||
@ -657,7 +658,7 @@ bool LibraryCallKit::inline_vector_mask_operation() {
|
||||
|
||||
int num_elem = vlen->get_con();
|
||||
BasicType elem_bt = get_vector_primitive_lane_type(laneType->get_con());
|
||||
int mopc = VectorSupport::vop2ideal(oper->get_con(), elem_bt);
|
||||
int mopc = VectorSupport::vop2ideal(oper->get_con(), laneType->get_con());
|
||||
if (!arch_supports_vector(mopc, num_elem, elem_bt, VecMaskUseLoad)) {
|
||||
log_if_needed(" ** not supported: arity=1 op=cast#%d/3 vlen2=%d etype2=%s",
|
||||
mopc, num_elem, type2name(elem_bt));
|
||||
@ -1514,7 +1515,7 @@ bool LibraryCallKit::inline_vector_reduction() {
|
||||
}
|
||||
|
||||
int num_elem = vlen->get_con();
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), elem_bt);
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), laneType->get_con());
|
||||
int sopc = ReductionNode::opcode(opc, elem_bt);
|
||||
|
||||
// Ensure reduction operation for lanewise operation
|
||||
@ -2246,7 +2247,7 @@ bool LibraryCallKit::inline_vector_broadcast_int() {
|
||||
|
||||
int num_elem = vlen->get_con();
|
||||
BasicType elem_bt = get_vector_primitive_lane_type(laneType->get_con());
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), elem_bt);
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), laneType->get_con());
|
||||
|
||||
bool is_shift = VectorNode::is_shift_opcode(opc);
|
||||
bool is_rotate = VectorNode::is_rotate_opcode(opc);
|
||||
@ -3019,7 +3020,7 @@ bool LibraryCallKit::inline_vector_compress_expand() {
|
||||
|
||||
int num_elem = vlen->get_con();
|
||||
BasicType elem_bt = get_vector_primitive_lane_type(laneType->get_con());
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), elem_bt);
|
||||
int opc = VectorSupport::vop2ideal(opr->get_con(), laneType->get_con());
|
||||
|
||||
if (!arch_supports_vector(opc, num_elem, elem_bt, VecMaskUseLoad)) {
|
||||
log_if_needed(" ** not supported: opc=%d vlen=%d etype=%s ismask=useload",
|
||||
@ -3110,7 +3111,7 @@ bool LibraryCallKit::inline_index_vector() {
|
||||
return false; // not supported
|
||||
}
|
||||
|
||||
int mul_op = VectorSupport::vop2ideal(VectorSupport::VECTOR_OP_MUL, elem_bt);
|
||||
int mul_op = VectorSupport::vop2ideal(VectorSupport::VECTOR_OP_MUL, laneType->get_con());
|
||||
int vmul_op = VectorNode::opcode(mul_op, elem_bt);
|
||||
bool needs_mul = true;
|
||||
Node* scale = argument(4);
|
||||
@ -3146,7 +3147,7 @@ bool LibraryCallKit::inline_index_vector() {
|
||||
return false;
|
||||
}
|
||||
|
||||
int add_op = VectorSupport::vop2ideal(VectorSupport::VECTOR_OP_ADD, elem_bt);
|
||||
int add_op = VectorSupport::vop2ideal(VectorSupport::VECTOR_OP_ADD, laneType->get_con());
|
||||
int vadd_op = VectorNode::opcode(add_op, elem_bt);
|
||||
bool needs_add = true;
|
||||
// The addition is not needed if all the element values of "opd" are zero
|
||||
|
||||
@ -200,415 +200,427 @@ bool VectorSupport::is_unsigned_op(jint id) {
|
||||
}
|
||||
|
||||
const char* VectorSupport::lanetype2name(int lane_type) {
|
||||
return type2name(static_cast<BasicType>(lane_type));
|
||||
assert(lane_type >= LT_FLOAT && lane_type <= LT_FLOAT16, "");
|
||||
const char* lanetype2name[] = {
|
||||
nullptr, nullptr, nullptr,
|
||||
nullptr, nullptr, nullptr,
|
||||
"float",
|
||||
"double",
|
||||
"byte",
|
||||
"short",
|
||||
"int",
|
||||
"long",
|
||||
"float16",
|
||||
};
|
||||
return lanetype2name[lane_type];
|
||||
}
|
||||
|
||||
int VectorSupport::vop2ideal(jint id, BasicType bt) {
|
||||
int VectorSupport::vop2ideal(jint id, int lt) {
|
||||
VectorOperation vop = (VectorOperation)id;
|
||||
switch (vop) {
|
||||
case VECTOR_OP_ADD: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_AddI;
|
||||
case T_LONG: return Op_AddL;
|
||||
case T_FLOAT16: return Op_AddHF;
|
||||
case T_FLOAT: return Op_AddF;
|
||||
case T_DOUBLE: return Op_AddD;
|
||||
default: fatal("ADD: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_AddI;
|
||||
case LT_LONG: return Op_AddL;
|
||||
case LT_FLOAT16: return Op_AddHF;
|
||||
case LT_FLOAT: return Op_AddF;
|
||||
case LT_DOUBLE: return Op_AddD;
|
||||
default: fatal("ADD: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_SUB: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_SubI;
|
||||
case T_LONG: return Op_SubL;
|
||||
case T_FLOAT16: return Op_SubHF;
|
||||
case T_FLOAT: return Op_SubF;
|
||||
case T_DOUBLE: return Op_SubD;
|
||||
default: fatal("SUB: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_SubI;
|
||||
case LT_LONG: return Op_SubL;
|
||||
case LT_FLOAT16: return Op_SubHF;
|
||||
case LT_FLOAT: return Op_SubF;
|
||||
case LT_DOUBLE: return Op_SubD;
|
||||
default: fatal("SUB: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MUL: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_MulI;
|
||||
case T_LONG: return Op_MulL;
|
||||
case T_FLOAT16: return Op_MulHF;
|
||||
case T_FLOAT: return Op_MulF;
|
||||
case T_DOUBLE: return Op_MulD;
|
||||
default: fatal("MUL: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_MulI;
|
||||
case LT_LONG: return Op_MulL;
|
||||
case LT_FLOAT16: return Op_MulHF;
|
||||
case LT_FLOAT: return Op_MulF;
|
||||
case LT_DOUBLE: return Op_MulD;
|
||||
default: fatal("MUL: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_DIV: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_DivI;
|
||||
case T_LONG: return Op_DivL;
|
||||
case T_FLOAT16: return Op_DivHF;
|
||||
case T_FLOAT: return Op_DivF;
|
||||
case T_DOUBLE: return Op_DivD;
|
||||
default: fatal("DIV: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_DivI;
|
||||
case LT_LONG: return Op_DivL;
|
||||
case LT_FLOAT16: return Op_DivHF;
|
||||
case LT_FLOAT: return Op_DivF;
|
||||
case LT_DOUBLE: return Op_DivD;
|
||||
default: fatal("DIV: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MIN: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_MinI;
|
||||
case T_LONG: return Op_MinL;
|
||||
case T_FLOAT16: return Op_MinHF;
|
||||
case T_FLOAT: return Op_MinF;
|
||||
case T_DOUBLE: return Op_MinD;
|
||||
default: fatal("MIN: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_MinI;
|
||||
case LT_LONG: return Op_MinL;
|
||||
case LT_FLOAT16: return Op_MinHF;
|
||||
case LT_FLOAT: return Op_MinF;
|
||||
case LT_DOUBLE: return Op_MinD;
|
||||
default: fatal("MIN: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MAX: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_MaxI;
|
||||
case T_LONG: return Op_MaxL;
|
||||
case T_FLOAT16: return Op_MaxHF;
|
||||
case T_FLOAT: return Op_MaxF;
|
||||
case T_DOUBLE: return Op_MaxD;
|
||||
default: fatal("MAX: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_MaxI;
|
||||
case LT_LONG: return Op_MaxL;
|
||||
case LT_FLOAT16: return Op_MaxHF;
|
||||
case LT_FLOAT: return Op_MaxF;
|
||||
case LT_DOUBLE: return Op_MaxD;
|
||||
default: fatal("MAX: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_UMIN: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_UMinV;
|
||||
default: fatal("MIN: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_UMinV;
|
||||
default: fatal("MIN: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_UMAX: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_UMaxV;
|
||||
default: fatal("MAX: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_UMaxV;
|
||||
default: fatal("MAX: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_ABS: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_AbsI;
|
||||
case T_LONG: return Op_AbsL;
|
||||
case T_FLOAT16: return 0;
|
||||
case T_FLOAT: return Op_AbsF;
|
||||
case T_DOUBLE: return Op_AbsD;
|
||||
default: fatal("ABS: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_AbsI;
|
||||
case LT_LONG: return Op_AbsL;
|
||||
case LT_FLOAT16: return 0;
|
||||
case LT_FLOAT: return Op_AbsF;
|
||||
case LT_DOUBLE: return Op_AbsD;
|
||||
default: fatal("ABS: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_NEG: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_NegI;
|
||||
case T_LONG: return Op_NegL;
|
||||
case T_FLOAT16: return 0;
|
||||
case T_FLOAT: return Op_NegF;
|
||||
case T_DOUBLE: return Op_NegD;
|
||||
default: fatal("NEG: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_NegI;
|
||||
case LT_LONG: return Op_NegL;
|
||||
case LT_FLOAT16: return 0;
|
||||
case LT_FLOAT: return Op_NegF;
|
||||
case LT_DOUBLE: return Op_NegD;
|
||||
default: fatal("NEG: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_AND: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_AndI;
|
||||
case T_LONG: return Op_AndL;
|
||||
default: fatal("AND: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_AndI;
|
||||
case LT_LONG: return Op_AndL;
|
||||
default: fatal("AND: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_OR: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_OrI;
|
||||
case T_LONG: return Op_OrL;
|
||||
default: fatal("OR: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_OrI;
|
||||
case LT_LONG: return Op_OrL;
|
||||
default: fatal("OR: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_XOR: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_XorI;
|
||||
case T_LONG: return Op_XorL;
|
||||
default: fatal("XOR: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_XorI;
|
||||
case LT_LONG: return Op_XorL;
|
||||
default: fatal("XOR: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_SQRT: {
|
||||
switch (bt) {
|
||||
case T_FLOAT16: return Op_SqrtHF;
|
||||
case T_FLOAT: return Op_SqrtF;
|
||||
case T_DOUBLE: return Op_SqrtD;
|
||||
default: fatal("SQRT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_FLOAT16: return Op_SqrtHF;
|
||||
case LT_FLOAT: return Op_SqrtF;
|
||||
case LT_DOUBLE: return Op_SqrtD;
|
||||
default: fatal("SQRT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_FMA: {
|
||||
switch (bt) {
|
||||
case T_FLOAT16: return Op_FmaHF;
|
||||
case T_FLOAT: return Op_FmaF;
|
||||
case T_DOUBLE: return Op_FmaD;
|
||||
default: fatal("FMA: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_FLOAT16: return Op_FmaHF;
|
||||
case LT_FLOAT: return Op_FmaF;
|
||||
case LT_DOUBLE: return Op_FmaD;
|
||||
default: fatal("FMA: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_LSHIFT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_LShiftI;
|
||||
case T_LONG: return Op_LShiftL;
|
||||
default: fatal("LSHIFT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_LShiftI;
|
||||
case LT_LONG: return Op_LShiftL;
|
||||
default: fatal("LSHIFT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_RSHIFT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_RShiftI;
|
||||
case T_LONG: return Op_RShiftL;
|
||||
default: fatal("RSHIFT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_RShiftI;
|
||||
case LT_LONG: return Op_RShiftL;
|
||||
default: fatal("RSHIFT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_URSHIFT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: return Op_URShiftB;
|
||||
case T_SHORT: return Op_URShiftS;
|
||||
case T_INT: return Op_URShiftI;
|
||||
case T_LONG: return Op_URShiftL;
|
||||
default: fatal("URSHIFT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: return Op_URShiftB;
|
||||
case LT_SHORT: return Op_URShiftS;
|
||||
case LT_INT: return Op_URShiftI;
|
||||
case LT_LONG: return Op_URShiftL;
|
||||
default: fatal("URSHIFT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_LROTATE: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_RotateLeft;
|
||||
default: fatal("LROTATE: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_RotateLeft;
|
||||
default: fatal("LROTATE: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_RROTATE: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_RotateRight;
|
||||
default: fatal("RROTATE: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_RotateRight;
|
||||
default: fatal("RROTATE: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MASK_LASTTRUE: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_VectorMaskLastTrue;
|
||||
default: fatal("MASK_LASTTRUE: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_VectorMaskLastTrue;
|
||||
default: fatal("MASK_LASTTRUE: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MASK_FIRSTTRUE: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_VectorMaskFirstTrue;
|
||||
default: fatal("MASK_FIRSTTRUE: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_VectorMaskFirstTrue;
|
||||
default: fatal("MASK_FIRSTTRUE: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MASK_TRUECOUNT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_VectorMaskTrueCount;
|
||||
default: fatal("MASK_TRUECOUNT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_VectorMaskTrueCount;
|
||||
default: fatal("MASK_TRUECOUNT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MASK_TOLONG: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_VectorMaskToLong;
|
||||
default: fatal("MASK_TOLONG: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_VectorMaskToLong;
|
||||
default: fatal("MASK_TOLONG: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_EXPAND: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_ExpandV;
|
||||
default: fatal("EXPAND: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_ExpandV;
|
||||
default: fatal("EXPAND: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_COMPRESS: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_CompressV;
|
||||
default: fatal("COMPRESS: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_CompressV;
|
||||
default: fatal("COMPRESS: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_MASK_COMPRESS: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: // fall-through
|
||||
case T_FLOAT16: // fall-through
|
||||
case T_FLOAT: // fall-through
|
||||
case T_DOUBLE: return Op_CompressM;
|
||||
default: fatal("MASK_COMPRESS: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: // fall-through
|
||||
case LT_FLOAT16: // fall-through
|
||||
case LT_FLOAT: // fall-through
|
||||
case LT_DOUBLE: return Op_CompressM;
|
||||
default: fatal("MASK_COMPRESS: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_BIT_COUNT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // Returning Op_PopCountI
|
||||
case T_SHORT: // for byte and short types temporarily
|
||||
case T_INT: return Op_PopCountI;
|
||||
case T_LONG: return Op_PopCountL;
|
||||
default: fatal("BIT_COUNT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // Returning Op_PopCountI
|
||||
case LT_SHORT: // for byte and short types temporarily
|
||||
case LT_INT: return Op_PopCountI;
|
||||
case LT_LONG: return Op_PopCountL;
|
||||
default: fatal("BILT_COUNT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_TZ_COUNT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_CountTrailingZerosI;
|
||||
case T_LONG: return Op_CountTrailingZerosL;
|
||||
default: fatal("TZ_COUNT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_CountTrailingZerosI;
|
||||
case LT_LONG: return Op_CountTrailingZerosL;
|
||||
default: fatal("TZ_COUNT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_LZ_COUNT: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: return Op_CountLeadingZerosI;
|
||||
case T_LONG: return Op_CountLeadingZerosL;
|
||||
default: fatal("LZ_COUNT: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: return Op_CountLeadingZerosI;
|
||||
case LT_LONG: return Op_CountLeadingZerosL;
|
||||
default: fatal("LZ_COUNT: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_REVERSE: {
|
||||
switch (bt) {
|
||||
case T_BYTE: // Temporarily returning
|
||||
case T_SHORT: // Op_ReverseI for byte and short
|
||||
case T_INT: return Op_ReverseI;
|
||||
case T_LONG: return Op_ReverseL;
|
||||
default: fatal("REVERSE: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_BYTE: // Temporarily returning
|
||||
case LT_SHORT: // Op_ReverseI for byte and short
|
||||
case LT_INT: return Op_ReverseI;
|
||||
case LT_LONG: return Op_ReverseL;
|
||||
default: fatal("REVERSE: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_REVERSE_BYTES: {
|
||||
switch (bt) {
|
||||
case T_SHORT: return Op_ReverseBytesS;
|
||||
switch (lt) {
|
||||
case LT_SHORT: return Op_ReverseBytesS;
|
||||
// Superword requires type consistency between the ReverseBytes*
|
||||
// node and the data. But there's no ReverseBytesB node because
|
||||
// no reverseBytes() method in Java Byte class. T_BYTE can only
|
||||
// no reverseBytes() method in Java Byte class. LT_BYTE can only
|
||||
// appear in VectorAPI calls. We reuse Op_ReverseBytesI for this
|
||||
// to ensure vector intrinsification succeeds.
|
||||
case T_BYTE: // Intentionally fall-through
|
||||
case T_INT: return Op_ReverseBytesI;
|
||||
case T_LONG: return Op_ReverseBytesL;
|
||||
default: fatal("REVERSE_BYTES: %s", type2name(bt));
|
||||
case LT_BYTE: // Intentionally fall-through
|
||||
case LT_INT: return Op_ReverseBytesI;
|
||||
case LT_LONG: return Op_ReverseBytesL;
|
||||
default: fatal("REVERSE_BYTES: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_SADD:
|
||||
case VECTOR_OP_SUADD: {
|
||||
switch(bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_SaturatingAddV;
|
||||
default: fatal("S[U]ADD: %s", type2name(bt));
|
||||
switch(lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_SaturatingAddV;
|
||||
default: fatal("S[U]ADD: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_SSUB:
|
||||
case VECTOR_OP_SUSUB: {
|
||||
switch(bt) {
|
||||
case T_BYTE: // fall-through
|
||||
case T_SHORT: // fall-through
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_SaturatingSubV;
|
||||
default: fatal("S[U}SUB: %s", type2name(bt));
|
||||
switch(lt) {
|
||||
case LT_BYTE: // fall-through
|
||||
case LT_SHORT: // fall-through
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_SaturatingSubV;
|
||||
default: fatal("S[U}SUB: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_COMPRESS_BITS: {
|
||||
switch (bt) {
|
||||
case T_INT: // fall-thorugh
|
||||
case T_LONG: return Op_CompressBits;
|
||||
default: fatal("COMPRESS_BITS: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_INT: // fall-thorugh
|
||||
case LT_LONG: return Op_CompressBits;
|
||||
default: fatal("COMPRESS_BITS: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VECTOR_OP_EXPAND_BITS: {
|
||||
switch (bt) {
|
||||
case T_INT: // fall-through
|
||||
case T_LONG: return Op_ExpandBits;
|
||||
default: fatal("EXPAND_BITS: %s", type2name(bt));
|
||||
switch (lt) {
|
||||
case LT_INT: // fall-through
|
||||
case LT_LONG: return Op_ExpandBits;
|
||||
default: fatal("EXPAND_BITS: %s", lanetype2name(lt));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -137,12 +137,22 @@ class VectorSupport : AllStatic {
|
||||
NUM_VEC_SIZES = 5
|
||||
};
|
||||
|
||||
enum {
|
||||
LT_FLOAT = 6,
|
||||
LT_DOUBLE = 7,
|
||||
LT_BYTE = 8,
|
||||
LT_SHORT = 9,
|
||||
LT_INT = 10,
|
||||
LT_LONG = 11,
|
||||
LT_FLOAT16 = 12
|
||||
};
|
||||
|
||||
enum {
|
||||
MODE_BROADCAST = 0,
|
||||
MODE_BITS_COERCED_LONG_TO_MASK = 1
|
||||
};
|
||||
|
||||
static int vop2ideal(jint vop, BasicType bt);
|
||||
static int vop2ideal(jint vop, int lt);
|
||||
static const char* lanetype2name(int lane_type);
|
||||
static bool has_scalar_op(jint id);
|
||||
static bool is_unsigned_op(jint id);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2025, 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
|
||||
@ -1626,7 +1626,6 @@
|
||||
declare_constant(T_SHORT) \
|
||||
declare_constant(T_INT) \
|
||||
declare_constant(T_LONG) \
|
||||
declare_constant(T_FLOAT16) \
|
||||
declare_constant(T_OBJECT) \
|
||||
declare_constant(T_ARRAY) \
|
||||
declare_constant(T_VOID) \
|
||||
@ -1649,7 +1648,6 @@
|
||||
declare_constant(T_SHORT_size) \
|
||||
declare_constant(T_INT_size) \
|
||||
declare_constant(T_LONG_size) \
|
||||
declare_constant(T_FLOAT16_size) \
|
||||
declare_constant(T_OBJECT_size) \
|
||||
declare_constant(T_ARRAY_size) \
|
||||
declare_constant(T_NARROWOOP_size) \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2025, 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
|
||||
@ -133,7 +133,6 @@ void basic_types_init() {
|
||||
case T_DOUBLE:
|
||||
case T_LONG:
|
||||
case T_OBJECT:
|
||||
case T_FLOAT16: // IEEE 754 binary16 type
|
||||
case T_ADDRESS: // random raw pointer
|
||||
case T_METADATA: // metadata pointer
|
||||
case T_NARROWOOP: // compressed pointer
|
||||
@ -208,7 +207,6 @@ char type2char_tab[T_CONFLICT+1] = {
|
||||
JVM_SIGNATURE_FLOAT, JVM_SIGNATURE_DOUBLE,
|
||||
JVM_SIGNATURE_BYTE, JVM_SIGNATURE_SHORT,
|
||||
JVM_SIGNATURE_INT, JVM_SIGNATURE_LONG,
|
||||
0,
|
||||
JVM_SIGNATURE_CLASS, JVM_SIGNATURE_ARRAY,
|
||||
JVM_SIGNATURE_VOID, 0,
|
||||
0, 0, 0, 0
|
||||
@ -225,7 +223,6 @@ const char* type2name_tab[T_CONFLICT+1] = {
|
||||
"short",
|
||||
"int",
|
||||
"long",
|
||||
"float16",
|
||||
"object",
|
||||
"array",
|
||||
"void",
|
||||
@ -258,7 +255,7 @@ BasicType name2type(const char* name) {
|
||||
}
|
||||
|
||||
// Map BasicType to size in words
|
||||
int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 0, 1, 1, 1, 1, -1};
|
||||
int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, -1};
|
||||
|
||||
BasicType type2field[T_CONFLICT+1] = {
|
||||
(BasicType)0, // 0,
|
||||
@ -273,15 +270,14 @@ BasicType type2field[T_CONFLICT+1] = {
|
||||
T_SHORT, // T_SHORT = 9,
|
||||
T_INT, // T_INT = 10,
|
||||
T_LONG, // T_LONG = 11,
|
||||
T_FLOAT16, // T_FLOAT16 = 12,
|
||||
T_OBJECT, // T_OBJECT = 13,
|
||||
T_OBJECT, // T_ARRAY = 14,
|
||||
T_VOID, // T_VOID = 15,
|
||||
T_ADDRESS, // T_ADDRESS = 16,
|
||||
T_NARROWOOP, // T_NARROWOOP= 17,
|
||||
T_METADATA, // T_METADATA = 18,
|
||||
T_NARROWKLASS, // T_NARROWKLASS = 19,
|
||||
T_CONFLICT // T_CONFLICT = 20,
|
||||
T_OBJECT, // T_OBJECT = 12,
|
||||
T_OBJECT, // T_ARRAY = 13,
|
||||
T_VOID, // T_VOID = 14,
|
||||
T_ADDRESS, // T_ADDRESS = 15,
|
||||
T_NARROWOOP, // T_NARROWOOP= 16,
|
||||
T_METADATA, // T_METADATA = 17,
|
||||
T_NARROWKLASS, // T_NARROWKLASS = 18,
|
||||
T_CONFLICT // T_CONFLICT = 19,
|
||||
};
|
||||
|
||||
|
||||
@ -298,15 +294,14 @@ BasicType type2wfield[T_CONFLICT+1] = {
|
||||
T_INT, // T_SHORT = 9,
|
||||
T_INT, // T_INT = 10,
|
||||
T_LONG, // T_LONG = 11,
|
||||
T_FLOAT16, // T_LONG = 12,
|
||||
T_OBJECT, // T_OBJECT = 13,
|
||||
T_OBJECT, // T_ARRAY = 14,
|
||||
T_VOID, // T_VOID = 15,
|
||||
T_ADDRESS, // T_ADDRESS = 16,
|
||||
T_NARROWOOP, // T_NARROWOOP = 17,
|
||||
T_METADATA, // T_METADATA = 18,
|
||||
T_NARROWKLASS, // T_NARROWKLASS = 19,
|
||||
T_CONFLICT // T_CONFLICT = 20,
|
||||
T_OBJECT, // T_OBJECT = 12,
|
||||
T_OBJECT, // T_ARRAY = 13,
|
||||
T_VOID, // T_VOID = 14,
|
||||
T_ADDRESS, // T_ADDRESS = 15,
|
||||
T_NARROWOOP, // T_NARROWOOP = 16,
|
||||
T_METADATA, // T_METADATA = 17,
|
||||
T_NARROWKLASS, // T_NARROWKLASS = 18,
|
||||
T_CONFLICT // T_CONFLICT = 19,
|
||||
};
|
||||
|
||||
|
||||
@ -323,15 +318,14 @@ int _type2aelembytes[T_CONFLICT+1] = {
|
||||
T_SHORT_aelem_bytes, // T_SHORT = 9,
|
||||
T_INT_aelem_bytes, // T_INT = 10,
|
||||
T_LONG_aelem_bytes, // T_LONG = 11,
|
||||
T_FLOAT16_aelem_bytes, // T_LONG = 12,
|
||||
T_OBJECT_aelem_bytes, // T_OBJECT = 13,
|
||||
T_ARRAY_aelem_bytes, // T_ARRAY = 14,
|
||||
0, // T_VOID = 15,
|
||||
T_OBJECT_aelem_bytes, // T_ADDRESS = 16,
|
||||
T_NARROWOOP_aelem_bytes, // T_NARROWOOP= 17,
|
||||
T_OBJECT_aelem_bytes, // T_METADATA = 18,
|
||||
T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 19,
|
||||
0 // T_CONFLICT = 20,
|
||||
T_OBJECT_aelem_bytes, // T_OBJECT = 12,
|
||||
T_ARRAY_aelem_bytes, // T_ARRAY = 13,
|
||||
0, // T_VOID = 14,
|
||||
T_OBJECT_aelem_bytes, // T_ADDRESS = 15,
|
||||
T_NARROWOOP_aelem_bytes, // T_NARROWOOP= 16,
|
||||
T_OBJECT_aelem_bytes, // T_METADATA = 17,
|
||||
T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 18,
|
||||
0 // T_CONFLICT = 19,
|
||||
};
|
||||
|
||||
#ifdef ASSERT
|
||||
|
||||
@ -685,15 +685,14 @@ enum BasicType : u1 {
|
||||
// T_ADDRESS, T_METADATA, T_NARROWOOP, T_NARROWKLASS describe
|
||||
// internal references within the JVM as if they were Java
|
||||
// types in their own right.
|
||||
T_FLOAT16 = 12,
|
||||
T_OBJECT = 13,
|
||||
T_ARRAY = 14,
|
||||
T_VOID = 15,
|
||||
T_ADDRESS = 16,
|
||||
T_NARROWOOP = 17,
|
||||
T_METADATA = 18,
|
||||
T_NARROWKLASS = 19,
|
||||
T_CONFLICT = 20, // for stack value type with conflicting contents
|
||||
T_OBJECT = 12,
|
||||
T_ARRAY = 13,
|
||||
T_VOID = 14,
|
||||
T_ADDRESS = 15,
|
||||
T_NARROWOOP = 16,
|
||||
T_METADATA = 17,
|
||||
T_NARROWKLASS = 18,
|
||||
T_CONFLICT = 19, // for stack value type with conflicting contents
|
||||
T_ILLEGAL = 99
|
||||
};
|
||||
|
||||
@ -716,7 +715,7 @@ inline bool is_java_type(BasicType t) {
|
||||
}
|
||||
|
||||
inline bool is_java_primitive(BasicType t) {
|
||||
return (T_BOOLEAN <= t && t <= T_LONG);
|
||||
return T_BOOLEAN <= t && t <= T_LONG;
|
||||
}
|
||||
|
||||
inline bool is_subword_type(BasicType t) {
|
||||
@ -736,24 +735,20 @@ inline bool is_double_word_type(BasicType t) {
|
||||
return (t == T_DOUBLE || t == T_LONG);
|
||||
}
|
||||
|
||||
inline bool is_custom_basic_type(BasicType t) {
|
||||
return (t == T_FLOAT16);
|
||||
}
|
||||
|
||||
inline bool is_reference_type(BasicType t, bool include_narrow_oop = false) {
|
||||
return (t == T_OBJECT || t == T_ARRAY || (include_narrow_oop && t == T_NARROWOOP));
|
||||
}
|
||||
|
||||
inline bool is_integral_type(BasicType t) {
|
||||
return (is_subword_type(t) || t == T_INT || t == T_LONG);
|
||||
return is_subword_type(t) || t == T_INT || t == T_LONG;
|
||||
}
|
||||
|
||||
inline bool is_non_subword_integral_type(BasicType t) {
|
||||
return (t == T_INT || t == T_LONG);
|
||||
return t == T_INT || t == T_LONG;
|
||||
}
|
||||
|
||||
inline bool is_floating_point_type(BasicType t) {
|
||||
return (t == T_FLOAT || t == T_DOUBLE || t == T_FLOAT16);
|
||||
return (t == T_FLOAT || t == T_DOUBLE);
|
||||
}
|
||||
|
||||
extern char type2char_tab[T_CONFLICT+1]; // Map a BasicType to a jchar
|
||||
@ -811,7 +806,6 @@ enum BasicTypeSize {
|
||||
T_SHORT_size = 1,
|
||||
T_INT_size = 1,
|
||||
T_LONG_size = 2,
|
||||
T_FLOAT16_size = 1,
|
||||
T_OBJECT_size = 1,
|
||||
T_ARRAY_size = 1,
|
||||
T_NARROWOOP_size = 1,
|
||||
@ -843,7 +837,6 @@ enum ArrayElementSize {
|
||||
T_SHORT_aelem_bytes = 2,
|
||||
T_INT_aelem_bytes = 4,
|
||||
T_LONG_aelem_bytes = 8,
|
||||
T_FLOAT16_aelem_bytes = 2,
|
||||
#ifdef _LP64
|
||||
T_OBJECT_aelem_bytes = 8,
|
||||
T_ARRAY_aelem_bytes = 8,
|
||||
|
||||
@ -151,13 +151,13 @@ public class VectorSupport {
|
||||
|
||||
// BasicType codes, for primitives only:
|
||||
public static final int
|
||||
T_FLOAT = 6,
|
||||
T_DOUBLE = 7,
|
||||
T_BYTE = 8,
|
||||
T_SHORT = 9,
|
||||
T_INT = 10,
|
||||
T_LONG = 11,
|
||||
T_FLOAT16 = 12;
|
||||
LT_FLOAT = 6,
|
||||
LT_DOUBLE = 7,
|
||||
LT_BYTE = 8,
|
||||
LT_SHORT = 9,
|
||||
LT_INT = 10,
|
||||
LT_LONG = 11,
|
||||
LT_FLOAT16 = 12;
|
||||
|
||||
/* ============================================================================ */
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2020, 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
|
||||
@ -39,7 +39,6 @@ public class BasicType {
|
||||
public static final BasicType T_SHORT = new BasicType();
|
||||
public static final BasicType T_INT = new BasicType();
|
||||
public static final BasicType T_LONG = new BasicType();
|
||||
public static final BasicType T_FLOAT16 = new BasicType();
|
||||
public static final BasicType T_OBJECT = new BasicType();
|
||||
public static final BasicType T_ARRAY = new BasicType();
|
||||
public static final BasicType T_VOID = new BasicType();
|
||||
@ -64,7 +63,6 @@ public class BasicType {
|
||||
T_SHORT.setType(db.lookupIntConstant("T_SHORT").intValue());
|
||||
T_INT.setType(db.lookupIntConstant("T_INT").intValue());
|
||||
T_LONG.setType(db.lookupIntConstant("T_LONG").intValue());
|
||||
T_FLOAT16.setType(db.lookupIntConstant("T_FLOAT16").intValue());
|
||||
T_OBJECT.setType(db.lookupIntConstant("T_OBJECT").intValue());
|
||||
T_ARRAY.setType(db.lookupIntConstant("T_ARRAY").intValue());
|
||||
T_VOID.setType(db.lookupIntConstant("T_VOID").intValue());
|
||||
@ -108,10 +106,6 @@ public class BasicType {
|
||||
return T_LONG.getType();
|
||||
}
|
||||
|
||||
public static int getTFloat16() {
|
||||
return T_FLOAT16.getType();
|
||||
}
|
||||
|
||||
public static int getTObject() {
|
||||
return T_OBJECT.getType();
|
||||
}
|
||||
@ -166,8 +160,6 @@ public class BasicType {
|
||||
return T_INT;
|
||||
} else if (i == T_LONG.getType()) {
|
||||
return T_LONG;
|
||||
} else if (i == T_FLOAT16.getType()) {
|
||||
return T_FLOAT16;
|
||||
} else if (i == T_OBJECT.getType()) {
|
||||
return T_OBJECT;
|
||||
} else if (i == T_ARRAY.getType()) {
|
||||
@ -229,8 +221,6 @@ public class BasicType {
|
||||
return "int";
|
||||
} else if (type == T_LONG.getType()) {
|
||||
return "long";
|
||||
} else if (type == T_FLOAT16.getType()) {
|
||||
return "float16";
|
||||
} else if (type == T_OBJECT.getType()) {
|
||||
return "object";
|
||||
} else if (type == T_ARRAY.getType()) {
|
||||
|
||||
@ -148,7 +148,7 @@ abstract class AbstractSpecies<E> extends jdk.internal.vm.vector.VectorSupport.V
|
||||
@SuppressWarnings("unchecked")
|
||||
//NOT FINAL: SPECIALIZED
|
||||
int laneBasicType() {
|
||||
return laneType.basicType;
|
||||
return laneType.laneType;
|
||||
}
|
||||
|
||||
@ForceInline
|
||||
|
||||
@ -612,7 +612,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
@ForceInline
|
||||
public static ByteVector zero(VectorSpecies<Byte> species) {
|
||||
ByteSpecies vsp = (ByteSpecies) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_BYTE, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_BYTE, species.length(),
|
||||
0, MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -734,7 +734,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_BYTE, length(),
|
||||
opc, getClass(), null, LT_BYTE, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, ByteVector::unaryOperations));
|
||||
}
|
||||
@ -762,7 +762,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_BYTE, length(),
|
||||
opc, getClass(), maskClass, LT_BYTE, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, ByteVector::unaryOperations));
|
||||
}
|
||||
@ -835,7 +835,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_BYTE, length(),
|
||||
opc, getClass(), null, LT_BYTE, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, ByteVector::binaryOperations));
|
||||
}
|
||||
@ -886,7 +886,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_BYTE, length(),
|
||||
opc, getClass(), maskClass, LT_BYTE, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, ByteVector::binaryOperations));
|
||||
}
|
||||
@ -1073,7 +1073,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), null, T_BYTE, length(),
|
||||
opc, getClass(), null, LT_BYTE, length(),
|
||||
this, e, null,
|
||||
BIN_INT_IMPL.find(op, opc, ByteVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1094,7 +1094,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), maskClass, T_BYTE, length(),
|
||||
opc, getClass(), maskClass, LT_BYTE, length(),
|
||||
this, e, m,
|
||||
BIN_INT_IMPL.find(op, opc, ByteVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1171,7 +1171,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_BYTE, length(),
|
||||
opc, getClass(), null, LT_BYTE, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, ByteVector::ternaryOperations));
|
||||
}
|
||||
@ -1211,7 +1211,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_BYTE, length(),
|
||||
opc, getClass(), maskClass, LT_BYTE, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, ByteVector::ternaryOperations));
|
||||
}
|
||||
@ -2109,7 +2109,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_BYTE, length(),
|
||||
opc, getClass(), maskType, LT_BYTE, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Byte> m
|
||||
@ -2131,7 +2131,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_BYTE, length(),
|
||||
opc, getClass(), maskType, LT_BYTE, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Byte> cmpM
|
||||
@ -2262,7 +2262,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
blendTemplate(Class<M> maskType, ByteVector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_BYTE, length(),
|
||||
getClass(), maskType, LT_BYTE, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2279,7 +2279,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_BYTE, length(),
|
||||
getClass(), LT_BYTE, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2471,7 +2471,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_BYTE, length(),
|
||||
getClass(), shuffletype, null, LT_BYTE, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2498,7 +2498,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_BYTE, length(),
|
||||
getClass(), shuffletype, masktype, LT_BYTE, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2524,7 +2524,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
VectorMask<Byte> valid = shuffle.laneIsValid();
|
||||
ByteVector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_BYTE, length(),
|
||||
getClass(), shuffletype, null, LT_BYTE, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2532,7 +2532,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}));
|
||||
ByteVector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_BYTE, length(),
|
||||
getClass(), shuffletype, null, LT_BYTE, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2582,7 +2582,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (ByteVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_BYTE, length(), this, m,
|
||||
LT_BYTE, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2601,7 +2601,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (ByteVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_BYTE, length(), this, m,
|
||||
LT_BYTE, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2616,7 +2616,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final ByteVector selectFromTemplate(ByteVector v) {
|
||||
return (ByteVector)VectorSupport.selectFromOp(getClass(), null, T_BYTE,
|
||||
return (ByteVector)VectorSupport.selectFromOp(getClass(), null, LT_BYTE,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2636,7 +2636,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
ByteVector selectFromTemplate(ByteVector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (ByteVector)VectorSupport.selectFromOp(getClass(), masktype, T_BYTE,
|
||||
return (ByteVector)VectorSupport.selectFromOp(getClass(), masktype, LT_BYTE,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2654,7 +2654,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final ByteVector selectFromTemplate(ByteVector v1, ByteVector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_BYTE, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_BYTE, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2874,7 +2874,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_BYTE, length(),
|
||||
opc, getClass(), maskClass, LT_BYTE, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, ByteVector::reductionOperations)));
|
||||
}
|
||||
@ -2892,7 +2892,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_BYTE, length(),
|
||||
opc, getClass(), null, LT_BYTE, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, ByteVector::reductionOperations)));
|
||||
}
|
||||
@ -3185,7 +3185,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_BYTE, vsp.laneCount(),
|
||||
vectorType, null, LT_BYTE, vsp.laneCount(),
|
||||
lsp.vectorType(), lsp.length(),
|
||||
a, ARRAY_BASE, vix0, vix1, vix2, vix3, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3960,7 +3960,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
}
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_BYTE, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_BYTE, vsp.laneCount(),
|
||||
lsp.vectorType(), lsp.length(),
|
||||
a, ARRAY_BASE, vix0, vix1, vix2, vix3, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -4321,7 +4321,7 @@ public abstract class ByteVector extends AbstractVector<Byte> {
|
||||
final ByteVector broadcastBits(long bits) {
|
||||
return (ByteVector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_BYTE, laneCount,
|
||||
vectorType, LT_BYTE, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@ForceInline
|
||||
public byte laneHelper(int i) {
|
||||
return (byte) VectorSupport.extract(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
byte[] vecarr = vec.vec();
|
||||
@ -594,7 +594,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteVector128 withLaneHelper(int i, byte e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
byte[] res = v.vec().clone();
|
||||
@ -699,7 +699,7 @@ final class ByteVector128 extends ByteVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_BYTE, VLENGTH,
|
||||
this.getClass(), LT_BYTE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -710,7 +710,7 @@ final class ByteVector128 extends ByteVector {
|
||||
/*package-private*/
|
||||
ByteMask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ByteMask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
ByteMask128.class, T_BYTE, VLENGTH, offset, limit,
|
||||
ByteMask128.class, LT_BYTE, VLENGTH, offset, limit,
|
||||
(o, l) -> (ByteMask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteMask128 compress() {
|
||||
return (ByteMask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ByteVector128.class, ByteMask128.class, T_BYTE, VLENGTH, null, this,
|
||||
ByteVector128.class, ByteMask128.class, LT_BYTE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -739,7 +739,7 @@ final class ByteVector128 extends ByteVector {
|
||||
public ByteMask128 and(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask128 m = (ByteMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask128.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask128.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -749,7 +749,7 @@ final class ByteVector128 extends ByteVector {
|
||||
public ByteMask128 or(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask128 m = (ByteMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask128.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask128.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -759,7 +759,7 @@ final class ByteVector128 extends ByteVector {
|
||||
public ByteMask128 xor(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask128 m = (ByteMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask128.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask128.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -769,21 +769,21 @@ final class ByteVector128 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask128.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask128.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask128.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -793,7 +793,7 @@ final class ByteVector128 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask128.class, T_BYTE, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask128.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -803,7 +803,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ByteMask128.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.extract(ByteMask128.class, LT_BYTE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -812,7 +812,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask128.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ByteMask128.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask128)m).getBits()));
|
||||
}
|
||||
@ -820,7 +820,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask128.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ByteMask128.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask128)m).getBits()));
|
||||
}
|
||||
@ -828,7 +828,7 @@ final class ByteVector128 extends ByteVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ByteMask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ByteMask128.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ByteMask128.class, LT_BYTE, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@ForceInline
|
||||
public byte laneHelper(int i) {
|
||||
return (byte) VectorSupport.extract(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
byte[] vecarr = vec.vec();
|
||||
@ -626,7 +626,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteVector256 withLaneHelper(int i, byte e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
byte[] res = v.vec().clone();
|
||||
@ -731,7 +731,7 @@ final class ByteVector256 extends ByteVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_BYTE, VLENGTH,
|
||||
this.getClass(), LT_BYTE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -742,7 +742,7 @@ final class ByteVector256 extends ByteVector {
|
||||
/*package-private*/
|
||||
ByteMask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ByteMask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
ByteMask256.class, T_BYTE, VLENGTH, offset, limit,
|
||||
ByteMask256.class, LT_BYTE, VLENGTH, offset, limit,
|
||||
(o, l) -> (ByteMask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -758,7 +758,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteMask256 compress() {
|
||||
return (ByteMask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ByteVector256.class, ByteMask256.class, T_BYTE, VLENGTH, null, this,
|
||||
ByteVector256.class, ByteMask256.class, LT_BYTE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -771,7 +771,7 @@ final class ByteVector256 extends ByteVector {
|
||||
public ByteMask256 and(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask256 m = (ByteMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask256.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask256.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -781,7 +781,7 @@ final class ByteVector256 extends ByteVector {
|
||||
public ByteMask256 or(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask256 m = (ByteMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask256.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask256.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -791,7 +791,7 @@ final class ByteVector256 extends ByteVector {
|
||||
public ByteMask256 xor(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask256 m = (ByteMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask256.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask256.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -801,21 +801,21 @@ final class ByteVector256 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask256.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask256.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask256.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -825,7 +825,7 @@ final class ByteVector256 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask256.class, T_BYTE, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask256.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -835,7 +835,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ByteMask256.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.extract(ByteMask256.class, LT_BYTE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask256.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ByteMask256.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask256)m).getBits()));
|
||||
}
|
||||
@ -852,7 +852,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask256.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ByteMask256.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask256)m).getBits()));
|
||||
}
|
||||
@ -860,7 +860,7 @@ final class ByteVector256 extends ByteVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ByteMask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ByteMask256.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ByteMask256.class, LT_BYTE, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -607,7 +607,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@ForceInline
|
||||
public byte laneHelper(int i) {
|
||||
return (byte) VectorSupport.extract(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
byte[] vecarr = vec.vec();
|
||||
@ -690,7 +690,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteVector512 withLaneHelper(int i, byte e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
byte[] res = v.vec().clone();
|
||||
@ -795,7 +795,7 @@ final class ByteVector512 extends ByteVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_BYTE, VLENGTH,
|
||||
this.getClass(), LT_BYTE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -806,7 +806,7 @@ final class ByteVector512 extends ByteVector {
|
||||
/*package-private*/
|
||||
ByteMask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ByteMask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
ByteMask512.class, T_BYTE, VLENGTH, offset, limit,
|
||||
ByteMask512.class, LT_BYTE, VLENGTH, offset, limit,
|
||||
(o, l) -> (ByteMask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -822,7 +822,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteMask512 compress() {
|
||||
return (ByteMask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ByteVector512.class, ByteMask512.class, T_BYTE, VLENGTH, null, this,
|
||||
ByteVector512.class, ByteMask512.class, LT_BYTE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -835,7 +835,7 @@ final class ByteVector512 extends ByteVector {
|
||||
public ByteMask512 and(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask512 m = (ByteMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask512.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask512.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -845,7 +845,7 @@ final class ByteVector512 extends ByteVector {
|
||||
public ByteMask512 or(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask512 m = (ByteMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask512.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask512.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -855,7 +855,7 @@ final class ByteVector512 extends ByteVector {
|
||||
public ByteMask512 xor(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask512 m = (ByteMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask512.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask512.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -865,21 +865,21 @@ final class ByteVector512 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask512.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask512.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask512.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -889,7 +889,7 @@ final class ByteVector512 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask512.class, T_BYTE, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask512.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -899,7 +899,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ByteMask512.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.extract(ByteMask512.class, LT_BYTE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -908,7 +908,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask512.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ByteMask512.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask512)m).getBits()));
|
||||
}
|
||||
@ -916,7 +916,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask512.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ByteMask512.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask512)m).getBits()));
|
||||
}
|
||||
@ -924,7 +924,7 @@ final class ByteVector512 extends ByteVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ByteMask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ByteMask512.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ByteMask512.class, LT_BYTE, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@ForceInline
|
||||
public byte laneHelper(int i) {
|
||||
return (byte) VectorSupport.extract(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
byte[] vecarr = vec.vec();
|
||||
@ -578,7 +578,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteVector64 withLaneHelper(int i, byte e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
byte[] res = v.vec().clone();
|
||||
@ -683,7 +683,7 @@ final class ByteVector64 extends ByteVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_BYTE, VLENGTH,
|
||||
this.getClass(), LT_BYTE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -694,7 +694,7 @@ final class ByteVector64 extends ByteVector {
|
||||
/*package-private*/
|
||||
ByteMask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ByteMask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
ByteMask64.class, T_BYTE, VLENGTH, offset, limit,
|
||||
ByteMask64.class, LT_BYTE, VLENGTH, offset, limit,
|
||||
(o, l) -> (ByteMask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -710,7 +710,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteMask64 compress() {
|
||||
return (ByteMask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ByteVector64.class, ByteMask64.class, T_BYTE, VLENGTH, null, this,
|
||||
ByteVector64.class, ByteMask64.class, LT_BYTE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -723,7 +723,7 @@ final class ByteVector64 extends ByteVector {
|
||||
public ByteMask64 and(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask64 m = (ByteMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask64.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMask64.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -733,7 +733,7 @@ final class ByteVector64 extends ByteVector {
|
||||
public ByteMask64 or(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask64 m = (ByteMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask64.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMask64.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -743,7 +743,7 @@ final class ByteVector64 extends ByteVector {
|
||||
public ByteMask64 xor(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMask64 m = (ByteMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask64.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMask64.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -753,21 +753,21 @@ final class ByteVector64 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMask64.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMask64.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMask64.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class ByteVector64 extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask64.class, T_BYTE, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMask64.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ByteMask64.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.extract(ByteMask64.class, LT_BYTE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -796,7 +796,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMask64.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ByteMask64.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMask64)m).getBits()));
|
||||
}
|
||||
@ -804,7 +804,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMask64.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ByteMask64.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMask64)m).getBits()));
|
||||
}
|
||||
@ -812,7 +812,7 @@ final class ByteVector64 extends ByteVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ByteMask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ByteMask64.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ByteMask64.class, LT_BYTE, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@ForceInline
|
||||
public byte laneHelper(int i) {
|
||||
return (byte) VectorSupport.extract(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
byte[] vecarr = vec.vec();
|
||||
@ -564,7 +564,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteVectorMax withLaneHelper(int i, byte e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_BYTE, VLENGTH,
|
||||
VCLASS, LT_BYTE, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
byte[] res = v.vec().clone();
|
||||
@ -669,7 +669,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_BYTE, VLENGTH,
|
||||
this.getClass(), LT_BYTE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -680,7 +680,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
/*package-private*/
|
||||
ByteMaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ByteMaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
ByteMaskMax.class, T_BYTE, VLENGTH, offset, limit,
|
||||
ByteMaskMax.class, LT_BYTE, VLENGTH, offset, limit,
|
||||
(o, l) -> (ByteMaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -696,7 +696,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@ForceInline
|
||||
public ByteMaskMax compress() {
|
||||
return (ByteMaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ByteVectorMax.class, ByteMaskMax.class, T_BYTE, VLENGTH, null, this,
|
||||
ByteVectorMax.class, ByteMaskMax.class, LT_BYTE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -709,7 +709,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
public ByteMaskMax and(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMaskMax m = (ByteMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMaskMax.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ByteMaskMax.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -719,7 +719,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
public ByteMaskMax or(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMaskMax m = (ByteMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMaskMax.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ByteMaskMax.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -729,7 +729,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
public ByteMaskMax xor(VectorMask<Byte> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ByteMaskMax m = (ByteMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMaskMax.class, null, T_BYTE, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ByteMaskMax.class, null, LT_BYTE, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -739,21 +739,21 @@ final class ByteVectorMax extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ByteMaskMax.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ByteMaskMax.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ByteMaskMax.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -763,7 +763,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMaskMax.class, T_BYTE, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ByteMaskMax.class, LT_BYTE, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -773,7 +773,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ByteMaskMax.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.extract(ByteMaskMax.class, LT_BYTE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ByteMaskMax.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ByteMaskMax.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ByteMaskMax)m).getBits()));
|
||||
}
|
||||
@ -790,7 +790,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ByteMaskMax.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ByteMaskMax.class, LT_BYTE, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ByteMaskMax)m).getBits()));
|
||||
}
|
||||
@ -798,7 +798,7 @@ final class ByteVectorMax extends ByteVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ByteMaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ByteMaskMax.class, T_BYTE, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ByteMaskMax.class, LT_BYTE, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -601,7 +601,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
@ForceInline
|
||||
public static DoubleVector zero(VectorSpecies<Double> species) {
|
||||
DoubleSpecies vsp = (DoubleSpecies) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_DOUBLE, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_DOUBLE, species.length(),
|
||||
toBits(0.0f), MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -723,7 +723,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_DOUBLE, length(),
|
||||
opc, getClass(), null, LT_DOUBLE, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, DoubleVector::unaryOperations));
|
||||
}
|
||||
@ -751,7 +751,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_DOUBLE, length(),
|
||||
opc, getClass(), maskClass, LT_DOUBLE, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, DoubleVector::unaryOperations));
|
||||
}
|
||||
@ -840,7 +840,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_DOUBLE, length(),
|
||||
opc, getClass(), null, LT_DOUBLE, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, DoubleVector::binaryOperations));
|
||||
}
|
||||
@ -878,7 +878,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_DOUBLE, length(),
|
||||
opc, getClass(), maskClass, LT_DOUBLE, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, DoubleVector::binaryOperations));
|
||||
}
|
||||
@ -1060,7 +1060,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
tother.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_DOUBLE, length(),
|
||||
opc, getClass(), null, LT_DOUBLE, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, DoubleVector::ternaryOperations));
|
||||
}
|
||||
@ -1095,7 +1095,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_DOUBLE, length(),
|
||||
opc, getClass(), maskClass, LT_DOUBLE, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, DoubleVector::ternaryOperations));
|
||||
}
|
||||
@ -1967,7 +1967,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_DOUBLE, length(),
|
||||
opc, getClass(), maskType, LT_DOUBLE, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Double> m
|
||||
@ -1989,7 +1989,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_DOUBLE, length(),
|
||||
opc, getClass(), maskType, LT_DOUBLE, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Double> cmpM
|
||||
@ -2116,7 +2116,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
blendTemplate(Class<M> maskType, DoubleVector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_DOUBLE, length(),
|
||||
getClass(), maskType, LT_DOUBLE, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2133,7 +2133,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_DOUBLE, length(),
|
||||
getClass(), LT_DOUBLE, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2325,7 +2325,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleVector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_DOUBLE, length(),
|
||||
getClass(), shuffletype, null, LT_DOUBLE, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2352,7 +2352,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_DOUBLE, length(),
|
||||
getClass(), shuffletype, masktype, LT_DOUBLE, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2378,7 +2378,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
VectorMask<Double> valid = shuffle.laneIsValid();
|
||||
DoubleVector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_DOUBLE, length(),
|
||||
getClass(), shuffletype, null, LT_DOUBLE, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2386,7 +2386,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
}));
|
||||
DoubleVector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_DOUBLE, length(),
|
||||
getClass(), shuffletype, null, LT_DOUBLE, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2430,7 +2430,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleVector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (DoubleVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_DOUBLE, length(), this, m,
|
||||
LT_DOUBLE, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2449,7 +2449,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleVector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (DoubleVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_DOUBLE, length(), this, m,
|
||||
LT_DOUBLE, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2464,7 +2464,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final DoubleVector selectFromTemplate(DoubleVector v) {
|
||||
return (DoubleVector)VectorSupport.selectFromOp(getClass(), null, T_DOUBLE,
|
||||
return (DoubleVector)VectorSupport.selectFromOp(getClass(), null, LT_DOUBLE,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2484,7 +2484,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
DoubleVector selectFromTemplate(DoubleVector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (DoubleVector)VectorSupport.selectFromOp(getClass(), masktype, T_DOUBLE,
|
||||
return (DoubleVector)VectorSupport.selectFromOp(getClass(), masktype, LT_DOUBLE,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2502,7 +2502,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final DoubleVector selectFromTemplate(DoubleVector v1, DoubleVector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_DOUBLE, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_DOUBLE, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2700,7 +2700,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_DOUBLE, length(),
|
||||
opc, getClass(), maskClass, LT_DOUBLE, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, DoubleVector::reductionOperations)));
|
||||
}
|
||||
@ -2718,7 +2718,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_DOUBLE, length(),
|
||||
opc, getClass(), null, LT_DOUBLE, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, DoubleVector::reductionOperations)));
|
||||
}
|
||||
@ -2976,7 +2976,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_DOUBLE, vsp.laneCount(),
|
||||
vectorType, null, LT_DOUBLE, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3462,7 +3462,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_DOUBLE, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_DOUBLE, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3818,7 +3818,7 @@ public abstract class DoubleVector extends AbstractVector<Double> {
|
||||
final DoubleVector broadcastBits(long bits) {
|
||||
return (DoubleVector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_DOUBLE, laneCount,
|
||||
vectorType, LT_DOUBLE, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
double[] vecarr = vec.vec();
|
||||
@ -555,7 +555,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleVector128 withLaneHelper(int i, double e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i, (long)Double.doubleToRawLongBits(e),
|
||||
(v, ix, bits) -> {
|
||||
double[] res = v.vec().clone();
|
||||
@ -660,7 +660,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_DOUBLE, VLENGTH,
|
||||
this.getClass(), LT_DOUBLE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -671,7 +671,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
/*package-private*/
|
||||
DoubleMask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (DoubleMask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
DoubleMask128.class, T_DOUBLE, VLENGTH, offset, limit,
|
||||
DoubleMask128.class, LT_DOUBLE, VLENGTH, offset, limit,
|
||||
(o, l) -> (DoubleMask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -687,7 +687,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleMask128 compress() {
|
||||
return (DoubleMask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
DoubleVector128.class, DoubleMask128.class, T_DOUBLE, VLENGTH, null, this,
|
||||
DoubleVector128.class, DoubleMask128.class, LT_DOUBLE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -700,7 +700,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
public DoubleMask128 and(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask128 m = (DoubleMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask128.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask128.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -710,7 +710,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
public DoubleMask128 or(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask128 m = (DoubleMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask128.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask128.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -720,7 +720,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
public DoubleMask128 xor(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask128 m = (DoubleMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask128.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask128.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -730,21 +730,21 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -754,7 +754,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask128.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -764,7 +764,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(DoubleMask128.class, T_DOUBLE, VLENGTH,
|
||||
return VectorSupport.extract(DoubleMask128.class, LT_DOUBLE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -773,7 +773,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, DoubleMask128.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask128)m).getBits()));
|
||||
}
|
||||
@ -781,7 +781,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, DoubleMask128.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask128)m).getBits()));
|
||||
}
|
||||
@ -789,7 +789,7 @@ final class DoubleVector128 extends DoubleVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static DoubleMask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask128.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
double[] vecarr = vec.vec();
|
||||
@ -559,7 +559,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleVector256 withLaneHelper(int i, double e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i, (long)Double.doubleToRawLongBits(e),
|
||||
(v, ix, bits) -> {
|
||||
double[] res = v.vec().clone();
|
||||
@ -664,7 +664,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_DOUBLE, VLENGTH,
|
||||
this.getClass(), LT_DOUBLE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -675,7 +675,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
/*package-private*/
|
||||
DoubleMask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (DoubleMask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
DoubleMask256.class, T_DOUBLE, VLENGTH, offset, limit,
|
||||
DoubleMask256.class, LT_DOUBLE, VLENGTH, offset, limit,
|
||||
(o, l) -> (DoubleMask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -691,7 +691,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleMask256 compress() {
|
||||
return (DoubleMask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
DoubleVector256.class, DoubleMask256.class, T_DOUBLE, VLENGTH, null, this,
|
||||
DoubleVector256.class, DoubleMask256.class, LT_DOUBLE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -704,7 +704,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
public DoubleMask256 and(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask256 m = (DoubleMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask256.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask256.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -714,7 +714,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
public DoubleMask256 or(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask256 m = (DoubleMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask256.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask256.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -724,7 +724,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
public DoubleMask256 xor(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask256 m = (DoubleMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask256.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask256.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -734,21 +734,21 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -758,7 +758,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask256.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -768,7 +768,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(DoubleMask256.class, T_DOUBLE, VLENGTH,
|
||||
return VectorSupport.extract(DoubleMask256.class, LT_DOUBLE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, DoubleMask256.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask256)m).getBits()));
|
||||
}
|
||||
@ -785,7 +785,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, DoubleMask256.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask256)m).getBits()));
|
||||
}
|
||||
@ -793,7 +793,7 @@ final class DoubleVector256 extends DoubleVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static DoubleMask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask256.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
double[] vecarr = vec.vec();
|
||||
@ -567,7 +567,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleVector512 withLaneHelper(int i, double e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i, (long)Double.doubleToRawLongBits(e),
|
||||
(v, ix, bits) -> {
|
||||
double[] res = v.vec().clone();
|
||||
@ -672,7 +672,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_DOUBLE, VLENGTH,
|
||||
this.getClass(), LT_DOUBLE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -683,7 +683,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
/*package-private*/
|
||||
DoubleMask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (DoubleMask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
DoubleMask512.class, T_DOUBLE, VLENGTH, offset, limit,
|
||||
DoubleMask512.class, LT_DOUBLE, VLENGTH, offset, limit,
|
||||
(o, l) -> (DoubleMask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -699,7 +699,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleMask512 compress() {
|
||||
return (DoubleMask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
DoubleVector512.class, DoubleMask512.class, T_DOUBLE, VLENGTH, null, this,
|
||||
DoubleVector512.class, DoubleMask512.class, LT_DOUBLE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -712,7 +712,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
public DoubleMask512 and(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask512 m = (DoubleMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask512.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask512.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -722,7 +722,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
public DoubleMask512 or(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask512 m = (DoubleMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask512.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask512.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -732,7 +732,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
public DoubleMask512 xor(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask512 m = (DoubleMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask512.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask512.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -742,21 +742,21 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask512.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -776,7 +776,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(DoubleMask512.class, T_DOUBLE, VLENGTH,
|
||||
return VectorSupport.extract(DoubleMask512.class, LT_DOUBLE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -785,7 +785,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, DoubleMask512.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask512)m).getBits()));
|
||||
}
|
||||
@ -793,7 +793,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, DoubleMask512.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask512)m).getBits()));
|
||||
}
|
||||
@ -801,7 +801,7 @@ final class DoubleVector512 extends DoubleVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static DoubleMask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask512.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -533,7 +533,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
double[] vecarr = vec.vec();
|
||||
@ -553,7 +553,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleVector64 withLaneHelper(int i, double e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i, (long)Double.doubleToRawLongBits(e),
|
||||
(v, ix, bits) -> {
|
||||
double[] res = v.vec().clone();
|
||||
@ -658,7 +658,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_DOUBLE, VLENGTH,
|
||||
this.getClass(), LT_DOUBLE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -669,7 +669,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
/*package-private*/
|
||||
DoubleMask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (DoubleMask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
DoubleMask64.class, T_DOUBLE, VLENGTH, offset, limit,
|
||||
DoubleMask64.class, LT_DOUBLE, VLENGTH, offset, limit,
|
||||
(o, l) -> (DoubleMask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -685,7 +685,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleMask64 compress() {
|
||||
return (DoubleMask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
DoubleVector64.class, DoubleMask64.class, T_DOUBLE, VLENGTH, null, this,
|
||||
DoubleVector64.class, DoubleMask64.class, LT_DOUBLE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -698,7 +698,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
public DoubleMask64 and(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask64 m = (DoubleMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask64.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMask64.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -708,7 +708,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
public DoubleMask64 or(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask64 m = (DoubleMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask64.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMask64.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -718,7 +718,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
public DoubleMask64 xor(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMask64 m = (DoubleMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask64.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMask64.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -728,21 +728,21 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -752,7 +752,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask64.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -762,7 +762,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(DoubleMask64.class, T_DOUBLE, VLENGTH,
|
||||
return VectorSupport.extract(DoubleMask64.class, LT_DOUBLE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -771,7 +771,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, DoubleMask64.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMask64)m).getBits()));
|
||||
}
|
||||
@ -779,7 +779,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, DoubleMask64.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMask64)m).getBits()));
|
||||
}
|
||||
@ -787,7 +787,7 @@ final class DoubleVector64 extends DoubleVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static DoubleMask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(DoubleMask64.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
double[] vecarr = vec.vec();
|
||||
@ -552,7 +552,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleVectorMax withLaneHelper(int i, double e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_DOUBLE, VLENGTH,
|
||||
VCLASS, LT_DOUBLE, VLENGTH,
|
||||
this, i, (long)Double.doubleToRawLongBits(e),
|
||||
(v, ix, bits) -> {
|
||||
double[] res = v.vec().clone();
|
||||
@ -657,7 +657,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_DOUBLE, VLENGTH,
|
||||
this.getClass(), LT_DOUBLE, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -668,7 +668,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
/*package-private*/
|
||||
DoubleMaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (DoubleMaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
DoubleMaskMax.class, T_DOUBLE, VLENGTH, offset, limit,
|
||||
DoubleMaskMax.class, LT_DOUBLE, VLENGTH, offset, limit,
|
||||
(o, l) -> (DoubleMaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -684,7 +684,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@ForceInline
|
||||
public DoubleMaskMax compress() {
|
||||
return (DoubleMaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
DoubleVectorMax.class, DoubleMaskMax.class, T_DOUBLE, VLENGTH, null, this,
|
||||
DoubleVectorMax.class, DoubleMaskMax.class, LT_DOUBLE, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -697,7 +697,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
public DoubleMaskMax and(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMaskMax m = (DoubleMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMaskMax.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, DoubleMaskMax.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -707,7 +707,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
public DoubleMaskMax or(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMaskMax m = (DoubleMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMaskMax.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, DoubleMaskMax.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -717,7 +717,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
public DoubleMaskMax xor(VectorMask<Double> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
DoubleMaskMax m = (DoubleMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMaskMax.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, DoubleMaskMax.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -727,21 +727,21 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, DoubleMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, DoubleMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, DoubleMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, DoubleMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -761,7 +761,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(DoubleMaskMax.class, T_DOUBLE, VLENGTH,
|
||||
return VectorSupport.extract(DoubleMaskMax.class, LT_DOUBLE, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -770,7 +770,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, DoubleMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, DoubleMaskMax.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((DoubleMaskMax)m).getBits()));
|
||||
}
|
||||
@ -778,7 +778,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, DoubleMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, DoubleMaskMax.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((DoubleMaskMax)m).getBits()));
|
||||
}
|
||||
@ -786,7 +786,7 @@ final class DoubleVectorMax extends DoubleVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static DoubleMaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(DoubleMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(DoubleMaskMax.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -605,7 +605,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
@ForceInline
|
||||
public static Float16Vector zero(VectorSpecies<Float16> species) {
|
||||
Float16Species vsp = (Float16Species) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_FLOAT16, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_FLOAT16, species.length(),
|
||||
toBits((short) 0), MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -727,7 +727,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_FLOAT16, length(),
|
||||
opc, getClass(), null, LT_FLOAT16, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, Float16Vector::unaryOperations));
|
||||
}
|
||||
@ -755,7 +755,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_FLOAT16, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT16, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, Float16Vector::unaryOperations));
|
||||
}
|
||||
@ -844,7 +844,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_FLOAT16, length(),
|
||||
opc, getClass(), null, LT_FLOAT16, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, Float16Vector::binaryOperations));
|
||||
}
|
||||
@ -882,7 +882,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_FLOAT16, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT16, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, Float16Vector::binaryOperations));
|
||||
}
|
||||
@ -1064,7 +1064,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
tother.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_FLOAT16, length(),
|
||||
opc, getClass(), null, LT_FLOAT16, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, Float16Vector::ternaryOperations));
|
||||
}
|
||||
@ -1099,7 +1099,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_FLOAT16, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT16, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, Float16Vector::ternaryOperations));
|
||||
}
|
||||
@ -1971,7 +1971,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_FLOAT16, length(),
|
||||
opc, getClass(), maskType, LT_FLOAT16, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Float16> m
|
||||
@ -1993,7 +1993,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_FLOAT16, length(),
|
||||
opc, getClass(), maskType, LT_FLOAT16, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Float16> cmpM
|
||||
@ -2120,7 +2120,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
blendTemplate(Class<M> maskType, Float16Vector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_FLOAT16, length(),
|
||||
getClass(), maskType, LT_FLOAT16, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2137,7 +2137,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_FLOAT16, length(),
|
||||
getClass(), LT_FLOAT16, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2329,7 +2329,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_FLOAT16, length(),
|
||||
getClass(), shuffletype, null, LT_FLOAT16, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2356,7 +2356,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_FLOAT16, length(),
|
||||
getClass(), shuffletype, masktype, LT_FLOAT16, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2382,7 +2382,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
VectorMask<Float16> valid = shuffle.laneIsValid();
|
||||
Float16Vector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_FLOAT16, length(),
|
||||
getClass(), shuffletype, null, LT_FLOAT16, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2390,7 +2390,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}));
|
||||
Float16Vector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_FLOAT16, length(),
|
||||
getClass(), shuffletype, null, LT_FLOAT16, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2434,7 +2434,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (Float16Vector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_FLOAT16, length(), this, m,
|
||||
LT_FLOAT16, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2453,7 +2453,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (Float16Vector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_FLOAT16, length(), this, m,
|
||||
LT_FLOAT16, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2468,7 +2468,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final Float16Vector selectFromTemplate(Float16Vector v) {
|
||||
return (Float16Vector)VectorSupport.selectFromOp(getClass(), null, T_FLOAT16,
|
||||
return (Float16Vector)VectorSupport.selectFromOp(getClass(), null, LT_FLOAT16,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2488,7 +2488,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
Float16Vector selectFromTemplate(Float16Vector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (Float16Vector)VectorSupport.selectFromOp(getClass(), masktype, T_FLOAT16,
|
||||
return (Float16Vector)VectorSupport.selectFromOp(getClass(), masktype, LT_FLOAT16,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2506,7 +2506,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final Float16Vector selectFromTemplate(Float16Vector v1, Float16Vector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_FLOAT16, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_FLOAT16, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2704,7 +2704,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_FLOAT16, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT16, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, Float16Vector::reductionOperations)));
|
||||
}
|
||||
@ -2722,7 +2722,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_FLOAT16, length(),
|
||||
opc, getClass(), null, LT_FLOAT16, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, Float16Vector::reductionOperations)));
|
||||
}
|
||||
@ -2980,7 +2980,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_FLOAT16, vsp.laneCount(),
|
||||
vectorType, null, LT_FLOAT16, vsp.laneCount(),
|
||||
lsp.vectorType(), lsp.length(),
|
||||
a, ARRAY_BASE, vix0, vix1, null, null, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3731,7 +3731,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
}
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_FLOAT16, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_FLOAT16, vsp.laneCount(),
|
||||
lsp.vectorType(), lsp.length(),
|
||||
a, ARRAY_BASE, vix0, vix1, null, null, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -4099,7 +4099,7 @@ public abstract class Float16Vector extends AbstractVector<Float16> {
|
||||
final Float16Vector broadcastBits(long bits) {
|
||||
return (Float16Vector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_FLOAT16, laneCount,
|
||||
vectorType, LT_FLOAT16, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -567,7 +567,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Vector128 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -672,7 +672,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT16, VLENGTH,
|
||||
this.getClass(), LT_FLOAT16, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -683,7 +683,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
/*package-private*/
|
||||
Float16Mask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (Float16Mask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
Float16Mask128.class, T_FLOAT16, VLENGTH, offset, limit,
|
||||
Float16Mask128.class, LT_FLOAT16, VLENGTH, offset, limit,
|
||||
(o, l) -> (Float16Mask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -699,7 +699,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Mask128 compress() {
|
||||
return (Float16Mask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
Float16Vector128.class, Float16Mask128.class, T_FLOAT16, VLENGTH, null, this,
|
||||
Float16Vector128.class, Float16Mask128.class, LT_FLOAT16, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
Float16.float16ToRawShortBits(Float16.valueOf(m1.trueCount()))));
|
||||
}
|
||||
@ -712,7 +712,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
public Float16Mask128 and(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask128 m = (Float16Mask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask128.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask128.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -722,7 +722,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
public Float16Mask128 or(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask128 m = (Float16Mask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask128.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask128.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -732,7 +732,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
public Float16Mask128 xor(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask128 m = (Float16Mask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask128.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask128.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -742,21 +742,21 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask128.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -776,7 +776,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(Float16Mask128.class, T_FLOAT16, VLENGTH,
|
||||
return VectorSupport.extract(Float16Mask128.class, LT_FLOAT16, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -785,7 +785,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, Float16Mask128.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask128)m).getBits()));
|
||||
}
|
||||
@ -793,7 +793,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, Float16Mask128.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask128)m).getBits()));
|
||||
}
|
||||
@ -801,7 +801,7 @@ final class Float16Vector128 extends Float16Vector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static Float16Mask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask128.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -548,7 +548,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -583,7 +583,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Vector256 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -688,7 +688,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT16, VLENGTH,
|
||||
this.getClass(), LT_FLOAT16, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -699,7 +699,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
/*package-private*/
|
||||
Float16Mask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (Float16Mask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
Float16Mask256.class, T_FLOAT16, VLENGTH, offset, limit,
|
||||
Float16Mask256.class, LT_FLOAT16, VLENGTH, offset, limit,
|
||||
(o, l) -> (Float16Mask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -715,7 +715,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Mask256 compress() {
|
||||
return (Float16Mask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
Float16Vector256.class, Float16Mask256.class, T_FLOAT16, VLENGTH, null, this,
|
||||
Float16Vector256.class, Float16Mask256.class, LT_FLOAT16, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
Float16.float16ToRawShortBits(Float16.valueOf(m1.trueCount()))));
|
||||
}
|
||||
@ -728,7 +728,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
public Float16Mask256 and(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask256 m = (Float16Mask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask256.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask256.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -738,7 +738,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
public Float16Mask256 or(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask256 m = (Float16Mask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask256.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask256.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -748,7 +748,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
public Float16Mask256 xor(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask256 m = (Float16Mask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask256.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask256.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -758,21 +758,21 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask256.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(Float16Mask256.class, T_FLOAT16, VLENGTH,
|
||||
return VectorSupport.extract(Float16Mask256.class, LT_FLOAT16, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -801,7 +801,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, Float16Mask256.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask256)m).getBits()));
|
||||
}
|
||||
@ -809,7 +809,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, Float16Mask256.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask256)m).getBits()));
|
||||
}
|
||||
@ -817,7 +817,7 @@ final class Float16Vector256 extends Float16Vector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static Float16Mask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask256.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -564,7 +564,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -615,7 +615,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Vector512 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -720,7 +720,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT16, VLENGTH,
|
||||
this.getClass(), LT_FLOAT16, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -731,7 +731,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
/*package-private*/
|
||||
Float16Mask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (Float16Mask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
Float16Mask512.class, T_FLOAT16, VLENGTH, offset, limit,
|
||||
Float16Mask512.class, LT_FLOAT16, VLENGTH, offset, limit,
|
||||
(o, l) -> (Float16Mask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -747,7 +747,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Mask512 compress() {
|
||||
return (Float16Mask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
Float16Vector512.class, Float16Mask512.class, T_FLOAT16, VLENGTH, null, this,
|
||||
Float16Vector512.class, Float16Mask512.class, LT_FLOAT16, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
Float16.float16ToRawShortBits(Float16.valueOf(m1.trueCount()))));
|
||||
}
|
||||
@ -760,7 +760,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
public Float16Mask512 and(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask512 m = (Float16Mask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask512.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask512.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -770,7 +770,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
public Float16Mask512 or(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask512 m = (Float16Mask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask512.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask512.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -780,7 +780,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
public Float16Mask512 xor(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask512 m = (Float16Mask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask512.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask512.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -790,21 +790,21 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -814,7 +814,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask512.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -824,7 +824,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(Float16Mask512.class, T_FLOAT16, VLENGTH,
|
||||
return VectorSupport.extract(Float16Mask512.class, LT_FLOAT16, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -833,7 +833,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, Float16Mask512.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask512)m).getBits()));
|
||||
}
|
||||
@ -841,7 +841,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, Float16Mask512.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask512)m).getBits()));
|
||||
}
|
||||
@ -849,7 +849,7 @@ final class Float16Vector512 extends Float16Vector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static Float16Mask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask512.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -559,7 +559,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Vector64 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -664,7 +664,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT16, VLENGTH,
|
||||
this.getClass(), LT_FLOAT16, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -675,7 +675,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
/*package-private*/
|
||||
Float16Mask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (Float16Mask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
Float16Mask64.class, T_FLOAT16, VLENGTH, offset, limit,
|
||||
Float16Mask64.class, LT_FLOAT16, VLENGTH, offset, limit,
|
||||
(o, l) -> (Float16Mask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -691,7 +691,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16Mask64 compress() {
|
||||
return (Float16Mask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
Float16Vector64.class, Float16Mask64.class, T_FLOAT16, VLENGTH, null, this,
|
||||
Float16Vector64.class, Float16Mask64.class, LT_FLOAT16, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
Float16.float16ToRawShortBits(Float16.valueOf(m1.trueCount()))));
|
||||
}
|
||||
@ -704,7 +704,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
public Float16Mask64 and(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask64 m = (Float16Mask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask64.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16Mask64.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -714,7 +714,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
public Float16Mask64 or(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask64 m = (Float16Mask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask64.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16Mask64.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -724,7 +724,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
public Float16Mask64 xor(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16Mask64 m = (Float16Mask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask64.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16Mask64.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -734,21 +734,21 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16Mask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16Mask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16Mask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -758,7 +758,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask64.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16Mask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -768,7 +768,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(Float16Mask64.class, T_FLOAT16, VLENGTH,
|
||||
return VectorSupport.extract(Float16Mask64.class, LT_FLOAT16, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16Mask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, Float16Mask64.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16Mask64)m).getBits()));
|
||||
}
|
||||
@ -785,7 +785,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16Mask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, Float16Mask64.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16Mask64)m).getBits()));
|
||||
}
|
||||
@ -793,7 +793,7 @@ final class Float16Vector64 extends Float16Vector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static Float16Mask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(Float16Mask64.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -552,7 +552,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16VectorMax withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT16, VLENGTH,
|
||||
VCLASS, LT_FLOAT16, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -657,7 +657,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT16, VLENGTH,
|
||||
this.getClass(), LT_FLOAT16, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -668,7 +668,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
/*package-private*/
|
||||
Float16MaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (Float16MaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
Float16MaskMax.class, T_FLOAT16, VLENGTH, offset, limit,
|
||||
Float16MaskMax.class, LT_FLOAT16, VLENGTH, offset, limit,
|
||||
(o, l) -> (Float16MaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -684,7 +684,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@ForceInline
|
||||
public Float16MaskMax compress() {
|
||||
return (Float16MaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
Float16VectorMax.class, Float16MaskMax.class, T_FLOAT16, VLENGTH, null, this,
|
||||
Float16VectorMax.class, Float16MaskMax.class, LT_FLOAT16, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
Float16.float16ToRawShortBits(Float16.valueOf(m1.trueCount()))));
|
||||
}
|
||||
@ -697,7 +697,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
public Float16MaskMax and(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16MaskMax m = (Float16MaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16MaskMax.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, Float16MaskMax.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -707,7 +707,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
public Float16MaskMax or(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16MaskMax m = (Float16MaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16MaskMax.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, Float16MaskMax.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -717,7 +717,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
public Float16MaskMax xor(VectorMask<Float16> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
Float16MaskMax m = (Float16MaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16MaskMax.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, Float16MaskMax.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -727,21 +727,21 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Float16MaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Float16MaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Float16MaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16MaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Float16MaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -761,7 +761,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(Float16MaskMax.class, T_FLOAT16, VLENGTH,
|
||||
return VectorSupport.extract(Float16MaskMax.class, LT_FLOAT16, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -770,7 +770,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, Float16MaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, Float16MaskMax.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((Float16MaskMax)m).getBits()));
|
||||
}
|
||||
@ -778,7 +778,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, Float16MaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, Float16MaskMax.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((Float16MaskMax)m).getBits()));
|
||||
}
|
||||
@ -786,7 +786,7 @@ final class Float16VectorMax extends Float16Vector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static Float16MaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(Float16MaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(Float16MaskMax.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -601,7 +601,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
@ForceInline
|
||||
public static FloatVector zero(VectorSpecies<Float> species) {
|
||||
FloatSpecies vsp = (FloatSpecies) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_FLOAT, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_FLOAT, species.length(),
|
||||
toBits(0.0f), MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -723,7 +723,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_FLOAT, length(),
|
||||
opc, getClass(), null, LT_FLOAT, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, FloatVector::unaryOperations));
|
||||
}
|
||||
@ -751,7 +751,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_FLOAT, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, FloatVector::unaryOperations));
|
||||
}
|
||||
@ -840,7 +840,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_FLOAT, length(),
|
||||
opc, getClass(), null, LT_FLOAT, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, FloatVector::binaryOperations));
|
||||
}
|
||||
@ -878,7 +878,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_FLOAT, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, FloatVector::binaryOperations));
|
||||
}
|
||||
@ -1060,7 +1060,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
tother.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_FLOAT, length(),
|
||||
opc, getClass(), null, LT_FLOAT, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, FloatVector::ternaryOperations));
|
||||
}
|
||||
@ -1095,7 +1095,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_FLOAT, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, FloatVector::ternaryOperations));
|
||||
}
|
||||
@ -1979,7 +1979,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_FLOAT, length(),
|
||||
opc, getClass(), maskType, LT_FLOAT, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Float> m
|
||||
@ -2001,7 +2001,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_FLOAT, length(),
|
||||
opc, getClass(), maskType, LT_FLOAT, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Float> cmpM
|
||||
@ -2128,7 +2128,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
blendTemplate(Class<M> maskType, FloatVector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_FLOAT, length(),
|
||||
getClass(), maskType, LT_FLOAT, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2145,7 +2145,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_FLOAT, length(),
|
||||
getClass(), LT_FLOAT, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2337,7 +2337,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatVector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_FLOAT, length(),
|
||||
getClass(), shuffletype, null, LT_FLOAT, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2364,7 +2364,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_FLOAT, length(),
|
||||
getClass(), shuffletype, masktype, LT_FLOAT, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2390,7 +2390,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
VectorMask<Float> valid = shuffle.laneIsValid();
|
||||
FloatVector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_FLOAT, length(),
|
||||
getClass(), shuffletype, null, LT_FLOAT, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2398,7 +2398,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
}));
|
||||
FloatVector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_FLOAT, length(),
|
||||
getClass(), shuffletype, null, LT_FLOAT, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2442,7 +2442,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatVector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (FloatVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_FLOAT, length(), this, m,
|
||||
LT_FLOAT, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2461,7 +2461,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatVector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (FloatVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_FLOAT, length(), this, m,
|
||||
LT_FLOAT, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2476,7 +2476,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final FloatVector selectFromTemplate(FloatVector v) {
|
||||
return (FloatVector)VectorSupport.selectFromOp(getClass(), null, T_FLOAT,
|
||||
return (FloatVector)VectorSupport.selectFromOp(getClass(), null, LT_FLOAT,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2496,7 +2496,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
FloatVector selectFromTemplate(FloatVector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (FloatVector)VectorSupport.selectFromOp(getClass(), masktype, T_FLOAT,
|
||||
return (FloatVector)VectorSupport.selectFromOp(getClass(), masktype, LT_FLOAT,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2514,7 +2514,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final FloatVector selectFromTemplate(FloatVector v1, FloatVector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_FLOAT, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_FLOAT, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2720,7 +2720,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_FLOAT, length(),
|
||||
opc, getClass(), maskClass, LT_FLOAT, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, FloatVector::reductionOperations)));
|
||||
}
|
||||
@ -2738,7 +2738,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_FLOAT, length(),
|
||||
opc, getClass(), null, LT_FLOAT, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, FloatVector::reductionOperations)));
|
||||
}
|
||||
@ -2982,7 +2982,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_FLOAT, vsp.laneCount(),
|
||||
vectorType, null, LT_FLOAT, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3431,7 +3431,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_FLOAT, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_FLOAT, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3768,7 +3768,7 @@ public abstract class FloatVector extends AbstractVector<Float> {
|
||||
final FloatVector broadcastBits(long bits) {
|
||||
return (FloatVector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_FLOAT, laneCount,
|
||||
vectorType, LT_FLOAT, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -536,7 +536,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
float[] vecarr = vec.vec();
|
||||
@ -559,7 +559,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatVector128 withLaneHelper(int i, float e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i, (long)Float.floatToRawIntBits(e),
|
||||
(v, ix, bits) -> {
|
||||
float[] res = v.vec().clone();
|
||||
@ -664,7 +664,7 @@ final class FloatVector128 extends FloatVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT, VLENGTH,
|
||||
this.getClass(), LT_FLOAT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -675,7 +675,7 @@ final class FloatVector128 extends FloatVector {
|
||||
/*package-private*/
|
||||
FloatMask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (FloatMask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
FloatMask128.class, T_FLOAT, VLENGTH, offset, limit,
|
||||
FloatMask128.class, LT_FLOAT, VLENGTH, offset, limit,
|
||||
(o, l) -> (FloatMask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -691,7 +691,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatMask128 compress() {
|
||||
return (FloatMask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
FloatVector128.class, FloatMask128.class, T_FLOAT, VLENGTH, null, this,
|
||||
FloatVector128.class, FloatMask128.class, LT_FLOAT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -704,7 +704,7 @@ final class FloatVector128 extends FloatVector {
|
||||
public FloatMask128 and(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask128 m = (FloatMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask128.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask128.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -714,7 +714,7 @@ final class FloatVector128 extends FloatVector {
|
||||
public FloatMask128 or(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask128 m = (FloatMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask128.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask128.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -724,7 +724,7 @@ final class FloatVector128 extends FloatVector {
|
||||
public FloatMask128 xor(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask128 m = (FloatMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask128.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask128.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -734,21 +734,21 @@ final class FloatVector128 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -758,7 +758,7 @@ final class FloatVector128 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask128.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -768,7 +768,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(FloatMask128.class, T_FLOAT, VLENGTH,
|
||||
return VectorSupport.extract(FloatMask128.class, LT_FLOAT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, FloatMask128.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask128)m).getBits()));
|
||||
}
|
||||
@ -785,7 +785,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, FloatMask128.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask128)m).getBits()));
|
||||
}
|
||||
@ -793,7 +793,7 @@ final class FloatVector128 extends FloatVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static FloatMask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(FloatMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(FloatMask128.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
float[] vecarr = vec.vec();
|
||||
@ -567,7 +567,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatVector256 withLaneHelper(int i, float e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i, (long)Float.floatToRawIntBits(e),
|
||||
(v, ix, bits) -> {
|
||||
float[] res = v.vec().clone();
|
||||
@ -672,7 +672,7 @@ final class FloatVector256 extends FloatVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT, VLENGTH,
|
||||
this.getClass(), LT_FLOAT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -683,7 +683,7 @@ final class FloatVector256 extends FloatVector {
|
||||
/*package-private*/
|
||||
FloatMask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (FloatMask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
FloatMask256.class, T_FLOAT, VLENGTH, offset, limit,
|
||||
FloatMask256.class, LT_FLOAT, VLENGTH, offset, limit,
|
||||
(o, l) -> (FloatMask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -699,7 +699,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatMask256 compress() {
|
||||
return (FloatMask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
FloatVector256.class, FloatMask256.class, T_FLOAT, VLENGTH, null, this,
|
||||
FloatVector256.class, FloatMask256.class, LT_FLOAT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -712,7 +712,7 @@ final class FloatVector256 extends FloatVector {
|
||||
public FloatMask256 and(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask256 m = (FloatMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask256.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask256.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -722,7 +722,7 @@ final class FloatVector256 extends FloatVector {
|
||||
public FloatMask256 or(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask256 m = (FloatMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask256.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask256.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -732,7 +732,7 @@ final class FloatVector256 extends FloatVector {
|
||||
public FloatMask256 xor(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask256 m = (FloatMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask256.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask256.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -742,21 +742,21 @@ final class FloatVector256 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ final class FloatVector256 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask256.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -776,7 +776,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(FloatMask256.class, T_FLOAT, VLENGTH,
|
||||
return VectorSupport.extract(FloatMask256.class, LT_FLOAT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -785,7 +785,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, FloatMask256.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask256)m).getBits()));
|
||||
}
|
||||
@ -793,7 +793,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, FloatMask256.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask256)m).getBits()));
|
||||
}
|
||||
@ -801,7 +801,7 @@ final class FloatVector256 extends FloatVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static FloatMask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(FloatMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(FloatMask256.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -548,7 +548,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
float[] vecarr = vec.vec();
|
||||
@ -583,7 +583,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatVector512 withLaneHelper(int i, float e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i, (long)Float.floatToRawIntBits(e),
|
||||
(v, ix, bits) -> {
|
||||
float[] res = v.vec().clone();
|
||||
@ -688,7 +688,7 @@ final class FloatVector512 extends FloatVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT, VLENGTH,
|
||||
this.getClass(), LT_FLOAT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -699,7 +699,7 @@ final class FloatVector512 extends FloatVector {
|
||||
/*package-private*/
|
||||
FloatMask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (FloatMask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
FloatMask512.class, T_FLOAT, VLENGTH, offset, limit,
|
||||
FloatMask512.class, LT_FLOAT, VLENGTH, offset, limit,
|
||||
(o, l) -> (FloatMask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -715,7 +715,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatMask512 compress() {
|
||||
return (FloatMask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
FloatVector512.class, FloatMask512.class, T_FLOAT, VLENGTH, null, this,
|
||||
FloatVector512.class, FloatMask512.class, LT_FLOAT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -728,7 +728,7 @@ final class FloatVector512 extends FloatVector {
|
||||
public FloatMask512 and(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask512 m = (FloatMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask512.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask512.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -738,7 +738,7 @@ final class FloatVector512 extends FloatVector {
|
||||
public FloatMask512 or(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask512 m = (FloatMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask512.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask512.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -748,7 +748,7 @@ final class FloatVector512 extends FloatVector {
|
||||
public FloatMask512 xor(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask512 m = (FloatMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask512.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask512.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -758,21 +758,21 @@ final class FloatVector512 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ final class FloatVector512 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask512.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(FloatMask512.class, T_FLOAT, VLENGTH,
|
||||
return VectorSupport.extract(FloatMask512.class, LT_FLOAT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -801,7 +801,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, FloatMask512.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask512)m).getBits()));
|
||||
}
|
||||
@ -809,7 +809,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, FloatMask512.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask512)m).getBits()));
|
||||
}
|
||||
@ -817,7 +817,7 @@ final class FloatVector512 extends FloatVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static FloatMask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(FloatMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(FloatMask512.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
float[] vecarr = vec.vec();
|
||||
@ -555,7 +555,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatVector64 withLaneHelper(int i, float e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i, (long)Float.floatToRawIntBits(e),
|
||||
(v, ix, bits) -> {
|
||||
float[] res = v.vec().clone();
|
||||
@ -660,7 +660,7 @@ final class FloatVector64 extends FloatVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT, VLENGTH,
|
||||
this.getClass(), LT_FLOAT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -671,7 +671,7 @@ final class FloatVector64 extends FloatVector {
|
||||
/*package-private*/
|
||||
FloatMask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (FloatMask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
FloatMask64.class, T_FLOAT, VLENGTH, offset, limit,
|
||||
FloatMask64.class, LT_FLOAT, VLENGTH, offset, limit,
|
||||
(o, l) -> (FloatMask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -687,7 +687,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatMask64 compress() {
|
||||
return (FloatMask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
FloatVector64.class, FloatMask64.class, T_FLOAT, VLENGTH, null, this,
|
||||
FloatVector64.class, FloatMask64.class, LT_FLOAT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -700,7 +700,7 @@ final class FloatVector64 extends FloatVector {
|
||||
public FloatMask64 and(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask64 m = (FloatMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask64.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMask64.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -710,7 +710,7 @@ final class FloatVector64 extends FloatVector {
|
||||
public FloatMask64 or(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask64 m = (FloatMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask64.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMask64.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -720,7 +720,7 @@ final class FloatVector64 extends FloatVector {
|
||||
public FloatMask64 xor(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMask64 m = (FloatMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask64.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMask64.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -730,21 +730,21 @@ final class FloatVector64 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -754,7 +754,7 @@ final class FloatVector64 extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask64.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -764,7 +764,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(FloatMask64.class, T_FLOAT, VLENGTH,
|
||||
return VectorSupport.extract(FloatMask64.class, LT_FLOAT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -773,7 +773,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, FloatMask64.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMask64)m).getBits()));
|
||||
}
|
||||
@ -781,7 +781,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, FloatMask64.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMask64)m).getBits()));
|
||||
}
|
||||
@ -789,7 +789,7 @@ final class FloatVector64 extends FloatVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static FloatMask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(FloatMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(FloatMask64.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -532,7 +532,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
float[] vecarr = vec.vec();
|
||||
@ -552,7 +552,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatVectorMax withLaneHelper(int i, float e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_FLOAT, VLENGTH,
|
||||
VCLASS, LT_FLOAT, VLENGTH,
|
||||
this, i, (long)Float.floatToRawIntBits(e),
|
||||
(v, ix, bits) -> {
|
||||
float[] res = v.vec().clone();
|
||||
@ -657,7 +657,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_FLOAT, VLENGTH,
|
||||
this.getClass(), LT_FLOAT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -668,7 +668,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
/*package-private*/
|
||||
FloatMaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (FloatMaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
FloatMaskMax.class, T_FLOAT, VLENGTH, offset, limit,
|
||||
FloatMaskMax.class, LT_FLOAT, VLENGTH, offset, limit,
|
||||
(o, l) -> (FloatMaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -684,7 +684,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@ForceInline
|
||||
public FloatMaskMax compress() {
|
||||
return (FloatMaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
FloatVectorMax.class, FloatMaskMax.class, T_FLOAT, VLENGTH, null, this,
|
||||
FloatVectorMax.class, FloatMaskMax.class, LT_FLOAT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -697,7 +697,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
public FloatMaskMax and(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMaskMax m = (FloatMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMaskMax.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, FloatMaskMax.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -707,7 +707,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
public FloatMaskMax or(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMaskMax m = (FloatMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMaskMax.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, FloatMaskMax.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -717,7 +717,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
public FloatMaskMax xor(VectorMask<Float> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
FloatMaskMax m = (FloatMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMaskMax.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, FloatMaskMax.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -727,21 +727,21 @@ final class FloatVectorMax extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, FloatMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, FloatMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, FloatMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMaskMax.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, FloatMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -761,7 +761,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(FloatMaskMax.class, T_FLOAT, VLENGTH,
|
||||
return VectorSupport.extract(FloatMaskMax.class, LT_FLOAT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -770,7 +770,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, FloatMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, FloatMaskMax.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((FloatMaskMax)m).getBits()));
|
||||
}
|
||||
@ -778,7 +778,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, FloatMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, FloatMaskMax.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((FloatMaskMax)m).getBits()));
|
||||
}
|
||||
@ -786,7 +786,7 @@ final class FloatVectorMax extends FloatVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static FloatMaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(FloatMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(FloatMaskMax.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -612,7 +612,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
@ForceInline
|
||||
public static IntVector zero(VectorSpecies<Integer> species) {
|
||||
IntSpecies vsp = (IntSpecies) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_INT, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_INT, species.length(),
|
||||
0, MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -734,7 +734,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_INT, length(),
|
||||
opc, getClass(), null, LT_INT, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, IntVector::unaryOperations));
|
||||
}
|
||||
@ -762,7 +762,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_INT, length(),
|
||||
opc, getClass(), maskClass, LT_INT, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, IntVector::unaryOperations));
|
||||
}
|
||||
@ -835,7 +835,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_INT, length(),
|
||||
opc, getClass(), null, LT_INT, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, IntVector::binaryOperations));
|
||||
}
|
||||
@ -886,7 +886,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_INT, length(),
|
||||
opc, getClass(), maskClass, LT_INT, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, IntVector::binaryOperations));
|
||||
}
|
||||
@ -1077,7 +1077,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), null, T_INT, length(),
|
||||
opc, getClass(), null, LT_INT, length(),
|
||||
this, e, null,
|
||||
BIN_INT_IMPL.find(op, opc, IntVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1098,7 +1098,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), maskClass, T_INT, length(),
|
||||
opc, getClass(), maskClass, LT_INT, length(),
|
||||
this, e, m,
|
||||
BIN_INT_IMPL.find(op, opc, IntVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1174,7 +1174,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_INT, length(),
|
||||
opc, getClass(), null, LT_INT, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, IntVector::ternaryOperations));
|
||||
}
|
||||
@ -1214,7 +1214,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_INT, length(),
|
||||
opc, getClass(), maskClass, LT_INT, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, IntVector::ternaryOperations));
|
||||
}
|
||||
@ -2094,7 +2094,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_INT, length(),
|
||||
opc, getClass(), maskType, LT_INT, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Integer> m
|
||||
@ -2116,7 +2116,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_INT, length(),
|
||||
opc, getClass(), maskType, LT_INT, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Integer> cmpM
|
||||
@ -2247,7 +2247,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
blendTemplate(Class<M> maskType, IntVector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_INT, length(),
|
||||
getClass(), maskType, LT_INT, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2264,7 +2264,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_INT, length(),
|
||||
getClass(), LT_INT, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2456,7 +2456,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntVector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_INT, length(),
|
||||
getClass(), shuffletype, null, LT_INT, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2483,7 +2483,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_INT, length(),
|
||||
getClass(), shuffletype, masktype, LT_INT, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2509,7 +2509,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
VectorMask<Integer> valid = shuffle.laneIsValid();
|
||||
IntVector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_INT, length(),
|
||||
getClass(), shuffletype, null, LT_INT, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2517,7 +2517,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}));
|
||||
IntVector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_INT, length(),
|
||||
getClass(), shuffletype, null, LT_INT, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2567,7 +2567,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntVector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (IntVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_INT, length(), this, m,
|
||||
LT_INT, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2586,7 +2586,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntVector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (IntVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_INT, length(), this, m,
|
||||
LT_INT, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2601,7 +2601,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final IntVector selectFromTemplate(IntVector v) {
|
||||
return (IntVector)VectorSupport.selectFromOp(getClass(), null, T_INT,
|
||||
return (IntVector)VectorSupport.selectFromOp(getClass(), null, LT_INT,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2621,7 +2621,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
IntVector selectFromTemplate(IntVector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (IntVector)VectorSupport.selectFromOp(getClass(), masktype, T_INT,
|
||||
return (IntVector)VectorSupport.selectFromOp(getClass(), masktype, LT_INT,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2639,7 +2639,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final IntVector selectFromTemplate(IntVector v1, IntVector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_INT, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_INT, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2859,7 +2859,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_INT, length(),
|
||||
opc, getClass(), maskClass, LT_INT, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, IntVector::reductionOperations)));
|
||||
}
|
||||
@ -2877,7 +2877,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_INT, length(),
|
||||
opc, getClass(), null, LT_INT, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, IntVector::reductionOperations)));
|
||||
}
|
||||
@ -3140,7 +3140,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_INT, vsp.laneCount(),
|
||||
vectorType, null, LT_INT, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3589,7 +3589,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_INT, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_INT, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3926,7 +3926,7 @@ public abstract class IntVector extends AbstractVector<Integer> {
|
||||
final IntVector broadcastBits(long bits) {
|
||||
return (IntVector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_INT, laneCount,
|
||||
vectorType, LT_INT, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -547,7 +547,7 @@ final class IntVector128 extends IntVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
int[] vecarr = vec.vec();
|
||||
@ -570,7 +570,7 @@ final class IntVector128 extends IntVector {
|
||||
@ForceInline
|
||||
public IntVector128 withLaneHelper(int i, int e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
int[] res = v.vec().clone();
|
||||
@ -675,7 +675,7 @@ final class IntVector128 extends IntVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_INT, VLENGTH,
|
||||
this.getClass(), LT_INT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -686,7 +686,7 @@ final class IntVector128 extends IntVector {
|
||||
/*package-private*/
|
||||
IntMask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (IntMask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
IntMask128.class, T_INT, VLENGTH, offset, limit,
|
||||
IntMask128.class, LT_INT, VLENGTH, offset, limit,
|
||||
(o, l) -> (IntMask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -702,7 +702,7 @@ final class IntVector128 extends IntVector {
|
||||
@ForceInline
|
||||
public IntMask128 compress() {
|
||||
return (IntMask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
IntVector128.class, IntMask128.class, T_INT, VLENGTH, null, this,
|
||||
IntVector128.class, IntMask128.class, LT_INT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -715,7 +715,7 @@ final class IntVector128 extends IntVector {
|
||||
public IntMask128 and(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask128 m = (IntMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask128.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask128.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -725,7 +725,7 @@ final class IntVector128 extends IntVector {
|
||||
public IntMask128 or(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask128 m = (IntMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask128.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask128.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -735,7 +735,7 @@ final class IntVector128 extends IntVector {
|
||||
public IntMask128 xor(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask128 m = (IntMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask128.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask128.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -745,21 +745,21 @@ final class IntVector128 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask128.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask128.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask128.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -769,7 +769,7 @@ final class IntVector128 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask128.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask128.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -779,7 +779,7 @@ final class IntVector128 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(IntMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.extract(IntMask128.class, LT_INT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -788,7 +788,7 @@ final class IntVector128 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, IntMask128.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask128)m).getBits()));
|
||||
}
|
||||
@ -796,7 +796,7 @@ final class IntVector128 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, IntMask128.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask128)m).getBits()));
|
||||
}
|
||||
@ -804,7 +804,7 @@ final class IntVector128 extends IntVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static IntMask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(IntMask128.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(IntMask128.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ final class IntVector256 extends IntVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
int[] vecarr = vec.vec();
|
||||
@ -578,7 +578,7 @@ final class IntVector256 extends IntVector {
|
||||
@ForceInline
|
||||
public IntVector256 withLaneHelper(int i, int e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
int[] res = v.vec().clone();
|
||||
@ -683,7 +683,7 @@ final class IntVector256 extends IntVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_INT, VLENGTH,
|
||||
this.getClass(), LT_INT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -694,7 +694,7 @@ final class IntVector256 extends IntVector {
|
||||
/*package-private*/
|
||||
IntMask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (IntMask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
IntMask256.class, T_INT, VLENGTH, offset, limit,
|
||||
IntMask256.class, LT_INT, VLENGTH, offset, limit,
|
||||
(o, l) -> (IntMask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -710,7 +710,7 @@ final class IntVector256 extends IntVector {
|
||||
@ForceInline
|
||||
public IntMask256 compress() {
|
||||
return (IntMask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
IntVector256.class, IntMask256.class, T_INT, VLENGTH, null, this,
|
||||
IntVector256.class, IntMask256.class, LT_INT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -723,7 +723,7 @@ final class IntVector256 extends IntVector {
|
||||
public IntMask256 and(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask256 m = (IntMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask256.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask256.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -733,7 +733,7 @@ final class IntVector256 extends IntVector {
|
||||
public IntMask256 or(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask256 m = (IntMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask256.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask256.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -743,7 +743,7 @@ final class IntVector256 extends IntVector {
|
||||
public IntMask256 xor(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask256 m = (IntMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask256.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask256.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -753,21 +753,21 @@ final class IntVector256 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask256.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask256.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask256.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class IntVector256 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask256.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask256.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ final class IntVector256 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(IntMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.extract(IntMask256.class, LT_INT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -796,7 +796,7 @@ final class IntVector256 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, IntMask256.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask256)m).getBits()));
|
||||
}
|
||||
@ -804,7 +804,7 @@ final class IntVector256 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, IntMask256.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask256)m).getBits()));
|
||||
}
|
||||
@ -812,7 +812,7 @@ final class IntVector256 extends IntVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static IntMask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(IntMask256.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(IntMask256.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ final class IntVector512 extends IntVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
int[] vecarr = vec.vec();
|
||||
@ -594,7 +594,7 @@ final class IntVector512 extends IntVector {
|
||||
@ForceInline
|
||||
public IntVector512 withLaneHelper(int i, int e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
int[] res = v.vec().clone();
|
||||
@ -699,7 +699,7 @@ final class IntVector512 extends IntVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_INT, VLENGTH,
|
||||
this.getClass(), LT_INT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -710,7 +710,7 @@ final class IntVector512 extends IntVector {
|
||||
/*package-private*/
|
||||
IntMask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (IntMask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
IntMask512.class, T_INT, VLENGTH, offset, limit,
|
||||
IntMask512.class, LT_INT, VLENGTH, offset, limit,
|
||||
(o, l) -> (IntMask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ final class IntVector512 extends IntVector {
|
||||
@ForceInline
|
||||
public IntMask512 compress() {
|
||||
return (IntMask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
IntVector512.class, IntMask512.class, T_INT, VLENGTH, null, this,
|
||||
IntVector512.class, IntMask512.class, LT_INT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -739,7 +739,7 @@ final class IntVector512 extends IntVector {
|
||||
public IntMask512 and(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask512 m = (IntMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask512.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask512.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -749,7 +749,7 @@ final class IntVector512 extends IntVector {
|
||||
public IntMask512 or(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask512 m = (IntMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask512.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask512.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -759,7 +759,7 @@ final class IntVector512 extends IntVector {
|
||||
public IntMask512 xor(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask512 m = (IntMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask512.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask512.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -769,21 +769,21 @@ final class IntVector512 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask512.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask512.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask512.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -793,7 +793,7 @@ final class IntVector512 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask512.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask512.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -803,7 +803,7 @@ final class IntVector512 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(IntMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.extract(IntMask512.class, LT_INT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -812,7 +812,7 @@ final class IntVector512 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, IntMask512.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask512)m).getBits()));
|
||||
}
|
||||
@ -820,7 +820,7 @@ final class IntVector512 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, IntMask512.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask512)m).getBits()));
|
||||
}
|
||||
@ -828,7 +828,7 @@ final class IntVector512 extends IntVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static IntMask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(IntMask512.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(IntMask512.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -545,7 +545,7 @@ final class IntVector64 extends IntVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
int[] vecarr = vec.vec();
|
||||
@ -566,7 +566,7 @@ final class IntVector64 extends IntVector {
|
||||
@ForceInline
|
||||
public IntVector64 withLaneHelper(int i, int e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
int[] res = v.vec().clone();
|
||||
@ -671,7 +671,7 @@ final class IntVector64 extends IntVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_INT, VLENGTH,
|
||||
this.getClass(), LT_INT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -682,7 +682,7 @@ final class IntVector64 extends IntVector {
|
||||
/*package-private*/
|
||||
IntMask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (IntMask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
IntMask64.class, T_INT, VLENGTH, offset, limit,
|
||||
IntMask64.class, LT_INT, VLENGTH, offset, limit,
|
||||
(o, l) -> (IntMask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -698,7 +698,7 @@ final class IntVector64 extends IntVector {
|
||||
@ForceInline
|
||||
public IntMask64 compress() {
|
||||
return (IntMask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
IntVector64.class, IntMask64.class, T_INT, VLENGTH, null, this,
|
||||
IntVector64.class, IntMask64.class, LT_INT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -711,7 +711,7 @@ final class IntVector64 extends IntVector {
|
||||
public IntMask64 and(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask64 m = (IntMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask64.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMask64.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -721,7 +721,7 @@ final class IntVector64 extends IntVector {
|
||||
public IntMask64 or(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask64 m = (IntMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask64.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMask64.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -731,7 +731,7 @@ final class IntVector64 extends IntVector {
|
||||
public IntMask64 xor(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMask64 m = (IntMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask64.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMask64.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -741,21 +741,21 @@ final class IntVector64 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask64.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask64.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask64.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -765,7 +765,7 @@ final class IntVector64 extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask64.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMask64.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -775,7 +775,7 @@ final class IntVector64 extends IntVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(IntMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.extract(IntMask64.class, LT_INT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -784,7 +784,7 @@ final class IntVector64 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, IntMask64.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMask64)m).getBits()));
|
||||
}
|
||||
@ -792,7 +792,7 @@ final class IntVector64 extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, IntMask64.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMask64)m).getBits()));
|
||||
}
|
||||
@ -800,7 +800,7 @@ final class IntVector64 extends IntVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static IntMask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(IntMask64.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(IntMask64.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ final class IntVectorMax extends IntVector {
|
||||
@ForceInline
|
||||
public int laneHelper(int i) {
|
||||
return (int) VectorSupport.extract(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
int[] vecarr = vec.vec();
|
||||
@ -564,7 +564,7 @@ final class IntVectorMax extends IntVector {
|
||||
@ForceInline
|
||||
public IntVectorMax withLaneHelper(int i, int e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_INT, VLENGTH,
|
||||
VCLASS, LT_INT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
int[] res = v.vec().clone();
|
||||
@ -669,7 +669,7 @@ final class IntVectorMax extends IntVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_INT, VLENGTH,
|
||||
this.getClass(), LT_INT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -680,7 +680,7 @@ final class IntVectorMax extends IntVector {
|
||||
/*package-private*/
|
||||
IntMaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (IntMaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
IntMaskMax.class, T_INT, VLENGTH, offset, limit,
|
||||
IntMaskMax.class, LT_INT, VLENGTH, offset, limit,
|
||||
(o, l) -> (IntMaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -696,7 +696,7 @@ final class IntVectorMax extends IntVector {
|
||||
@ForceInline
|
||||
public IntMaskMax compress() {
|
||||
return (IntMaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
IntVectorMax.class, IntMaskMax.class, T_INT, VLENGTH, null, this,
|
||||
IntVectorMax.class, IntMaskMax.class, LT_INT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -709,7 +709,7 @@ final class IntVectorMax extends IntVector {
|
||||
public IntMaskMax and(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMaskMax m = (IntMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMaskMax.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, IntMaskMax.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -719,7 +719,7 @@ final class IntVectorMax extends IntVector {
|
||||
public IntMaskMax or(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMaskMax m = (IntMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMaskMax.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, IntMaskMax.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -729,7 +729,7 @@ final class IntVectorMax extends IntVector {
|
||||
public IntMaskMax xor(VectorMask<Integer> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
IntMaskMax m = (IntMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMaskMax.class, null, T_INT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, IntMaskMax.class, null, LT_INT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -739,21 +739,21 @@ final class IntVectorMax extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, IntMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, IntMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, IntMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -763,7 +763,7 @@ final class IntVectorMax extends IntVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMaskMax.class, T_INT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, IntMaskMax.class, LT_INT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -773,7 +773,7 @@ final class IntVectorMax extends IntVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(IntMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.extract(IntMaskMax.class, LT_INT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ final class IntVectorMax extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, IntMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, IntMaskMax.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((IntMaskMax)m).getBits()));
|
||||
}
|
||||
@ -790,7 +790,7 @@ final class IntVectorMax extends IntVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, IntMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, IntMaskMax.class, LT_INT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((IntMaskMax)m).getBits()));
|
||||
}
|
||||
@ -798,7 +798,7 @@ final class IntVectorMax extends IntVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static IntMaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(IntMaskMax.class, T_INT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(IntMaskMax.class, LT_INT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -35,13 +35,13 @@ import static jdk.incubator.vector.VectorIntrinsics.*;
|
||||
* It caches all sorts of goodies that we can't put on java.lang.Class.
|
||||
*/
|
||||
enum LaneType {
|
||||
FLOAT(float.class, Float.class, float[].class, 'F', 24, Float.SIZE, T_FLOAT, false, float.class),
|
||||
DOUBLE(double.class, Double.class, double[].class, 'F', 53, Double.SIZE, T_DOUBLE, false, double.class),
|
||||
BYTE(byte.class, Byte.class, byte[].class, 'I', -1, Byte.SIZE, T_BYTE, false, byte.class),
|
||||
SHORT(short.class, Short.class, short[].class, 'I', -1, Short.SIZE, T_SHORT, false, short.class),
|
||||
INT(int.class, Integer.class, int[].class, 'I', -1, Integer.SIZE, T_INT, false, int.class),
|
||||
LONG(long.class, Long.class, long[].class, 'I', -1, Long.SIZE, T_LONG, false, long.class),
|
||||
FLOAT16(Float16.class, Short.class, short[].class, 'F', 11, Float16.SIZE, T_FLOAT16, true, short.class);
|
||||
FLOAT(float.class, Float.class, float[].class, 'F', 24, Float.SIZE, LT_FLOAT, false, float.class),
|
||||
DOUBLE(double.class, Double.class, double[].class, 'F', 53, Double.SIZE, LT_DOUBLE, false, double.class),
|
||||
BYTE(byte.class, Byte.class, byte[].class, 'I', -1, Byte.SIZE, LT_BYTE, false, byte.class),
|
||||
SHORT(short.class, Short.class, short[].class, 'I', -1, Short.SIZE, LT_SHORT, false, short.class),
|
||||
INT(int.class, Integer.class, int[].class, 'I', -1, Integer.SIZE, LT_INT, false, int.class),
|
||||
LONG(long.class, Long.class, long[].class, 'I', -1, Long.SIZE, LT_LONG, false, long.class),
|
||||
FLOAT16(Float16.class, Short.class, short[].class, 'F', 11, Float16.SIZE, LT_FLOAT16, true, short.class);
|
||||
|
||||
LaneType(Class<?> elementType,
|
||||
Class<?> genericElementType,
|
||||
@ -49,7 +49,7 @@ enum LaneType {
|
||||
char elementKind,
|
||||
int elementPrecision,
|
||||
int elementSize,
|
||||
int basicType,
|
||||
int laneType,
|
||||
boolean syntheticBasicType,
|
||||
Class<?> carrierType) {
|
||||
if (elementPrecision <= 0)
|
||||
@ -72,12 +72,12 @@ enum LaneType {
|
||||
if (!syntheticBasicType) {
|
||||
assert("FDBSIL".indexOf(typeChar) == ordinal()) : this;
|
||||
// Same as in JVMS, org.objectweb.asm.Opcodes, etc.:
|
||||
assert(basicType ==
|
||||
assert(laneType ==
|
||||
( (elementSizeLog2 - /*lg(Byte.SIZE)*/ 3)
|
||||
| (elementKind == 'F' ? 4 : 8))) : this;
|
||||
assert("....zcFDBSILoav..".charAt(basicType) == typeChar);
|
||||
assert("....zcFDBSILoav..".charAt(laneType) == typeChar);
|
||||
}
|
||||
this.basicType = basicType;
|
||||
this.laneType = laneType;
|
||||
this.syntheticBasicType = syntheticBasicType;
|
||||
this.carrierType = carrierType;
|
||||
}
|
||||
@ -92,9 +92,9 @@ enum LaneType {
|
||||
final int switchKey; // 1+ordinal(), which is non-zero
|
||||
final String printName;
|
||||
final char typeChar; // one of "BSILFD"
|
||||
final int basicType; // lg(size/8) | (kind=='F'?4:kind=='I'?8)
|
||||
final int laneType; // lg(size/8) | (kind=='F'?4:kind=='I'?8)
|
||||
final boolean syntheticBasicType; // type like Float16 use existing 16bit short as carrier.
|
||||
// As per JLS they should be assigned T_OBJECT(12) basictype
|
||||
// As per JLS they should be assigned LT_OBJECT(12) basictype
|
||||
final Class<?> carrierType;
|
||||
|
||||
private @Stable LaneType asIntegral;
|
||||
@ -224,7 +224,7 @@ enum LaneType {
|
||||
LaneType[] values = values().clone();
|
||||
LaneType[] valuesByKey = new LaneType[1+values.length];
|
||||
LaneType[] valuesByC0 = new LaneType[C0_MASK+1];
|
||||
LaneType[] valuesByBT = new LaneType[BT_MASK+1];
|
||||
LaneType[] valuesByLT = new LaneType[BT_MASK+1];
|
||||
for (int ord = 0; ord < values.length; ord++) {
|
||||
int key = 1+ord;
|
||||
LaneType value = values[ord];
|
||||
@ -240,8 +240,8 @@ enum LaneType {
|
||||
c0 &= C0_MASK;
|
||||
assert(valuesByC0[c0] == null);
|
||||
valuesByC0[c0] = value;
|
||||
assert(valuesByBT[value.basicType] == null);
|
||||
valuesByBT[value.basicType] = value;
|
||||
assert(valuesByLT[value.laneType] == null);
|
||||
valuesByLT[value.laneType] = value;
|
||||
// set up asIntegral
|
||||
if (value.elementKind == 'I') {
|
||||
value.asIntegral = value;
|
||||
@ -287,15 +287,16 @@ enum LaneType {
|
||||
ENUM_VALUES = values;
|
||||
ENUM_FROM_SK = valuesByKey;
|
||||
ENUM_FROM_C0 = valuesByC0;
|
||||
ENUM_FROM_BT = valuesByBT;
|
||||
ENUM_FROM_BT = valuesByLT;
|
||||
}
|
||||
|
||||
static {
|
||||
assert(ofBasicType(T_FLOAT) == FLOAT);
|
||||
assert(ofBasicType(T_DOUBLE) == DOUBLE);
|
||||
assert(ofBasicType(T_BYTE) == BYTE);
|
||||
assert(ofBasicType(T_SHORT) == SHORT);
|
||||
assert(ofBasicType(T_INT) == INT);
|
||||
assert(ofBasicType(T_LONG) == LONG);
|
||||
assert(ofBasicType(LT_FLOAT) == FLOAT);
|
||||
assert(ofBasicType(LT_DOUBLE) == DOUBLE);
|
||||
assert(ofBasicType(LT_BYTE) == BYTE);
|
||||
assert(ofBasicType(LT_SHORT) == SHORT);
|
||||
assert(ofBasicType(LT_INT) == INT);
|
||||
assert(ofBasicType(LT_LONG) == LONG);
|
||||
assert(ofBasicType(LT_FLOAT16) == FLOAT16);
|
||||
}
|
||||
}
|
||||
|
||||
@ -612,7 +612,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
@ForceInline
|
||||
public static LongVector zero(VectorSpecies<Long> species) {
|
||||
LongSpecies vsp = (LongSpecies) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_LONG, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_LONG, species.length(),
|
||||
0, MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -692,7 +692,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_LONG, length(),
|
||||
opc, getClass(), null, LT_LONG, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, LongVector::unaryOperations));
|
||||
}
|
||||
@ -720,7 +720,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_LONG, length(),
|
||||
opc, getClass(), maskClass, LT_LONG, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, LongVector::unaryOperations));
|
||||
}
|
||||
@ -793,7 +793,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_LONG, length(),
|
||||
opc, getClass(), null, LT_LONG, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, LongVector::binaryOperations));
|
||||
}
|
||||
@ -844,7 +844,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_LONG, length(),
|
||||
opc, getClass(), maskClass, LT_LONG, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, LongVector::binaryOperations));
|
||||
}
|
||||
@ -990,7 +990,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), null, T_LONG, length(),
|
||||
opc, getClass(), null, LT_LONG, length(),
|
||||
this, e, null,
|
||||
BIN_INT_IMPL.find(op, opc, LongVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1011,7 +1011,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), maskClass, T_LONG, length(),
|
||||
opc, getClass(), maskClass, LT_LONG, length(),
|
||||
this, e, m,
|
||||
BIN_INT_IMPL.find(op, opc, LongVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1087,7 +1087,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_LONG, length(),
|
||||
opc, getClass(), null, LT_LONG, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, LongVector::ternaryOperations));
|
||||
}
|
||||
@ -1127,7 +1127,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_LONG, length(),
|
||||
opc, getClass(), maskClass, LT_LONG, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, LongVector::ternaryOperations));
|
||||
}
|
||||
@ -2007,7 +2007,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_LONG, length(),
|
||||
opc, getClass(), maskType, LT_LONG, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Long> m
|
||||
@ -2029,7 +2029,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_LONG, length(),
|
||||
opc, getClass(), maskType, LT_LONG, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Long> cmpM
|
||||
@ -2134,7 +2134,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
blendTemplate(Class<M> maskType, LongVector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_LONG, length(),
|
||||
getClass(), maskType, LT_LONG, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2151,7 +2151,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_LONG, length(),
|
||||
getClass(), LT_LONG, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2322,7 +2322,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongVector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_LONG, length(),
|
||||
getClass(), shuffletype, null, LT_LONG, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2349,7 +2349,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_LONG, length(),
|
||||
getClass(), shuffletype, masktype, LT_LONG, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2375,7 +2375,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
VectorMask<Long> valid = shuffle.laneIsValid();
|
||||
LongVector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_LONG, length(),
|
||||
getClass(), shuffletype, null, LT_LONG, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2383,7 +2383,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}));
|
||||
LongVector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_LONG, length(),
|
||||
getClass(), shuffletype, null, LT_LONG, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2433,7 +2433,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongVector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (LongVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_LONG, length(), this, m,
|
||||
LT_LONG, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2452,7 +2452,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongVector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (LongVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_LONG, length(), this, m,
|
||||
LT_LONG, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2467,7 +2467,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final LongVector selectFromTemplate(LongVector v) {
|
||||
return (LongVector)VectorSupport.selectFromOp(getClass(), null, T_LONG,
|
||||
return (LongVector)VectorSupport.selectFromOp(getClass(), null, LT_LONG,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2487,7 +2487,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
LongVector selectFromTemplate(LongVector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (LongVector)VectorSupport.selectFromOp(getClass(), masktype, T_LONG,
|
||||
return (LongVector)VectorSupport.selectFromOp(getClass(), masktype, LT_LONG,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2505,7 +2505,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final LongVector selectFromTemplate(LongVector v1, LongVector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_LONG, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_LONG, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2725,7 +2725,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_LONG, length(),
|
||||
opc, getClass(), maskClass, LT_LONG, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, LongVector::reductionOperations)));
|
||||
}
|
||||
@ -2743,7 +2743,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_LONG, length(),
|
||||
opc, getClass(), null, LT_LONG, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, LongVector::reductionOperations)));
|
||||
}
|
||||
@ -3019,7 +3019,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_LONG, vsp.laneCount(),
|
||||
vectorType, null, LT_LONG, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3505,7 +3505,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
vix = VectorIntrinsics.checkIndex(vix, a.length);
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_LONG, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_LONG, vsp.laneCount(),
|
||||
isp.vectorType(), isp.length(),
|
||||
a, ARRAY_BASE, vix, null, null, null, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3861,7 +3861,7 @@ public abstract class LongVector extends AbstractVector<Long> {
|
||||
final LongVector broadcastBits(long bits) {
|
||||
return (LongVector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_LONG, laneCount,
|
||||
vectorType, LT_LONG, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -535,7 +535,7 @@ final class LongVector128 extends LongVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
long[] vecarr = vec.vec();
|
||||
@ -556,7 +556,7 @@ final class LongVector128 extends LongVector {
|
||||
@ForceInline
|
||||
public LongVector128 withLaneHelper(int i, long e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
long[] res = v.vec().clone();
|
||||
@ -661,7 +661,7 @@ final class LongVector128 extends LongVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_LONG, VLENGTH,
|
||||
this.getClass(), LT_LONG, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -672,7 +672,7 @@ final class LongVector128 extends LongVector {
|
||||
/*package-private*/
|
||||
LongMask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (LongMask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
LongMask128.class, T_LONG, VLENGTH, offset, limit,
|
||||
LongMask128.class, LT_LONG, VLENGTH, offset, limit,
|
||||
(o, l) -> (LongMask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -688,7 +688,7 @@ final class LongVector128 extends LongVector {
|
||||
@ForceInline
|
||||
public LongMask128 compress() {
|
||||
return (LongMask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
LongVector128.class, LongMask128.class, T_LONG, VLENGTH, null, this,
|
||||
LongVector128.class, LongMask128.class, LT_LONG, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -701,7 +701,7 @@ final class LongVector128 extends LongVector {
|
||||
public LongMask128 and(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask128 m = (LongMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask128.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask128.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -711,7 +711,7 @@ final class LongVector128 extends LongVector {
|
||||
public LongMask128 or(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask128 m = (LongMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask128.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask128.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -721,7 +721,7 @@ final class LongVector128 extends LongVector {
|
||||
public LongMask128 xor(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask128 m = (LongMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask128.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask128.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -731,21 +731,21 @@ final class LongVector128 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -755,7 +755,7 @@ final class LongVector128 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask128.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask128.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -765,7 +765,7 @@ final class LongVector128 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(LongMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.extract(LongMask128.class, LT_LONG, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -774,7 +774,7 @@ final class LongVector128 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, LongMask128.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask128)m).getBits()));
|
||||
}
|
||||
@ -782,7 +782,7 @@ final class LongVector128 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, LongMask128.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask128)m).getBits()));
|
||||
}
|
||||
@ -790,7 +790,7 @@ final class LongVector128 extends LongVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static LongMask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(LongMask128.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(LongMask128.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -537,7 +537,7 @@ final class LongVector256 extends LongVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
long[] vecarr = vec.vec();
|
||||
@ -560,7 +560,7 @@ final class LongVector256 extends LongVector {
|
||||
@ForceInline
|
||||
public LongVector256 withLaneHelper(int i, long e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
long[] res = v.vec().clone();
|
||||
@ -665,7 +665,7 @@ final class LongVector256 extends LongVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_LONG, VLENGTH,
|
||||
this.getClass(), LT_LONG, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -676,7 +676,7 @@ final class LongVector256 extends LongVector {
|
||||
/*package-private*/
|
||||
LongMask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (LongMask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
LongMask256.class, T_LONG, VLENGTH, offset, limit,
|
||||
LongMask256.class, LT_LONG, VLENGTH, offset, limit,
|
||||
(o, l) -> (LongMask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -692,7 +692,7 @@ final class LongVector256 extends LongVector {
|
||||
@ForceInline
|
||||
public LongMask256 compress() {
|
||||
return (LongMask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
LongVector256.class, LongMask256.class, T_LONG, VLENGTH, null, this,
|
||||
LongVector256.class, LongMask256.class, LT_LONG, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -705,7 +705,7 @@ final class LongVector256 extends LongVector {
|
||||
public LongMask256 and(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask256 m = (LongMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask256.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask256.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -715,7 +715,7 @@ final class LongVector256 extends LongVector {
|
||||
public LongMask256 or(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask256 m = (LongMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask256.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask256.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -725,7 +725,7 @@ final class LongVector256 extends LongVector {
|
||||
public LongMask256 xor(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask256 m = (LongMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask256.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask256.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -735,21 +735,21 @@ final class LongVector256 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -759,7 +759,7 @@ final class LongVector256 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask256.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask256.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -769,7 +769,7 @@ final class LongVector256 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(LongMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.extract(LongMask256.class, LT_LONG, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -778,7 +778,7 @@ final class LongVector256 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, LongMask256.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask256)m).getBits()));
|
||||
}
|
||||
@ -786,7 +786,7 @@ final class LongVector256 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, LongMask256.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask256)m).getBits()));
|
||||
}
|
||||
@ -794,7 +794,7 @@ final class LongVector256 extends LongVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static LongMask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(LongMask256.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(LongMask256.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -541,7 +541,7 @@ final class LongVector512 extends LongVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
long[] vecarr = vec.vec();
|
||||
@ -568,7 +568,7 @@ final class LongVector512 extends LongVector {
|
||||
@ForceInline
|
||||
public LongVector512 withLaneHelper(int i, long e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
long[] res = v.vec().clone();
|
||||
@ -673,7 +673,7 @@ final class LongVector512 extends LongVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_LONG, VLENGTH,
|
||||
this.getClass(), LT_LONG, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -684,7 +684,7 @@ final class LongVector512 extends LongVector {
|
||||
/*package-private*/
|
||||
LongMask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (LongMask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
LongMask512.class, T_LONG, VLENGTH, offset, limit,
|
||||
LongMask512.class, LT_LONG, VLENGTH, offset, limit,
|
||||
(o, l) -> (LongMask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -700,7 +700,7 @@ final class LongVector512 extends LongVector {
|
||||
@ForceInline
|
||||
public LongMask512 compress() {
|
||||
return (LongMask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
LongVector512.class, LongMask512.class, T_LONG, VLENGTH, null, this,
|
||||
LongVector512.class, LongMask512.class, LT_LONG, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -713,7 +713,7 @@ final class LongVector512 extends LongVector {
|
||||
public LongMask512 and(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask512 m = (LongMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask512.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask512.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -723,7 +723,7 @@ final class LongVector512 extends LongVector {
|
||||
public LongMask512 or(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask512 m = (LongMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask512.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask512.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -733,7 +733,7 @@ final class LongVector512 extends LongVector {
|
||||
public LongMask512 xor(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask512 m = (LongMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask512.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask512.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -743,21 +743,21 @@ final class LongVector512 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -767,7 +767,7 @@ final class LongVector512 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask512.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask512.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class LongVector512 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(LongMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.extract(LongMask512.class, LT_LONG, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -786,7 +786,7 @@ final class LongVector512 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, LongMask512.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask512)m).getBits()));
|
||||
}
|
||||
@ -794,7 +794,7 @@ final class LongVector512 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, LongMask512.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask512)m).getBits()));
|
||||
}
|
||||
@ -802,7 +802,7 @@ final class LongVector512 extends LongVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static LongMask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(LongMask512.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(LongMask512.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ final class LongVector64 extends LongVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
long[] vecarr = vec.vec();
|
||||
@ -554,7 +554,7 @@ final class LongVector64 extends LongVector {
|
||||
@ForceInline
|
||||
public LongVector64 withLaneHelper(int i, long e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
long[] res = v.vec().clone();
|
||||
@ -659,7 +659,7 @@ final class LongVector64 extends LongVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_LONG, VLENGTH,
|
||||
this.getClass(), LT_LONG, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -670,7 +670,7 @@ final class LongVector64 extends LongVector {
|
||||
/*package-private*/
|
||||
LongMask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (LongMask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
LongMask64.class, T_LONG, VLENGTH, offset, limit,
|
||||
LongMask64.class, LT_LONG, VLENGTH, offset, limit,
|
||||
(o, l) -> (LongMask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -686,7 +686,7 @@ final class LongVector64 extends LongVector {
|
||||
@ForceInline
|
||||
public LongMask64 compress() {
|
||||
return (LongMask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
LongVector64.class, LongMask64.class, T_LONG, VLENGTH, null, this,
|
||||
LongVector64.class, LongMask64.class, LT_LONG, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -699,7 +699,7 @@ final class LongVector64 extends LongVector {
|
||||
public LongMask64 and(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask64 m = (LongMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask64.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMask64.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -709,7 +709,7 @@ final class LongVector64 extends LongVector {
|
||||
public LongMask64 or(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask64 m = (LongMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask64.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMask64.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -719,7 +719,7 @@ final class LongVector64 extends LongVector {
|
||||
public LongMask64 xor(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMask64 m = (LongMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask64.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMask64.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -729,21 +729,21 @@ final class LongVector64 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -753,7 +753,7 @@ final class LongVector64 extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask64.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMask64.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -763,7 +763,7 @@ final class LongVector64 extends LongVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(LongMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.extract(LongMask64.class, LT_LONG, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ final class LongVector64 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, LongMask64.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMask64)m).getBits()));
|
||||
}
|
||||
@ -780,7 +780,7 @@ final class LongVector64 extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, LongMask64.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMask64)m).getBits()));
|
||||
}
|
||||
@ -788,7 +788,7 @@ final class LongVector64 extends LongVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static LongMask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(LongMask64.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(LongMask64.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ final class LongVectorMax extends LongVector {
|
||||
@ForceInline
|
||||
public long laneHelper(int i) {
|
||||
return (long) VectorSupport.extract(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
long[] vecarr = vec.vec();
|
||||
@ -554,7 +554,7 @@ final class LongVectorMax extends LongVector {
|
||||
@ForceInline
|
||||
public LongVectorMax withLaneHelper(int i, long e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_LONG, VLENGTH,
|
||||
VCLASS, LT_LONG, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
long[] res = v.vec().clone();
|
||||
@ -659,7 +659,7 @@ final class LongVectorMax extends LongVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_LONG, VLENGTH,
|
||||
this.getClass(), LT_LONG, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -670,7 +670,7 @@ final class LongVectorMax extends LongVector {
|
||||
/*package-private*/
|
||||
LongMaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (LongMaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
LongMaskMax.class, T_LONG, VLENGTH, offset, limit,
|
||||
LongMaskMax.class, LT_LONG, VLENGTH, offset, limit,
|
||||
(o, l) -> (LongMaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -686,7 +686,7 @@ final class LongVectorMax extends LongVector {
|
||||
@ForceInline
|
||||
public LongMaskMax compress() {
|
||||
return (LongMaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
LongVectorMax.class, LongMaskMax.class, T_LONG, VLENGTH, null, this,
|
||||
LongVectorMax.class, LongMaskMax.class, LT_LONG, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -699,7 +699,7 @@ final class LongVectorMax extends LongVector {
|
||||
public LongMaskMax and(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMaskMax m = (LongMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMaskMax.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, LongMaskMax.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -709,7 +709,7 @@ final class LongVectorMax extends LongVector {
|
||||
public LongMaskMax or(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMaskMax m = (LongMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMaskMax.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, LongMaskMax.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -719,7 +719,7 @@ final class LongVectorMax extends LongVector {
|
||||
public LongMaskMax xor(VectorMask<Long> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
LongMaskMax m = (LongMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMaskMax.class, null, T_LONG, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMaskMax.class, null, LT_LONG, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -729,21 +729,21 @@ final class LongVectorMax extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -753,7 +753,7 @@ final class LongVectorMax extends LongVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMaskMax.class, T_LONG, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMaskMax.class, LT_LONG, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -763,7 +763,7 @@ final class LongVectorMax extends LongVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(LongMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.extract(LongMaskMax.class, LT_LONG, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -772,7 +772,7 @@ final class LongVectorMax extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, LongMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, LongMaskMax.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((LongMaskMax)m).getBits()));
|
||||
}
|
||||
@ -780,7 +780,7 @@ final class LongVectorMax extends LongVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, LongMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, LongMaskMax.class, LT_LONG, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((LongMaskMax)m).getBits()));
|
||||
}
|
||||
@ -788,7 +788,7 @@ final class LongVectorMax extends LongVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static LongMaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(LongMaskMax.class, T_LONG, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(LongMaskMax.class, LT_LONG, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -612,7 +612,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
@ForceInline
|
||||
public static ShortVector zero(VectorSpecies<Short> species) {
|
||||
ShortSpecies vsp = (ShortSpecies) species;
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), T_SHORT, species.length(),
|
||||
return VectorSupport.fromBitsCoerced(vsp.vectorType(), LT_SHORT, species.length(),
|
||||
0, MODE_BROADCAST, vsp,
|
||||
((bits_, s_) -> s_.rvOp(i -> bits_)));
|
||||
}
|
||||
@ -734,7 +734,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), null, T_SHORT, length(),
|
||||
opc, getClass(), null, LT_SHORT, length(),
|
||||
this, null,
|
||||
UN_IMPL.find(op, opc, ShortVector::unaryOperations));
|
||||
}
|
||||
@ -762,7 +762,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.unaryOp(
|
||||
opc, getClass(), maskClass, T_SHORT, length(),
|
||||
opc, getClass(), maskClass, LT_SHORT, length(),
|
||||
this, m,
|
||||
UN_IMPL.find(op, opc, ShortVector::unaryOperations));
|
||||
}
|
||||
@ -835,7 +835,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), null, T_SHORT, length(),
|
||||
opc, getClass(), null, LT_SHORT, length(),
|
||||
this, that, null,
|
||||
BIN_IMPL.find(op, opc, ShortVector::binaryOperations));
|
||||
}
|
||||
@ -886,7 +886,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.binaryOp(
|
||||
opc, getClass(), maskClass, T_SHORT, length(),
|
||||
opc, getClass(), maskClass, LT_SHORT, length(),
|
||||
this, that, m,
|
||||
BIN_IMPL.find(op, opc, ShortVector::binaryOperations));
|
||||
}
|
||||
@ -1073,7 +1073,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), null, T_SHORT, length(),
|
||||
opc, getClass(), null, LT_SHORT, length(),
|
||||
this, e, null,
|
||||
BIN_INT_IMPL.find(op, opc, ShortVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1094,7 +1094,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
e &= SHIFT_MASK;
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.broadcastInt(
|
||||
opc, getClass(), maskClass, T_SHORT, length(),
|
||||
opc, getClass(), maskClass, LT_SHORT, length(),
|
||||
this, e, m,
|
||||
BIN_INT_IMPL.find(op, opc, ShortVector::broadcastIntOperations));
|
||||
}
|
||||
@ -1171,7 +1171,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), null, T_SHORT, length(),
|
||||
opc, getClass(), null, LT_SHORT, length(),
|
||||
this, that, tother, null,
|
||||
TERN_IMPL.find(op, opc, ShortVector::ternaryOperations));
|
||||
}
|
||||
@ -1211,7 +1211,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.ternaryOp(
|
||||
opc, getClass(), maskClass, T_SHORT, length(),
|
||||
opc, getClass(), maskClass, LT_SHORT, length(),
|
||||
this, that, tother, m,
|
||||
TERN_IMPL.find(op, opc, ShortVector::ternaryOperations));
|
||||
}
|
||||
@ -2110,7 +2110,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
that.check(this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_SHORT, length(),
|
||||
opc, getClass(), maskType, LT_SHORT, length(),
|
||||
this, that, null,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Short> m
|
||||
@ -2132,7 +2132,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
m.check(maskType, this);
|
||||
int opc = opCode(op);
|
||||
return VectorSupport.compare(
|
||||
opc, getClass(), maskType, T_SHORT, length(),
|
||||
opc, getClass(), maskType, LT_SHORT, length(),
|
||||
this, that, m,
|
||||
(cond, v0, v1, m1) -> {
|
||||
AbstractMask<Short> cmpM
|
||||
@ -2263,7 +2263,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
blendTemplate(Class<M> maskType, ShortVector v, M m) {
|
||||
v.check(this);
|
||||
return VectorSupport.blend(
|
||||
getClass(), maskType, T_SHORT, length(),
|
||||
getClass(), maskType, LT_SHORT, length(),
|
||||
this, v, m,
|
||||
(v0, v1, m_) -> v0.bOp(v1, m_, (i, a, b) -> b));
|
||||
}
|
||||
@ -2280,7 +2280,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
// make sure VLENGTH*scale doesn't overflow:
|
||||
vsp.checkScale(scale);
|
||||
return VectorSupport.indexVector(
|
||||
getClass(), T_SHORT, length(),
|
||||
getClass(), LT_SHORT, length(),
|
||||
this, scale, vsp,
|
||||
(v, scale_, s)
|
||||
-> {
|
||||
@ -2472,7 +2472,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector rearrangeTemplate(Class<S> shuffletype, S shuffle) {
|
||||
Objects.requireNonNull(shuffle);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_SHORT, length(),
|
||||
getClass(), shuffletype, null, LT_SHORT, length(),
|
||||
this, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2499,7 +2499,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
Objects.requireNonNull(shuffle);
|
||||
m.check(masktype, this);
|
||||
return VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, masktype, T_SHORT, length(),
|
||||
getClass(), shuffletype, masktype, LT_SHORT, length(),
|
||||
this, shuffle, m,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2525,7 +2525,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
VectorMask<Short> valid = shuffle.laneIsValid();
|
||||
ShortVector r0 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_SHORT, length(),
|
||||
getClass(), shuffletype, null, LT_SHORT, length(),
|
||||
this, shuffle, null,
|
||||
(v0, s_, m_) -> v0.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v0.length());
|
||||
@ -2533,7 +2533,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}));
|
||||
ShortVector r1 =
|
||||
VectorSupport.rearrangeOp(
|
||||
getClass(), shuffletype, null, T_SHORT, length(),
|
||||
getClass(), shuffletype, null, LT_SHORT, length(),
|
||||
v, shuffle, null,
|
||||
(v1, s_, m_) -> v1.sOp((i, a) -> {
|
||||
int ei = Integer.remainderUnsigned(s_.laneSource(i), v1.length());
|
||||
@ -2583,7 +2583,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector compressTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (ShortVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_COMPRESS, getClass(), masktype,
|
||||
T_SHORT, length(), this, m,
|
||||
LT_SHORT, length(), this, m,
|
||||
(v1, m1) -> compressHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2602,7 +2602,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector expandTemplate(Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (ShortVector) VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_EXPAND, getClass(), masktype,
|
||||
T_SHORT, length(), this, m,
|
||||
LT_SHORT, length(), this, m,
|
||||
(v1, m1) -> expandHelper(v1, m1));
|
||||
}
|
||||
|
||||
@ -2617,7 +2617,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final ShortVector selectFromTemplate(ShortVector v) {
|
||||
return (ShortVector)VectorSupport.selectFromOp(getClass(), null, T_SHORT,
|
||||
return (ShortVector)VectorSupport.selectFromOp(getClass(), null, LT_SHORT,
|
||||
length(), this, v, null,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle()));
|
||||
@ -2637,7 +2637,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
ShortVector selectFromTemplate(ShortVector v,
|
||||
Class<M> masktype, M m) {
|
||||
m.check(masktype, this);
|
||||
return (ShortVector)VectorSupport.selectFromOp(getClass(), masktype, T_SHORT,
|
||||
return (ShortVector)VectorSupport.selectFromOp(getClass(), masktype, LT_SHORT,
|
||||
length(), this, v, m,
|
||||
(v1, v2, _m) ->
|
||||
v2.rearrange(v1.toShuffle(), _m));
|
||||
@ -2655,7 +2655,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
/*package-private*/
|
||||
@ForceInline
|
||||
final ShortVector selectFromTemplate(ShortVector v1, ShortVector v2) {
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), T_SHORT, length(), this, v1, v2,
|
||||
return VectorSupport.selectFromTwoVectorOp(getClass(), LT_SHORT, length(), this, v1, v2,
|
||||
(vec1, vec2, vec3) -> selectFromTwoVectorHelper(vec1, vec2, vec3));
|
||||
}
|
||||
|
||||
@ -2875,7 +2875,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), maskClass, T_SHORT, length(),
|
||||
opc, getClass(), maskClass, LT_SHORT, length(),
|
||||
this, m,
|
||||
REDUCE_IMPL.find(op, opc, ShortVector::reductionOperations)));
|
||||
}
|
||||
@ -2893,7 +2893,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
int opc = opCode(op);
|
||||
return fromBits(VectorSupport.reductionCoerced(
|
||||
opc, getClass(), null, T_SHORT, length(),
|
||||
opc, getClass(), null, LT_SHORT, length(),
|
||||
this, null,
|
||||
REDUCE_IMPL.find(op, opc, ShortVector::reductionOperations)));
|
||||
}
|
||||
@ -3177,7 +3177,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, null, T_SHORT, vsp.laneCount(),
|
||||
vectorType, null, LT_SHORT, vsp.laneCount(),
|
||||
lsp.vectorType(), lsp.length(),
|
||||
a, ARRAY_BASE, vix0, vix1, null, null, null,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -3928,7 +3928,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
}
|
||||
|
||||
return VectorSupport.loadWithMap(
|
||||
vectorType, maskClass, T_SHORT, vsp.laneCount(),
|
||||
vectorType, maskClass, LT_SHORT, vsp.laneCount(),
|
||||
lsp.vectorType(), lsp.length(),
|
||||
a, ARRAY_BASE, vix0, vix1, null, null, m,
|
||||
a, offset, indexMap, mapOffset, vsp,
|
||||
@ -4296,7 +4296,7 @@ public abstract class ShortVector extends AbstractVector<Short> {
|
||||
final ShortVector broadcastBits(long bits) {
|
||||
return (ShortVector)
|
||||
VectorSupport.fromBitsCoerced(
|
||||
vectorType, T_SHORT, laneCount,
|
||||
vectorType, LT_SHORT, laneCount,
|
||||
bits, MODE_BROADCAST, this,
|
||||
(bits_, s_) -> s_.rvOp(i -> bits_));
|
||||
}
|
||||
|
||||
@ -551,7 +551,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -578,7 +578,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortVector128 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -683,7 +683,7 @@ final class ShortVector128 extends ShortVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_SHORT, VLENGTH,
|
||||
this.getClass(), LT_SHORT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -694,7 +694,7 @@ final class ShortVector128 extends ShortVector {
|
||||
/*package-private*/
|
||||
ShortMask128 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ShortMask128) VectorSupport.indexPartiallyInUpperRange(
|
||||
ShortMask128.class, T_SHORT, VLENGTH, offset, limit,
|
||||
ShortMask128.class, LT_SHORT, VLENGTH, offset, limit,
|
||||
(o, l) -> (ShortMask128) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -710,7 +710,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortMask128 compress() {
|
||||
return (ShortMask128)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ShortVector128.class, ShortMask128.class, T_SHORT, VLENGTH, null, this,
|
||||
ShortVector128.class, ShortMask128.class, LT_SHORT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -723,7 +723,7 @@ final class ShortVector128 extends ShortVector {
|
||||
public ShortMask128 and(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask128 m = (ShortMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask128.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask128.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -733,7 +733,7 @@ final class ShortVector128 extends ShortVector {
|
||||
public ShortMask128 or(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask128 m = (ShortMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask128.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask128.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -743,7 +743,7 @@ final class ShortVector128 extends ShortVector {
|
||||
public ShortMask128 xor(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask128 m = (ShortMask128)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask128.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask128.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -753,21 +753,21 @@ final class ShortVector128 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -777,7 +777,7 @@ final class ShortVector128 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask128.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask128.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ShortMask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.extract(ShortMask128.class, LT_SHORT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -796,7 +796,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ShortMask128.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask128)m).getBits()));
|
||||
}
|
||||
@ -804,7 +804,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ShortMask128.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask128)m).getBits()));
|
||||
}
|
||||
@ -812,7 +812,7 @@ final class ShortVector128 extends ShortVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ShortMask128 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ShortMask128.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ShortMask128.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -559,7 +559,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -594,7 +594,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortVector256 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -699,7 +699,7 @@ final class ShortVector256 extends ShortVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_SHORT, VLENGTH,
|
||||
this.getClass(), LT_SHORT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -710,7 +710,7 @@ final class ShortVector256 extends ShortVector {
|
||||
/*package-private*/
|
||||
ShortMask256 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ShortMask256) VectorSupport.indexPartiallyInUpperRange(
|
||||
ShortMask256.class, T_SHORT, VLENGTH, offset, limit,
|
||||
ShortMask256.class, LT_SHORT, VLENGTH, offset, limit,
|
||||
(o, l) -> (ShortMask256) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -726,7 +726,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortMask256 compress() {
|
||||
return (ShortMask256)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ShortVector256.class, ShortMask256.class, T_SHORT, VLENGTH, null, this,
|
||||
ShortVector256.class, ShortMask256.class, LT_SHORT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -739,7 +739,7 @@ final class ShortVector256 extends ShortVector {
|
||||
public ShortMask256 and(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask256 m = (ShortMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask256.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask256.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -749,7 +749,7 @@ final class ShortVector256 extends ShortVector {
|
||||
public ShortMask256 or(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask256 m = (ShortMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask256.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask256.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -759,7 +759,7 @@ final class ShortVector256 extends ShortVector {
|
||||
public ShortMask256 xor(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask256 m = (ShortMask256)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask256.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask256.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -769,21 +769,21 @@ final class ShortVector256 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -793,7 +793,7 @@ final class ShortVector256 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask256.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask256.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -803,7 +803,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ShortMask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.extract(ShortMask256.class, LT_SHORT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -812,7 +812,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ShortMask256.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask256)m).getBits()));
|
||||
}
|
||||
@ -820,7 +820,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ShortMask256.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask256)m).getBits()));
|
||||
}
|
||||
@ -828,7 +828,7 @@ final class ShortVector256 extends ShortVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ShortMask256 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ShortMask256.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ShortMask256.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -575,7 +575,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -626,7 +626,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortVector512 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -731,7 +731,7 @@ final class ShortVector512 extends ShortVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_SHORT, VLENGTH,
|
||||
this.getClass(), LT_SHORT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -742,7 +742,7 @@ final class ShortVector512 extends ShortVector {
|
||||
/*package-private*/
|
||||
ShortMask512 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ShortMask512) VectorSupport.indexPartiallyInUpperRange(
|
||||
ShortMask512.class, T_SHORT, VLENGTH, offset, limit,
|
||||
ShortMask512.class, LT_SHORT, VLENGTH, offset, limit,
|
||||
(o, l) -> (ShortMask512) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -758,7 +758,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortMask512 compress() {
|
||||
return (ShortMask512)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ShortVector512.class, ShortMask512.class, T_SHORT, VLENGTH, null, this,
|
||||
ShortVector512.class, ShortMask512.class, LT_SHORT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -771,7 +771,7 @@ final class ShortVector512 extends ShortVector {
|
||||
public ShortMask512 and(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask512 m = (ShortMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask512.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask512.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -781,7 +781,7 @@ final class ShortVector512 extends ShortVector {
|
||||
public ShortMask512 or(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask512 m = (ShortMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask512.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask512.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -791,7 +791,7 @@ final class ShortVector512 extends ShortVector {
|
||||
public ShortMask512 xor(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask512 m = (ShortMask512)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask512.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask512.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -801,21 +801,21 @@ final class ShortVector512 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -825,7 +825,7 @@ final class ShortVector512 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask512.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask512.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -835,7 +835,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ShortMask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.extract(ShortMask512.class, LT_SHORT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -844,7 +844,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ShortMask512.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask512)m).getBits()));
|
||||
}
|
||||
@ -852,7 +852,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ShortMask512.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask512)m).getBits()));
|
||||
}
|
||||
@ -860,7 +860,7 @@ final class ShortVector512 extends ShortVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ShortMask512 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ShortMask512.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ShortMask512.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -547,7 +547,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -570,7 +570,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortVector64 withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -675,7 +675,7 @@ final class ShortVector64 extends ShortVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_SHORT, VLENGTH,
|
||||
this.getClass(), LT_SHORT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -686,7 +686,7 @@ final class ShortVector64 extends ShortVector {
|
||||
/*package-private*/
|
||||
ShortMask64 indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ShortMask64) VectorSupport.indexPartiallyInUpperRange(
|
||||
ShortMask64.class, T_SHORT, VLENGTH, offset, limit,
|
||||
ShortMask64.class, LT_SHORT, VLENGTH, offset, limit,
|
||||
(o, l) -> (ShortMask64) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -702,7 +702,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortMask64 compress() {
|
||||
return (ShortMask64)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ShortVector64.class, ShortMask64.class, T_SHORT, VLENGTH, null, this,
|
||||
ShortVector64.class, ShortMask64.class, LT_SHORT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -715,7 +715,7 @@ final class ShortVector64 extends ShortVector {
|
||||
public ShortMask64 and(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask64 m = (ShortMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask64.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMask64.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -725,7 +725,7 @@ final class ShortVector64 extends ShortVector {
|
||||
public ShortMask64 or(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask64 m = (ShortMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask64.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMask64.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -735,7 +735,7 @@ final class ShortVector64 extends ShortVector {
|
||||
public ShortMask64 xor(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMask64 m = (ShortMask64)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask64.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMask64.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -745,21 +745,21 @@ final class ShortVector64 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -769,7 +769,7 @@ final class ShortVector64 extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask64.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMask64.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -779,7 +779,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ShortMask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.extract(ShortMask64.class, LT_SHORT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -788,7 +788,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ShortMask64.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMask64)m).getBits()));
|
||||
}
|
||||
@ -796,7 +796,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ShortMask64.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMask64)m).getBits()));
|
||||
}
|
||||
@ -804,7 +804,7 @@ final class ShortVector64 extends ShortVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ShortMask64 maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ShortMask64.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ShortMask64.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -544,7 +544,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@ForceInline
|
||||
public short laneHelper(int i) {
|
||||
return (short) VectorSupport.extract(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i,
|
||||
(vec, ix) -> {
|
||||
short[] vecarr = vec.vec();
|
||||
@ -564,7 +564,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortVectorMax withLaneHelper(int i, short e) {
|
||||
return VectorSupport.insert(
|
||||
VCLASS, T_SHORT, VLENGTH,
|
||||
VCLASS, LT_SHORT, VLENGTH,
|
||||
this, i, (long)e,
|
||||
(v, ix, bits) -> {
|
||||
short[] res = v.vec().clone();
|
||||
@ -669,7 +669,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
throw new IllegalArgumentException("VectorMask length and species length differ");
|
||||
|
||||
return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
|
||||
this.getClass(), T_SHORT, VLENGTH,
|
||||
this.getClass(), LT_SHORT, VLENGTH,
|
||||
species.maskType(), species.laneBasicType(), VLENGTH,
|
||||
this, species,
|
||||
(m, s) -> s.maskFactory(m.toArray()).check(s));
|
||||
@ -680,7 +680,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
/*package-private*/
|
||||
ShortMaskMax indexPartiallyInUpperRange(long offset, long limit) {
|
||||
return (ShortMaskMax) VectorSupport.indexPartiallyInUpperRange(
|
||||
ShortMaskMax.class, T_SHORT, VLENGTH, offset, limit,
|
||||
ShortMaskMax.class, LT_SHORT, VLENGTH, offset, limit,
|
||||
(o, l) -> (ShortMaskMax) TRUE_MASK.indexPartiallyInRange(o, l));
|
||||
}
|
||||
|
||||
@ -696,7 +696,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@ForceInline
|
||||
public ShortMaskMax compress() {
|
||||
return (ShortMaskMax)VectorSupport.compressExpandOp(VectorSupport.VECTOR_OP_MASK_COMPRESS,
|
||||
ShortVectorMax.class, ShortMaskMax.class, T_SHORT, VLENGTH, null, this,
|
||||
ShortVectorMax.class, ShortMaskMax.class, LT_SHORT, VLENGTH, null, this,
|
||||
(v1, m1) -> VSPECIES.iota().compare(VectorOperators.LT,
|
||||
m1.trueCount()));
|
||||
}
|
||||
@ -709,7 +709,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
public ShortMaskMax and(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMaskMax m = (ShortMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMaskMax.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_AND, ShortMaskMax.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
|
||||
}
|
||||
@ -719,7 +719,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
public ShortMaskMax or(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMaskMax m = (ShortMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMaskMax.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_OR, ShortMaskMax.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
|
||||
}
|
||||
@ -729,7 +729,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
public ShortMaskMax xor(VectorMask<Short> mask) {
|
||||
Objects.requireNonNull(mask);
|
||||
ShortMaskMax m = (ShortMaskMax)mask;
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMaskMax.class, null, T_SHORT, VLENGTH,
|
||||
return VectorSupport.binaryOp(VECTOR_OP_XOR, ShortMaskMax.class, null, LT_SHORT, VLENGTH,
|
||||
this, m, null,
|
||||
(m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
|
||||
}
|
||||
@ -739,21 +739,21 @@ final class ShortVectorMax extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public int trueCount() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, ShortMaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> trueCountHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int firstTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, ShortMaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> firstTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ForceInline
|
||||
public int lastTrue() {
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, ShortMaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> lastTrueHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -763,7 +763,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
if (length() > Long.SIZE) {
|
||||
throw new UnsupportedOperationException("too many lanes for one long");
|
||||
}
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMaskMax.class, T_SHORT, VLENGTH, this,
|
||||
return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, ShortMaskMax.class, LT_SHORT, VLENGTH, this,
|
||||
(m) -> toLongHelper(m.getBits()));
|
||||
}
|
||||
|
||||
@ -773,7 +773,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@ForceInline
|
||||
public boolean laneIsSet(int i) {
|
||||
Objects.checkIndex(i, length());
|
||||
return VectorSupport.extract(ShortMaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.extract(ShortMaskMax.class, LT_SHORT, VLENGTH,
|
||||
this, i, (m, idx) -> (m.getBits()[idx] ? 1L : 0L)) == 1L;
|
||||
}
|
||||
|
||||
@ -782,7 +782,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean anyTrue() {
|
||||
return VectorSupport.test(BT_ne, ShortMaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_ne, ShortMaskMax.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> anyTrueHelper(((ShortMaskMax)m).getBits()));
|
||||
}
|
||||
@ -790,7 +790,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@Override
|
||||
@ForceInline
|
||||
public boolean allTrue() {
|
||||
return VectorSupport.test(BT_overflow, ShortMaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.test(BT_overflow, ShortMaskMax.class, LT_SHORT, VLENGTH,
|
||||
this, vspecies().maskAll(true),
|
||||
(m, __) -> allTrueHelper(((ShortMaskMax)m).getBits()));
|
||||
}
|
||||
@ -798,7 +798,7 @@ final class ShortVectorMax extends ShortVector {
|
||||
@ForceInline
|
||||
/*package-private*/
|
||||
static ShortMaskMax maskAll(boolean bit) {
|
||||
return VectorSupport.fromBitsCoerced(ShortMaskMax.class, T_SHORT, VLENGTH,
|
||||
return VectorSupport.fromBitsCoerced(ShortMaskMax.class, LT_SHORT, VLENGTH,
|
||||
(bit ? -1 : 0), MODE_BROADCAST, null,
|
||||
(v, __) -> (v != 0 ? TRUE_MASK : FALSE_MASK));
|
||||
}
|
||||
|
||||
@ -842,8 +842,8 @@ public abstract class VectorOperators {
|
||||
|
||||
private static <E,F> ConversionImpl<E,F>
|
||||
convert(String name, char kind, Class<E> dom, Class<F> ran, int opCode, int flags) {
|
||||
int domran = ((LaneType.of(dom).basicType << VO_DOM_SHIFT) +
|
||||
(LaneType.of(ran).basicType << VO_RAN_SHIFT));
|
||||
int domran = ((LaneType.of(dom).laneType << VO_DOM_SHIFT) +
|
||||
(LaneType.of(ran).laneType << VO_RAN_SHIFT));
|
||||
if (opCode >= 0) {
|
||||
if ((opCode & VO_DOM_RAN_MASK) == 0) {
|
||||
opCode += domran;
|
||||
@ -1102,8 +1102,8 @@ public abstract class VectorOperators {
|
||||
String name;
|
||||
Class<?> domType = dom.elementType;
|
||||
Class<?> ranType = ran.elementType;
|
||||
int domCode = (dom.basicType << VO_DOM_SHIFT);
|
||||
int ranCode = (ran.basicType << VO_RAN_SHIFT);
|
||||
int domCode = (dom.laneType << VO_DOM_SHIFT);
|
||||
int ranCode = (ran.laneType << VO_RAN_SHIFT);
|
||||
int opCode = domCode + ranCode;
|
||||
switch (kind) {
|
||||
case 'I':
|
||||
@ -1189,8 +1189,8 @@ public abstract class VectorOperators {
|
||||
break;
|
||||
}
|
||||
assert((opc & VO_DOM_RAN_MASK) ==
|
||||
((dom.basicType << VO_DOM_SHIFT) +
|
||||
(ran.basicType << VO_RAN_SHIFT)));
|
||||
((dom.laneType << VO_DOM_SHIFT) +
|
||||
(ran.laneType << VO_RAN_SHIFT)));
|
||||
ConversionImpl<?,?>[] cache = cacheOf(conv.kind, dom);
|
||||
int ranKey = ran.switchKey;
|
||||
if (cache[ranKey] != conv) {
|
||||
|
||||
@ -93,8 +93,8 @@ do
|
||||
Byte)
|
||||
Wideboxtype=Integer
|
||||
sizeInBytes=1
|
||||
laneType=T_BYTE
|
||||
lanebitsType=T_BYTE
|
||||
laneType=LT_BYTE
|
||||
lanebitsType=LT_BYTE
|
||||
args="$args -KbyteOrShort"
|
||||
;;
|
||||
Short)
|
||||
@ -103,8 +103,8 @@ do
|
||||
Boxfptype=Float16
|
||||
Wideboxtype=Integer
|
||||
sizeInBytes=2
|
||||
laneType=T_SHORT
|
||||
lanebitsType=T_SHORT
|
||||
laneType=LT_SHORT
|
||||
lanebitsType=LT_SHORT
|
||||
args="$args -KbyteOrShort"
|
||||
;;
|
||||
Int)
|
||||
@ -116,8 +116,8 @@ do
|
||||
Fptype=Float
|
||||
Boxfptype=Float
|
||||
sizeInBytes=4
|
||||
laneType=T_INT
|
||||
lanebitsType=T_INT
|
||||
laneType=LT_INT
|
||||
lanebitsType=LT_INT
|
||||
args="$args -KintOrLong -KintOrFP -KintOrFloat"
|
||||
;;
|
||||
Long)
|
||||
@ -125,8 +125,8 @@ do
|
||||
Fptype=Double
|
||||
Boxfptype=Double
|
||||
sizeInBytes=8
|
||||
laneType=T_LONG
|
||||
lanebitsType=T_LONG
|
||||
laneType=LT_LONG
|
||||
lanebitsType=LT_LONG
|
||||
args="$args -KintOrLong -KlongOrDouble"
|
||||
;;
|
||||
Float)
|
||||
@ -136,8 +136,8 @@ do
|
||||
Bitstype=Int
|
||||
Boxbitstype=Integer
|
||||
sizeInBytes=4
|
||||
laneType=T_FLOAT
|
||||
lanebitsType=T_INT
|
||||
laneType=LT_FLOAT
|
||||
lanebitsType=LT_INT
|
||||
args="$args -KintOrFP -KintOrFloat"
|
||||
FPtype=FP32
|
||||
;;
|
||||
@ -148,8 +148,8 @@ do
|
||||
Bitstype=Long
|
||||
Boxbitstype=Long
|
||||
sizeInBytes=8
|
||||
laneType=T_DOUBLE
|
||||
lanebitsType=T_LONG
|
||||
laneType=LT_DOUBLE
|
||||
lanebitsType=LT_LONG
|
||||
args="$args -KintOrFP -KlongOrDouble"
|
||||
FPtype=FP64
|
||||
;;
|
||||
@ -166,8 +166,8 @@ do
|
||||
Boxtype=Float16
|
||||
elemtype=Float16
|
||||
ElemLayout=Short
|
||||
laneType=T_FLOAT16
|
||||
lanebitsType=T_SHORT
|
||||
laneType=LT_FLOAT16
|
||||
lanebitsType=LT_SHORT
|
||||
fallbacktype=float
|
||||
args="$args -KbyteOrShort -KshortOrFP -KshortOrFloat16"
|
||||
;;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2009, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2009, 2021, 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
|
||||
@ -57,10 +57,10 @@ public enum JavaKind {
|
||||
Double('D', 7, "double", 2, false, java.lang.Double.TYPE, java.lang.Double.class),
|
||||
|
||||
/** The Object kind, also used for arrays. */
|
||||
Object('A', 13, "Object", 1, false, null, null),
|
||||
Object('A', 12, "Object", 1, false, null, null),
|
||||
|
||||
/** The void kind. */
|
||||
Void('V', 15, "void", 0, false, java.lang.Void.TYPE, java.lang.Void.class),
|
||||
Void('V', 14, "void", 0, false, java.lang.Void.TYPE, java.lang.Void.class),
|
||||
|
||||
/** The non-type. */
|
||||
Illegal('-', 99, "illegal", 0, false, null, null);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user