< prev index next >

test/jdk/jdk/incubator/vector/AbstractVectorLoadStoreTest.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 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
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2022, 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
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 49,6 ***
--- 49,17 ---
                  return MemorySegment.allocateNative(s, ResourceScope.newImplicitScope())
                          .asByteBuffer()
                          .order(ByteOrder.nativeOrder());
              })
      );
+ 
+     static final List<IntFunction<MemorySegment>> MEMORY_SEGMENT_GENERATORS = List.of(
+             withToString("HMS", (int s) -> {
+                 return MemorySegment.allocateNative(s, ResourceScope.newImplicitScope());
+             }),
+             withToString("DMS", (int s) -> {
+                 byte[] b = new byte[s];
+                 return MemorySegment.ofArray(b);
+             })
+     );
+ 
  }
< prev index next >