summaryrefslogtreecommitdiffstats
path: root/src/java/com
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression (commit f733203dfbd034a6b1aa3eb2cd616437c982c435): Init of ↵Sven Gothel2011-07-221-2/+3
| | | | DEBUG and DEBUG_LOOKUP was removed, re-added.
* Reversed Type relocation ; Minor fixSven Gothel2011-07-2136-60/+28
| | | | | | | Reversed Type relocation (commit 92d6c9dc5fa72b01703456452c60822f36c14fff) from com.jogamp.gluegen.runtime.types back to com.jogamp.gluegen.cgram.types Enabled MemoryLayoutType.setLayouted(), avoiding double layout
* GlueGen proper size / alignment of primitive and compound types usage [2/2] ↵Sven Gothel2011-07-218-407/+433
| | | | | | | | | | | | | | | | | | | | | | | | | | - Fin MachineDesction == MD MD.StaticConfig: - enum for all supported static configs (ID -> MD) - verified at runtime: test runtime queried-MD versus static-MD, hard fail if not compatible (size/alignment) SizeThunk primitive sizes: - Add notion of fixed native size (eg. int64_t) and otherwise (eg. long) java struct 'wrappers' code generation: - single class using size/offset arrays of all MachineDescription configurations - at runtime the array idx is queried in static block - type aligment for not fixed-native-size types (SizeThunk, undef long/int) via StructAccessor junit test: - add float test - fix native code - add java (create, write) -> native (verify) test works (tested) on: linux 32/64 and windows 32/64
* minor refinementSven Gothel2011-07-202-32/+30
|
* FIX StructAccessor / JavaEmitter's struct-emitter: Using byte offsetsSven Gothel2011-07-202-167/+90
| | | | | | | | | | | | | | | | | | | | Problem: typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 "longBuffer.get(<type-sized index>)" is invalid, but "byteBuffer.getLong(<byte index>)" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good. FIXES 32bit unit test, works well (static) on 32/64 bit (unix). TODO: Respect diff alignment for OS/ARCH either by offset tables for all, or runtime computing.
* Cleanup: Platform CPU enum, MachineDescription,Sven Gothel2011-07-205-51/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Platform: - enum CPUFamily is part of CPUType - DALVIK -> ANDROID - ARM: ARM + ARMv[567] MachineDescription - self contained - static size/alignment Config (enum) for unix32, unix64, win32, win64 and armeabi - add 'long double' - Removed MachineDescription32Bit, MachineDescription64Bit - createStatic(..) uses OS/CPU to fetch best match if not at runtime FIXES: JavaEmitter's struct-emit: Proper 32/64 struct sizes TODO: StructAccessor's mapping to <Type>Buffer w/ index os sizeof(<Type>) doesn't work, since offset may not be multiple of sizeof(<Type>)! i.e. typedef struct { int8_t bits1; // +1 - 0 // +3 (p32) int32_t id; // +4 - 4 int8_t bits2; // +1 - 8 // +3 (p32) - int64_t long0; // +8 - 12 so "longBuffer.get(<type-sized index>)" is invalid, but "byteBuffer.getLong(<byte index>)" must be done. The actual impl. doesn't matter, hence dropping the other nio type mappings is good.
* Fix bad file rename/move: .jav -> .javaSven Gothel2011-07-181-0/+0
|
* - Moved most types and StructLayout to runtime package:Sven Gothel2011-07-1839-208/+344
| | | | | | | | | | | | | | | | | | | | | com.jogamp.gluegen.cgram.types -> com.jogamp.gluegen.runtime.types This is required for desired runtime memory layout. - Split CompoundType to StructType + UnionType - StructLayout: - Utilizing SizeThunk alignment - Alignment 1) Natural type alignment 2) Add Size 3) Trailing padding w/ largest element alignment - Only perform memory layout once for type. Status: - Unit test passes w/ static MachineDescriptor64Bit - FIXME static 32bit is faulty, uses 64bit size/alignment - TODO runtime struct layout to please all platforms w/o worrying
* GlueGen: Alignment Cleanup ..Sven Gothel2011-07-175-77/+110
| | | | | | | | | | - SizeThunk - rename: compute -> computeSize - add: computeAlignment - merge types: char -> int8, short -> int16 - 'int' and 'long' may differ -
* Clarify aligment docSven Gothel2011-07-171-7/+18
|
* Fix alignment query code docSven Gothel2011-07-171-3/+2
|
* GlueGen proper size / alignment of primitive and compound types usage [1/2] ↵Sven Gothel2011-07-1722-376/+566
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Preparation. Currently GlueGen fails for type long (size) and some alignments (see package.html). - The size and alignment values shall be queried at runtime. - Compound alignment needs to follow the described natural alignment (also @runtime). - - Build - add Linux Arm7 (EABI) - junit test - added compound/struct tests, pointing out the shortcomings of current impl. - package.html - Added alignment documentation - remove intptr.cfg - add GluGen types int8_t, int16_t, uint8_t, uint16_t - move MachineDescription* into runtime - Platform - has runtime MachineDescription - moved size, .. to MachineDescription - use enums for OSType, CPUArch and CPUType defined by os.name/os.arch, triggering exception if os/arch is not supported. This avoids Java String comparison and conscious os/arch detection. - MachineDescription: - compile time instances MachineDescription32Bits, MachineDescription64Bits - runtime queried instance MachineDescriptionRuntime - correct size, alignment, page size, ..
* SingletonInstance Enhancements / Minor Lock/LockExt API Change (isLocked ↵Sven Gothel2011-06-113-109/+75
| | | | | | | | | | | | | | | moved up) We learned that FileChannel.lock() is not reliable on at least GNU/Linux + Sun's JVM implementation, hence we need a ServerSocket implementation. Since this code may be useful to others, it has been promoted to GlueGen. - Abstract SingletonInstance - Implement Lock interface - SingletonInstance Spezialisation: FileLock and ServerSocket Minor API Change: LockExt.isLocked() -> Lock.isLocked()
* Complete relocation of SingletonInstance.java from JOGLSven Gothel2011-06-111-0/+164
|
* Gluegen AntTask: 'literalInclude' may contain multiple directories, ↵Sven Gothel2011-06-101-10/+19
| | | | separated by comma (enhancement)
* Merged Locator -> IOUtil; int Platform.getPageSize(); Added unit test for ↵Sven Gothel2011-06-083-224/+236
| | | | IOUtil and Platform's page size
* Locator: Proper package location after reloc from JOGLSven Gothel2011-06-081-0/+178
|
* Platform: Add getPageSize()Sven Gothel2011-06-071-0/+7
|
* Merged JOGL's general purpose static methods of StreamUtil and FileUtil into ↵Sven Gothel2011-06-071-6/+95
| | | | IOUtil
* PointerBuffer: Add duplicate() method (as req by JOCL)Sven Gothel2011-05-011-0/+19
|
* NativeBuffer/PointerBuffer API/Impl Change (remove explicit backup array, ↵Sven Gothel2011-04-276-298/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alloc referenced data map if used only) This patch doesn't impact GlueGen's code generation, but enhance and fix PointerBuffer usage only. remove explicit backup array As suggested by Michael Bien with a proposed patch, PointerBuffer's backup array is not only redundant in case it's not used, but also erroneous - due to possible sliced buffers. Removes the explicit backup array implementation leaving it up to the user, ie how PointerBuffer is created (alloc/allocDirect) and use the underlying nio's buffer backup array, if available. This also fixes the (never tested) case of indirect w/ backup array usage on 32bit platform size. In this case the array shall be of type int[], holding 32bit pointer - on 64bit long[]. Previous to this patch, it was always long[]. Added more thorough tests of PointerBuffer, notably indirect w/ backup array and native deep copy and filling of a pointer array. alloc referenced data map if used only As suggested by Michael Bien with a proposed patch, the allocation of the dataMap hash map is redundant in case it's not used. The hash map will be initialized lazy, if needed only.
* refactoring in common.nio public api - removed Int64BufferMichael Bien2011-04-266-184/+20
| | | | | | - removed Int64Buffer since it is no longer needed for LongBuffer emulation Signed-off-by: Sven Gothel <[email protected]>
* RecursiveLock: Expose waiting thread queue sizeSven Gothel2011-04-261-0/+6
|
* Add IOUtil - generic URL to File and stream to stream copySven Gothel2011-04-011-0/+84
|
* VersionNumber: Add cstr with version number string and delimeterSven Gothel2011-03-211-0/+29
|
* Primitive HashMap: Add deep clone(); Fix containsValue() in case of Object ↵Sven Gothel2011-03-191-8/+116
| | | | values (using equals(Object)); Adding junit tests for clone(), capacity and IntObjectHashMap
* ReflectionUtil: split up createInstance() / use var-args where possible w/o ↵Sven Gothel2011-03-191-7/+16
| | | | change
* DoubleCheckLocking: Added 'ok' comment - volatile varSven Gothel2011-02-263-3/+3
|
* RecursiveLock: static field -> final; NativeLibrary: cleanupSven Gothel2011-02-262-7/+6
|
* Merge remote-tracking branch 'remotes/mbien/master'Sven Gothel2011-02-267-29/+30
|\
| * small cleanup in uitl packageMichael Bien2011-02-267-29/+30
| | | | | | | | | | | | - StringBuffer -> StringBuilder - ReflectionUtil.getBaseName -> class.getSimpleName() - cleanup imports, generics and @Override for all touched classes
* | cleanup importsSven Gothel2011-02-261-0/+2
|/
* Fix commentSven Gothel2011-02-221-2/+2
|
* - Buffers.slice() should maintain byteorder when sliceing ByteBuffersMichael Bien2011-02-221-31/+9
| | | - simplified isDirect() and getArray()
* - ensure slice uses the buffers original byteorder.Michael Bien2011-02-221-2/+2
| | | - create new buffers only if size > capacity not if >= capacity
* Merge remote branch 'mbien/master'Sven Gothel2011-02-141-0/+340
|\
| * added CachedBufferFactory + test.Michael Bien2011-02-131-0/+340
| | | | | | factory supports dynamic and static allocation schemes and has a synchronized and a unsynchronized implementation.
* | Fix: Buffers cstr back to protectedSven Gothel2011-02-131-1/+1
| |
* | Fix: Buffers back to non final ; Added missing JogAmp (c)Sven Gothel2011-02-134-1/+5
| |
* | Merge remote branch 'mbien/master'Sven Gothel2011-02-131-37/+46
|\|
| * - generified com.jogamp.common.nio.Buffers.Michael Bien2011-02-131-37/+46
| | | | | | | | - class is now final (change it back on demand) - added concurrency warning to slice() method doc
* | Fix: Remove unused argument ClassLoaderSven Gothel2011-02-131-3/+2
|/
* Merge branch 'master' of github.com:mbien/gluegenSven Gothel2011-02-1011-372/+83
|\
| * - removed CDC impl for com.jogamp.common.nioMichael Bien2011-02-0911-372/+83
| | | | | | | | - generified class hierarchy (casts no longer needed in client code) - @Override where needed and other minor changes
* | html fixesSven Gothel2011-02-092-16/+11
|/
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-096-154/+5
| | | | | | | | | | | | jogamp.<module> - com.jogamp.common.impl -> jogamp.common This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK.
* Fix: VersionNumber compare shall throw ClassCastException if argument is of ↵Sven Gothel2011-01-311-2/+4
| | | | different kind
* Fix: Avoid NPE in case no manifest is available (running w/o JAR)Sven Gothel2011-01-311-3/+3
|
* ReflectionUtil: Add getBaseName(Class)Sven Gothel2010-12-191-0/+5
|
* debug: mention thread nameSven Gothel2010-12-171-1/+2
|