aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/nio
Commit message (Collapse)AuthorAgeFilesLines
* Add some warning supression tagsSven Gothel2011-10-071-0/+5
|
* gluegen-rt lib loading: Moved to Platform static init incl. ↵Sven Gothel2011-09-222-6/+2
| | | | | | | | | | | | | | | | TempJarCache.bootstrapNativeLib(..) usage - Moving to Platform solves former interdependencies between GlueGenJNILibLoader/Platform - TempJarCache is being setup w/ bootstraping the gluegen-rt native lib jar file. Interesting here is that when using Oracle's JRE w/ Applets/JNLP the current dbg output is: gluegen-rt: url-root http://risa/deployment/test/jau02s/jar/ gluegen-rt: nativeJarURL jar:http://risa/deployment/test/jau02s/jar/gluegen-rt-natives-linux-amd64.jar!/ gluegen-rt: nativeJar /home/sven/.java/deployment/cache/6.0/49/3c6d1e31-2c90f42e IE the JRE implementation already deduces the online link to the Applet/JNLP cache. This makes the implementation much simpler, ie. same for application and Applets/JNLP. Have to verify w/ other Java impl. sure - and add same logic for the JOGL part.
* Unify JNI Library Loading into JNILibLoaderBase and use it for the ↵Sven Gothel2011-09-212-4/+4
| | | | | | | | gluegen-rt native lib as well - removed redundance - move proper JNLPAppletLauncher custom libloader code into JNILibLoaderBase - prepares for new JAR temp cache ..
* Remove redundant: NativeLibrary.ensureNativeLibLoaded()Sven Gothel2011-09-202-2/+4
|
* CachedBufferFactory: Cosmetic changes - comments, -1 -> 0Sven Gothel2011-08-091-2/+11
|
* GlueGen proper size / alignment of primitive and compound types usage [2/2] ↵Sven Gothel2011-07-211-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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-201-30/+30
|
* FIX StructAccessor / JavaEmitter's struct-emitter: Using byte offsetsSven Gothel2011-07-201-132/+84
| | | | | | | | | | | | | | | | | | | | 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.
* 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-263-156/+2
| | | | | | - removed Int64Buffer since it is no longer needed for LongBuffer emulation Signed-off-by: Sven Gothel <[email protected]>
* 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
|/
* - 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
* - 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
* Buffers float/double conversion: Add arg for given destination buffer; Add ↵Sven Gothel2010-11-191-7/+86
| | | | back conversion; Add unit test for arrays
* Enhance API doc .. package description etcSven Gothel2010-11-091-0/+9
|
* LICENSE.txt changes:Sven Gothel2010-09-145-98/+130
| | | | | | | | | | | | | - Added JogAmp Community and common denominator: New BSD 3-clause license - Added note to make/lib binary file (source and license) Added source and license text for external binaries used in build process (make/lib folder). Changed 'Sven Gothel' and 'Michael Bien' New BSD 3-clause license to 'JogAmp Community' Simplified BSD 2-clause license.
* added slice utility methods to Buffers + rudimentary test.Michael Bien2010-07-041-10/+48
|
* Minor additions to nio/Buffers, util/IntIntHashMap and os/NativeLibrarySven Gothel2010-06-051-0/+8
| | | | | | | | | | | | Buffers add 'float[] getFloatArray(double[])' conversion, ready to replace all JOGL InternalBufferUtil's. NativeLibrary/DynamicLinker add global lookup method allowing Unices and OSX to lookup a symbol globally. However, this is not recommended, due to the lookup costs. Windows is not supported here. Primitive type HashMap's (IntIntHashMap): Added putAll()
* Using Buffers.isDirect(), due to Java <= 1.5 limitationsSven Gothel2010-04-261-1/+1
|
* Fix 32bit masking / testsSven Gothel2010-04-013-3/+4
|
* Merged with latest of mbienSven Gothel2010-03-319-244/+313
|
* introduced com.jogamp.common.{nio,os} packages and moved some classes.Michael Bien2010-03-319-0/+1849