Lines Matching refs:nexus_info

212   cache_info->nexus_info=AcquirePixelCacheNexus(cache_info->number_threads);  in AcquirePixelCache()
213 if (cache_info->nexus_info == (NexusInfo **) NULL) in AcquirePixelCache()
264 **magick_restrict nexus_info; in AcquirePixelCacheNexus() local
269 nexus_info=(NexusInfo **) MagickAssumeAligned(AcquireAlignedMemory(2* in AcquirePixelCacheNexus()
270 number_threads,sizeof(*nexus_info))); in AcquirePixelCacheNexus()
271 if (nexus_info == (NexusInfo **) NULL) in AcquirePixelCacheNexus()
273 *nexus_info=(NexusInfo *) AcquireQuantumMemory(number_threads, in AcquirePixelCacheNexus()
274 2*sizeof(**nexus_info)); in AcquirePixelCacheNexus()
275 if (*nexus_info == (NexusInfo *) NULL) in AcquirePixelCacheNexus()
277 (void) memset(*nexus_info,0,2*number_threads*sizeof(**nexus_info)); in AcquirePixelCacheNexus()
280 nexus_info[i]=(*nexus_info+i); in AcquirePixelCacheNexus()
282 nexus_info[i]->virtual_nexus=(*nexus_info+number_threads+i); in AcquirePixelCacheNexus()
283 nexus_info[i]->signature=MagickCoreSignature; in AcquirePixelCacheNexus()
285 return(nexus_info); in AcquirePixelCacheNexus()
418 NexusInfo *nexus_info,ExceptionInfo *exception) in ClipPixelCacheNexus() argument
437 if ((nexus_info->region.width == 0) || (nexus_info->region.height == 0)) in ClipPixelCacheNexus()
442 p=GetAuthenticPixelCacheNexus(image,nexus_info->region.x,nexus_info->region.y, in ClipPixelCacheNexus()
443 nexus_info->region.width,nexus_info->region.height, in ClipPixelCacheNexus()
444 nexus_info->virtual_nexus,exception); in ClipPixelCacheNexus()
445 q=nexus_info->pixels; in ClipPixelCacheNexus()
448 for (y=0; y < (ssize_t) nexus_info->region.height; y++) in ClipPixelCacheNexus()
453 for (x=0; x < (ssize_t) nexus_info->region.width; x++) in ClipPixelCacheNexus()
1065 if (cache_info->nexus_info != (NexusInfo **) NULL) in DestroyPixelCache()
1066 cache_info->nexus_info=DestroyPixelCacheNexus(cache_info->nexus_info, in DestroyPixelCache()
1106 static inline void RelinquishCacheNexusPixels(NexusInfo *nexus_info) in RelinquishCacheNexusPixels() argument
1108 if (nexus_info->mapped == MagickFalse) in RelinquishCacheNexusPixels()
1109 (void) RelinquishAlignedMemory(nexus_info->cache); in RelinquishCacheNexusPixels()
1111 (void) UnmapBlob(nexus_info->cache,(size_t) nexus_info->length); in RelinquishCacheNexusPixels()
1112 nexus_info->cache=(Quantum *) NULL; in RelinquishCacheNexusPixels()
1113 nexus_info->pixels=(Quantum *) NULL; in RelinquishCacheNexusPixels()
1114 nexus_info->metacontent=(void *) NULL; in RelinquishCacheNexusPixels()
1115 nexus_info->length=0; in RelinquishCacheNexusPixels()
1116 nexus_info->mapped=MagickFalse; in RelinquishCacheNexusPixels()
1119 MagickPrivate NexusInfo **DestroyPixelCacheNexus(NexusInfo **nexus_info, in DestroyPixelCacheNexus() argument
1125 assert(nexus_info != (NexusInfo **) NULL); in DestroyPixelCacheNexus()
1128 if (nexus_info[i]->cache != (Quantum *) NULL) in DestroyPixelCacheNexus()
1129 RelinquishCacheNexusPixels(nexus_info[i]); in DestroyPixelCacheNexus()
1130 nexus_info[i]->signature=(~MagickCoreSignature); in DestroyPixelCacheNexus()
1132 *nexus_info=(NexusInfo *) RelinquishMagickMemory(*nexus_info); in DestroyPixelCacheNexus()
1133 nexus_info=(NexusInfo **) RelinquishAlignedMemory(nexus_info); in DestroyPixelCacheNexus()
1134 return(nexus_info); in DestroyPixelCacheNexus()
1185 return(cache_info->nexus_info[id]->metacontent); in GetAuthenticMetacontent()
1226 return(cache_info->nexus_info[id]->metacontent); in GetAuthenticMetacontentFromCache()
1330 const ssize_t y,const size_t columns,const size_t rows,NexusInfo *nexus_info, in GetAuthenticPixelCacheNexus() argument
1345 nexus_info,exception); in GetAuthenticPixelCacheNexus()
1350 if (nexus_info->authentic_pixel_cache != MagickFalse) in GetAuthenticPixelCacheNexus()
1352 if (ReadPixelCachePixels(cache_info,nexus_info,exception) == MagickFalse) in GetAuthenticPixelCacheNexus()
1355 if (ReadPixelCacheMetacontent(cache_info,nexus_info,exception) == MagickFalse) in GetAuthenticPixelCacheNexus()
1397 return(cache_info->nexus_info[id]->pixels); in GetAuthenticPixelsFromCache()
1441 return(cache_info->nexus_info[id]->pixels); in GetAuthenticPixelQueue()
1516 cache_info->nexus_info[id],exception); in GetAuthenticPixels()
1573 cache_info->nexus_info[id],exception); in GetAuthenticPixelsCache()
1616 return(GetPixelCacheNexusExtent(cache_info,cache_info->nexus_info[id])); in GetImageExtent()
1674 (cache_info->nexus_info == (NexusInfo **) NULL)) in ValidatePixelCacheMorphology()
1952 q=GetAuthenticPixelCacheNexus(image,x,y,1UL,1UL,cache_info->nexus_info[id], in GetOneAuthenticPixelFromCache()
2012 1UL,1UL,cache_info->nexus_info[id],exception); in GetOneVirtualPixel()
2071 cache_info->nexus_info[id],exception); in GetOneVirtualPixelFromCache()
2130 cache_info->nexus_info[id],exception); in GetOneVirtualPixelInfo()
2277 NexusInfo *magick_restrict nexus_info) in GetPixelCacheNexusExtent() argument
2288 extent=(MagickSizeType) nexus_info->region.width*nexus_info->region.height; in GetPixelCacheNexusExtent()
2502 cache_info->nexus_info[id]); in GetVirtualMetacontentFromCache()
2533 NexusInfo *magick_restrict nexus_info) in GetVirtualMetacontentFromNexus() argument
2543 return(nexus_info->metacontent); in GetVirtualMetacontentFromNexus()
2591 cache_info->nexus_info[id]); in GetVirtualMetacontent()
2717 const size_t columns,const size_t rows,NexusInfo *nexus_info, in GetVirtualPixelCacheNexus() argument
2775 nexus_info,exception); in GetVirtualPixelCacheNexus()
2779 offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+ in GetVirtualPixelCacheNexus()
2780 nexus_info->region.x; in GetVirtualPixelCacheNexus()
2781 length=(MagickSizeType) (nexus_info->region.height-1L)*cache_info->columns+ in GetVirtualPixelCacheNexus()
2782 nexus_info->region.width-1L; in GetVirtualPixelCacheNexus()
2794 if (nexus_info->authentic_pixel_cache != MagickFalse) in GetVirtualPixelCacheNexus()
2796 status=ReadPixelCachePixels(cache_info,nexus_info,exception); in GetVirtualPixelCacheNexus()
2801 status=ReadPixelCacheMetacontent(cache_info,nexus_info,exception); in GetVirtualPixelCacheNexus()
2810 virtual_nexus=nexus_info->virtual_nexus; in GetVirtualPixelCacheNexus()
2811 s=(unsigned char *) nexus_info->metacontent; in GetVirtualPixelCacheNexus()
2933 nexus_info->virtual_nexus); in GetVirtualPixelCacheNexus()
3156 cache_info->nexus_info[id],exception); in GetVirtualPixelCache()
3200 return(GetVirtualPixelsNexus(cache_info,cache_info->nexus_info[id])); in GetVirtualPixelQueue()
3275 columns,rows,cache_info->nexus_info[id],exception); in GetVirtualPixels()
3316 return(GetVirtualPixelsNexus(image->cache,cache_info->nexus_info[id])); in GetVirtualPixelsCache()
3346 NexusInfo *magick_restrict nexus_info) in GetVirtualPixelsNexus() argument
3356 return((const Quantum *) nexus_info->pixels); in GetVirtualPixelsNexus()
3407 static MagickBooleanType MaskPixelCacheNexus(Image *image,NexusInfo *nexus_info, in MaskPixelCacheNexus() argument
3427 if ((nexus_info->region.width == 0) || (nexus_info->region.height == 0)) in MaskPixelCacheNexus()
3432 p=GetAuthenticPixelCacheNexus(image,nexus_info->region.x,nexus_info->region.y, in MaskPixelCacheNexus()
3433 nexus_info->region.width,nexus_info->region.height, in MaskPixelCacheNexus()
3434 nexus_info->virtual_nexus,exception); in MaskPixelCacheNexus()
3435 q=nexus_info->pixels; in MaskPixelCacheNexus()
3438 for (y=0; y < (ssize_t) nexus_info->region.height; y++) in MaskPixelCacheNexus()
3443 for (x=0; x < (ssize_t) nexus_info->region.width; x++) in MaskPixelCacheNexus()
4149 const MagickBooleanType clone,NexusInfo *nexus_info,ExceptionInfo *exception) in QueueAuthenticPixelCacheNexus() argument
4194 nexus_info,exception); in QueueAuthenticPixelCacheNexus()
4251 cache_info->nexus_info[id],exception); in QueueAuthenticPixelsCache()
4338 cache_info->nexus_info[id],exception); in QueueAuthenticPixels()
4406 CacheInfo *magick_restrict cache_info,NexusInfo *magick_restrict nexus_info, in ReadPixelCacheMetacontent() argument
4428 if (nexus_info->authentic_pixel_cache != MagickFalse) in ReadPixelCacheMetacontent()
4430 offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+ in ReadPixelCacheMetacontent()
4431 nexus_info->region.x; in ReadPixelCacheMetacontent()
4432 length=(MagickSizeType) nexus_info->region.width* in ReadPixelCacheMetacontent()
4434 extent=length*nexus_info->region.height; in ReadPixelCacheMetacontent()
4435 rows=nexus_info->region.height; in ReadPixelCacheMetacontent()
4437 q=(unsigned char *) nexus_info->metacontent; in ReadPixelCacheMetacontent()
4449 if ((cache_info->columns == nexus_info->region.width) && in ReadPixelCacheMetacontent()
4461 q+=cache_info->metacontent_extent*nexus_info->region.width; in ReadPixelCacheMetacontent()
4478 if ((cache_info->columns == nexus_info->region.width) && in ReadPixelCacheMetacontent()
4493 q+=cache_info->metacontent_extent*nexus_info->region.width; in ReadPixelCacheMetacontent()
4509 region=nexus_info->region; in ReadPixelCacheMetacontent()
4510 if ((cache_info->columns != nexus_info->region.width) || in ReadPixelCacheMetacontent()
4524 q+=cache_info->metacontent_extent*nexus_info->region.width; in ReadPixelCacheMetacontent()
4540 (CacheTick(nexus_info->region.y,cache_info->rows) != MagickFalse)) in ReadPixelCacheMetacontent()
4543 nexus_info->region.width,(double) nexus_info->region.height,(double) in ReadPixelCacheMetacontent()
4544 nexus_info->region.x,(double) nexus_info->region.y); in ReadPixelCacheMetacontent()
4577 CacheInfo *magick_restrict cache_info,NexusInfo *magick_restrict nexus_info, in ReadPixelCachePixels() argument
4598 if (nexus_info->authentic_pixel_cache != MagickFalse) in ReadPixelCachePixels()
4600 offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns; in ReadPixelCachePixels()
4601 if ((ssize_t) (offset/cache_info->columns) != nexus_info->region.y) in ReadPixelCachePixels()
4603 offset+=nexus_info->region.x; in ReadPixelCachePixels()
4605 length=(MagickSizeType) number_channels*nexus_info->region.width* in ReadPixelCachePixels()
4607 if ((length/number_channels/sizeof(Quantum)) != nexus_info->region.width) in ReadPixelCachePixels()
4609 rows=nexus_info->region.height; in ReadPixelCachePixels()
4614 q=nexus_info->pixels; in ReadPixelCachePixels()
4626 if ((cache_info->columns == nexus_info->region.width) && in ReadPixelCachePixels()
4637 q+=cache_info->number_channels*nexus_info->region.width; in ReadPixelCachePixels()
4654 if ((cache_info->columns == nexus_info->region.width) && in ReadPixelCachePixels()
4667 q+=cache_info->number_channels*nexus_info->region.width; in ReadPixelCachePixels()
4683 region=nexus_info->region; in ReadPixelCachePixels()
4684 if ((cache_info->columns != nexus_info->region.width) || in ReadPixelCachePixels()
4698 q+=cache_info->number_channels*nexus_info->region.width; in ReadPixelCachePixels()
4714 (CacheTick(nexus_info->region.y,cache_info->rows) != MagickFalse)) in ReadPixelCachePixels()
4717 nexus_info->region.width,(double) nexus_info->region.height,(double) in ReadPixelCachePixels()
4718 nexus_info->region.x,(double) nexus_info->region.y); in ReadPixelCachePixels()
4969 NexusInfo *magick_restrict nexus_info,ExceptionInfo *exception) in AcquireCacheNexusPixels() argument
4978 nexus_info->length=0; in AcquireCacheNexusPixels()
4979 nexus_info->mapped=MagickFalse; in AcquireCacheNexusPixels()
4982 nexus_info->cache=(Quantum *) MagickAssumeAligned(AcquireAlignedMemory(1, in AcquireCacheNexusPixels()
4984 if (nexus_info->cache != (Quantum *) NULL) in AcquireCacheNexusPixels()
4985 (void) memset(nexus_info->cache,0,(size_t) length); in AcquireCacheNexusPixels()
4989 nexus_info->cache=(Quantum *) MapBlob(-1,IOMode,0,(size_t) length); in AcquireCacheNexusPixels()
4990 if (nexus_info->cache != (Quantum *) NULL) in AcquireCacheNexusPixels()
4991 nexus_info->mapped=MagickTrue; in AcquireCacheNexusPixels()
4993 if (nexus_info->cache == (Quantum *) NULL) in AcquireCacheNexusPixels()
5000 nexus_info->length=length; in AcquireCacheNexusPixels()
5004 static inline void PrefetchPixelCacheNexusPixels(const NexusInfo *nexus_info, in PrefetchPixelCacheNexusPixels() argument
5007 if (nexus_info->length < CACHE_LINE_SIZE) in PrefetchPixelCacheNexusPixels()
5011 MagickCachePrefetch((unsigned char *) nexus_info->pixels+CACHE_LINE_SIZE, in PrefetchPixelCacheNexusPixels()
5015 MagickCachePrefetch((unsigned char *) nexus_info->pixels+CACHE_LINE_SIZE,1,1); in PrefetchPixelCacheNexusPixels()
5031 const MagickBooleanType buffered,NexusInfo *magick_restrict nexus_info, in SetPixelCacheNexusPixels() argument
5045 assert(nexus_info->signature == MagickCoreSignature); in SetPixelCacheNexusPixels()
5046 (void) memset(&nexus_info->region,0,sizeof(nexus_info->region)); in SetPixelCacheNexusPixels()
5077 nexus_info->pixels=cache_info->pixels+cache_info->number_channels* in SetPixelCacheNexusPixels()
5079 nexus_info->metacontent=(void *) NULL; in SetPixelCacheNexusPixels()
5081 nexus_info->metacontent=(unsigned char *) cache_info->metacontent+ in SetPixelCacheNexusPixels()
5083 nexus_info->region.width=width; in SetPixelCacheNexusPixels()
5084 nexus_info->region.height=height; in SetPixelCacheNexusPixels()
5085 nexus_info->region.x=x; in SetPixelCacheNexusPixels()
5086 nexus_info->region.y=y; in SetPixelCacheNexusPixels()
5087 nexus_info->authentic_pixel_cache=MagickTrue; in SetPixelCacheNexusPixels()
5088 PrefetchPixelCacheNexusPixels(nexus_info,mode); in SetPixelCacheNexusPixels()
5089 return(nexus_info->pixels); in SetPixelCacheNexusPixels()
5097 cache_info->rows))*cache_info->number_channels*sizeof(*nexus_info->pixels); in SetPixelCacheNexusPixels()
5101 if (nexus_info->cache == (Quantum *) NULL) in SetPixelCacheNexusPixels()
5102 status=AcquireCacheNexusPixels(cache_info,length,nexus_info,exception); in SetPixelCacheNexusPixels()
5104 if (nexus_info->length < length) in SetPixelCacheNexusPixels()
5106 RelinquishCacheNexusPixels(nexus_info); in SetPixelCacheNexusPixels()
5107 status=AcquireCacheNexusPixels(cache_info,length,nexus_info,exception); in SetPixelCacheNexusPixels()
5111 nexus_info->pixels=nexus_info->cache; in SetPixelCacheNexusPixels()
5112 nexus_info->metacontent=(void *) NULL; in SetPixelCacheNexusPixels()
5114 nexus_info->metacontent=(void *) (nexus_info->pixels+ in SetPixelCacheNexusPixels()
5116 nexus_info->region.width=width; in SetPixelCacheNexusPixels()
5117 nexus_info->region.height=height; in SetPixelCacheNexusPixels()
5118 nexus_info->region.x=x; in SetPixelCacheNexusPixels()
5119 nexus_info->region.y=y; in SetPixelCacheNexusPixels()
5120 nexus_info->authentic_pixel_cache=cache_info->type == PingCache ? in SetPixelCacheNexusPixels()
5122 PrefetchPixelCacheNexusPixels(nexus_info,mode); in SetPixelCacheNexusPixels()
5123 return(nexus_info->pixels); in SetPixelCacheNexusPixels()
5336 NexusInfo *magick_restrict nexus_info,ExceptionInfo *exception) in SyncAuthenticPixelCacheNexus() argument
5358 (ClipPixelCacheNexus(image,nexus_info,exception) == MagickFalse)) in SyncAuthenticPixelCacheNexus()
5361 (MaskPixelCacheNexus(image,nexus_info,exception) == MagickFalse)) in SyncAuthenticPixelCacheNexus()
5364 if (nexus_info->authentic_pixel_cache != MagickFalse) in SyncAuthenticPixelCacheNexus()
5371 status=WritePixelCachePixels(cache_info,nexus_info,exception); in SyncAuthenticPixelCacheNexus()
5373 (WritePixelCacheMetacontent(cache_info,nexus_info,exception) == MagickFalse)) in SyncAuthenticPixelCacheNexus()
5425 status=SyncAuthenticPixelCacheNexus(image,cache_info->nexus_info[id], in SyncAuthenticPixelsCache()
5481 status=SyncAuthenticPixelCacheNexus(image,cache_info->nexus_info[id], in SyncAuthenticPixels()
5554 NexusInfo *magick_restrict nexus_info,ExceptionInfo *exception) in WritePixelCacheMetacontent() argument
5575 if (nexus_info->authentic_pixel_cache != MagickFalse) in WritePixelCacheMetacontent()
5577 offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+ in WritePixelCacheMetacontent()
5578 nexus_info->region.x; in WritePixelCacheMetacontent()
5579 length=(MagickSizeType) nexus_info->region.width* in WritePixelCacheMetacontent()
5581 extent=(MagickSizeType) length*nexus_info->region.height; in WritePixelCacheMetacontent()
5582 rows=nexus_info->region.height; in WritePixelCacheMetacontent()
5584 p=(unsigned char *) nexus_info->metacontent; in WritePixelCacheMetacontent()
5596 if ((cache_info->columns == nexus_info->region.width) && in WritePixelCacheMetacontent()
5607 p+=nexus_info->region.width*cache_info->metacontent_extent; in WritePixelCacheMetacontent()
5625 if ((cache_info->columns == nexus_info->region.width) && in WritePixelCacheMetacontent()
5639 p+=cache_info->metacontent_extent*nexus_info->region.width; in WritePixelCacheMetacontent()
5656 region=nexus_info->region; in WritePixelCacheMetacontent()
5657 if ((cache_info->columns != nexus_info->region.width) || in WritePixelCacheMetacontent()
5671 p+=cache_info->metacontent_extent*nexus_info->region.width; in WritePixelCacheMetacontent()
5687 (CacheTick(nexus_info->region.y,cache_info->rows) != MagickFalse)) in WritePixelCacheMetacontent()
5690 nexus_info->region.width,(double) nexus_info->region.height,(double) in WritePixelCacheMetacontent()
5691 nexus_info->region.x,(double) nexus_info->region.y); in WritePixelCacheMetacontent()
5724 CacheInfo *magick_restrict cache_info,NexusInfo *magick_restrict nexus_info, in WritePixelCachePixels() argument
5744 if (nexus_info->authentic_pixel_cache != MagickFalse) in WritePixelCachePixels()
5746 offset=(MagickOffsetType) nexus_info->region.y*cache_info->columns+ in WritePixelCachePixels()
5747 nexus_info->region.x; in WritePixelCachePixels()
5748 length=(MagickSizeType) cache_info->number_channels*nexus_info->region.width* in WritePixelCachePixels()
5750 extent=length*nexus_info->region.height; in WritePixelCachePixels()
5751 rows=nexus_info->region.height; in WritePixelCachePixels()
5753 p=nexus_info->pixels; in WritePixelCachePixels()
5765 if ((cache_info->columns == nexus_info->region.width) && in WritePixelCachePixels()
5775 p+=cache_info->number_channels*nexus_info->region.width; in WritePixelCachePixels()
5793 if ((cache_info->columns == nexus_info->region.width) && in WritePixelCachePixels()
5806 p+=cache_info->number_channels*nexus_info->region.width; in WritePixelCachePixels()
5823 region=nexus_info->region; in WritePixelCachePixels()
5824 if ((cache_info->columns != nexus_info->region.width) || in WritePixelCachePixels()
5838 p+=cache_info->number_channels*nexus_info->region.width; in WritePixelCachePixels()
5854 (CacheTick(nexus_info->region.y,cache_info->rows) != MagickFalse)) in WritePixelCachePixels()
5857 nexus_info->region.width,(double) nexus_info->region.height,(double) in WritePixelCachePixels()
5858 nexus_info->region.x,(double) nexus_info->region.y); in WritePixelCachePixels()